Steady state algorithm with tournament elimination operatorThis algorithm is genotype independent (it can be used with any Genotype). More...
#include <AlgSteadyStateTournament.h>
Public Member Functions | |
| bool | advanceGeneration (StateP state, DemeP deme) |
| Perform a single generation on a single deme. | |
| bool | initialize (StateP state) |
| Initialize the algorithm, read parameters from the system, do a sanity check. | |
| void | registerParameters (StateP state) |
| Register algorithm's parameters (if any). | |
Protected Attributes | |
| uint | nTournament_ |
| tournament size | |
| SelectionOperatorP | selRandomOp |
| SelectionOperatorP | selWorstOp |
Steady state algorithm with tournament elimination operator
This algorithm is genotype independent (it can be used with any Genotype).
The algorithm flow:
single generation {
repeat(deme size times) {
randomly add <nTournament_> individuals to the tournament;
select the worst one in the tournament;
randomly select two parents from remaining ones in the tournament;
replace the worst with crossover child;
perform mutation on child;
}
}
Definition at line 27 of file AlgSteadyStateTournament.h.
| bool SteadyStateTournament::advanceGeneration | ( | StateP | , | |
| DemeP | ||||
| ) | [virtual] |
Perform a single generation on a single deme.
Must be implemented by a specific algorithm class
this algorithm: one _generation_ is 'deme->size()' _iterations_
Implements Algorithm.
Definition at line 46 of file AlgSteadyStateTournament.cpp.
| bool SteadyStateTournament::initialize | ( | StateP | ) | [virtual] |
Initialize the algorithm, read parameters from the system, do a sanity check.
Called by the system before the algorithm starts (Algorithm::advanceGeneration)
Reimplemented from Algorithm.
Definition at line 27 of file AlgSteadyStateTournament.cpp.
| void SteadyStateTournament::registerParameters | ( | StateP | ) | [virtual] |
Register algorithm's parameters (if any).
Called by the system before algorithm initialization (Algorithm::initialize)
Reimplemented from Algorithm.
Definition at line 20 of file AlgSteadyStateTournament.cpp.
1.7.1