Skip to content
Thomas Wagenaar edited this page Apr 11, 2017 · 4 revisions

Warning: not in use atm.

Generation is the creation of the initial pool of genomes. Generation is quite important, depending on your project. If you want to train an AI two decide between two values, you should create genomes which have two randomly selected 'turning points'. This pushes the learning process of the genetic algorithm in the right direction.

By default, randomly geneted neural networks have no turning point at all and always output the same value which is around 0.5. Generation methods optimize the search space.

At the moment, there are 2 built-in generation methods:

Methods.Generation.DEFAULT; // is the default generated neural network, minimal search space
Methods.Generation.POINTS; // creates an x-amount of 'turning points'

Generation can only be used as an option in the set up of an 'Evolution'. The configuration of Generation.POINTS is quite extensive, these are the defaults:

config: {
  points: 2, // amount of turning points
  learningRate : 0.3, // the learning rate
  iterations: 50, // the amount of iterations to train the turning points
  shuffle: true, // shuffle the training data
  error: 0.0001, // aim of error rate
  cost: Methods.Cost.MSE // training cost
}

shuffle: true is highly advisable when training multiple points as the neural network will not remember the first trained turning point as well as the last trained turning point.

Clone this wiki locally