Generational algorithm with roulette wheel selection operatorThis algorithm is genotype independent (it can be used with any Genotype). More...
#include <AlgRouletteWheel.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 | |
double | crxRate_ |
crossover rate | |
double | selPressure_ |
selection pressure | |
SelFitnessProportionalOpP | selFitPropOp |
SelRandomOpP | selRandomOp |
SelBestOpP | selBestOp |
Generational algorithm with roulette wheel selection operator
This algorithm is genotype independent (it can be used with any Genotype).
The algorithm flow:
single generation { select individuals to form the new generation (fitness proportional selection operator); create new generation (make copies); noCrx = (deme size) * <crxRate_> / 2; repeat(<noCrx> times) { randomly select two parents; perform crossover, _replace_ parents with their children; } perform mutation on new generation; }
Definition at line 31 of file AlgRouletteWheel.h.
bool RouletteWheel::advanceGeneration | ( | StateP | , | |
DemeP | ||||
) | [virtual] |
Perform a single generation on a single deme.
Must be implemented by a specific algorithm class
Implements Algorithm.
Definition at line 42 of file AlgRouletteWheel.cpp.
bool RouletteWheel::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 24 of file AlgRouletteWheel.cpp.
void RouletteWheel::registerParameters | ( | StateP | ) | [virtual] |
Register algorithm's parameters (if any).
Called by the system before algorithm initialization (Algorithm::initialize)
Reimplemented from Algorithm.
Definition at line 16 of file AlgRouletteWheel.cpp.