#include <GeneticEngine.h>
Inheritance diagram for prapi::ga::GeneticEngine< T >:

Public Methods | |
| GeneticEngine (int generations, FitnessCalculator< T > &calculator, Mutator< T > &mutator, SurvivorSelector< T > &selector, Breeder< T > &breeder) | |
| Create a new genetic engine with the given number of generations and a set of pluggable behaviors. | |
| virtual | ~GeneticEngine () |
| void | start (util::List< Individual< T > > &population) |
| Start the evolution. | |
| virtual void | createNextGeneration (util::List< Individual< T > > &population, int index) |
| Create a new generation of individuals by replacing the current contents of the population by new individuals. | |
| void | stop (void) |
| Stop the evolution. | |
|
||||||||||||||||||||||||||||
|
Create a new genetic engine with the given number of generations and a set of pluggable behaviors. If generations is -1, the engine will run forever unless explicitly stopped. |
|
||||||||||||||||
|
Create a new generation of individuals by replacing the current contents of the population by new individuals. The default implementation first sorts the population in ascending fitness order and calls the selectSurvivors method in the internal SurvivorSelector. Second, the age of each individual is incremented by one. Finally, the internal Breeder is required to produce some new offspring.
|
|
||||||||||
|
Start the evolution. Until the maximum generation count is reached or the evolution is explicitly stopped, the engine will create new generations as follows.
|
|
||||||||||
|
Stop the evolution. The evolution will stop after the currently generating population has finished. |