Grail (C++)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
The Selection class encapsulates the selection operation, i.e., how individuals are selected from the current population to the next generation, in evolutionary algorithm.
See also EAOptimizer.
More...
#include <Selection.hh>
Public Member Functions | |
virtual void | Perform (std::vector< std::unique_ptr< Individual >> ¤tPopulation, size_t populationMaxSize) |
Perform - performs the selection. More... | |
The Selection class encapsulates the selection operation, i.e., how individuals are selected from the current population to the next generation, in evolutionary algorithm.
See also EAOptimizer.
|
virtual |
Perform - performs the selection.
currentPopulation | - the input population before the selection. For convenience, it will be sorted by fitness. Remove individuals from it until you reduce the size to populationMaxSize. |
populationMaxSize | - what is the maximum size of the population after the selection. |