MergePopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process. More...
#include <MergePopulation.h>


Public Member Functions | |
| MergePopulation (const std::string &path) | |
| void | runGeneration () |
| void | runBasicGEPGeneration () |
| void | evaluate (const typename IndividualType::eval_type &user_param=typename IndividualType::eval_type(0), const bool &elite=false) |
| void | fitness (const bool &elite=false) |
| void | readConfig (const std::string &path) |
Private Member Functions | |
| void | tournamentSelection () |
| void | singleIndividualOperators () |
| void | twoIndividualOperators () |
Private Attributes | |
| u_short | _merge_size |
MergePopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process.
| GEP::MergePopulation< IndividualType, Comparator >::MergePopulation | ( | const std::string & | path | ) | [inline] |
| void GEP::MergePopulation< IndividualType, Comparator >::evaluate | ( | const typename IndividualType::eval_type & | user_param = typename IndividualType::eval_type(0), |
|
| const bool & | elite = false | |||
| ) | [inline, virtual] |
Runs evaluation for all elements in population, with user_param as target case
| user_param | - desired output cast on user_param | |
| elite | - if true, a whole population will be evaluated |
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::fitness | ( | const bool & | elite = false |
) | [inline, virtual] |
Calcualtes fitness for all elements in population.
| elite | - if true, the fitness for a whole population will be calculated |
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::readConfig | ( | const std::string & | path | ) | [inline, virtual] |
Parses config file for fields specific to the Population
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::runBasicGEPGeneration | ( | ) | [inline, virtual] |
Performs operators on the population in the following sequence:
> elitism (choose _eliteSize best individuals; for Ferreira _eliteSize = 1)
1) Create temporary population through:
> selection
2) Apply individual operators
> one individual operators (mutation and IS, RIS, Gene transpositions)
> two individual operators (one point, two point and gene crossovers)
> elitism, continued - replace _eliteSize first individuals with the elite ones.
3) Replace the population with temporary one
4) Replace _eliteSize first individuals with _elite
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::runGeneration | ( | ) | [inline, virtual] |
Will base on the neighborhood. Assumes, that individuals are evaluated, and their fitness - calculated.
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::singleIndividualOperators | ( | ) | [inline, private, virtual] |
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::tournamentSelection | ( | ) | [inline, private, virtual] |
Tournament Selection mechanism (instead of Roulette Wheel by Ferreira). Results are placed in temporary population. Assumes, that individuals are evaluated, and their fitness - calculated.
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::MergePopulation< IndividualType, Comparator >::twoIndividualOperators | ( | ) | [inline, private, virtual] |
Reimplemented from GEP::Population< IndividualType, Comparator >.
u_short GEP::MergePopulation< IndividualType, Comparator >::_merge_size [private] |
Number of individuals generated each generation
1.6.1