neat4jsmall
Home
Tutorials
  Using the MSE Fitness Function
  Creating Experiments
  Creating Operators
  Creating Data Loaders
  Creating A Game
  Distributed Learning
Documentation
Screenshots
Downloads
Contact
Operators.

There are three types of genetic algorithm mating operators within NEAT4J. These are mutators, crossover opreators and parent selectors.

Mutators.

The default mutator org.neat4j.neat.core.mutators.NEATMutator provides all the mutation required by the NEAT algorithm i.e. weight and topological mutation. There is no need to create a new one as it is integral to the NEAT algorithm as a whole. But, if you wish to change the mutator with a new one, then the class must implement the org.neat4j.neat.ga.core.Mutator interface and you should update the OPERATOR.MUTATOR field in your .ga file.

Crossover.

The default crossover operator org.neat4j.neat.core.xover.NEATCrossover provides the crossover function as defined by NEAT algorithm. Again, there is no need to change this but if you want to write a better/faster crossover operator then your class should implement the org.neat4j.neat.ga.core.Crossover interface. Again, you should update your .ga file to specifiy the correct class. This is done by modifying the OPERATOR.XOVER field.

Parent Selectors.

The default parent selector uses org.neat4j.neat.core.pselectors.TournamentSelector which (not surprisingly) selects parents based on a tournament basis. There are many other types of parent selector you could write as these are not NEAT specific, such as the roulette wheel. To write your own, you should write a class that implements the org.neat4j.neat.ga.core.ParentSelector interface and provides two inidividuals that will be mated to produce an offspring. Once again, don't forget to update your .ga file to specify your new parent selector class. This is done by updating the OPERATOR.PSELECTOR field.