|
|
std::ostream & | operator<< (std::ostream &out, const EAOptimizer &eaOptimizer) |
| |
◆ EAOptimizer()
| grail::evolution::EAOptimizer::EAOptimizer |
( |
std::vector< std::unique_ptr< EvoScript >> & |
initialPopulation, |
|
|
std::unique_ptr< Arena > |
arenaEvaluation, |
|
|
std::unique_ptr< Crossover > |
crossover = std::make_unique<Crossover>(), |
|
|
std::unique_ptr< Mutation > |
mutation = std::make_unique<Mutation>(), |
|
|
std::unique_ptr< Selection > |
selection = std::make_unique<Selection>(), |
|
|
std::mt19937_64::result_type |
seed = std::random_device{}() |
|
) |
| |
The EA algorithm will maintain the size of the initial population after the selection phase.
- Parameters
-
| initialPopulation | Initial population to the EA algorithm. |
| arenaEvaluation | |
| mutation | |
| crossover | |
| selection | |
◆ CalculatePopulationDiversity()
| float grail::evolution::EAOptimizer::CalculatePopulationDiversity |
( |
| ) |
const |
Returns the diversity ratio as a number [0,1]. The lower the value, the population is more homogeneous
◆ CalculatePopulationIdenticalFront()
| size_t grail::evolution::EAOptimizer::CalculatePopulationIdenticalFront |
( |
| ) |
const |
Finds the most frequent individuals (which are identical to each other) and returns the number of them.
◆ Run()
| void grail::evolution::EAOptimizer::Run |
( |
int |
maxEpochCount = 1 | ) |
|
Runs the EA algorithm for a given number of evolutionary epochs. The main method of the algorithm.
The documentation for this class was generated from the following files: