Clonal Selection Algorithm (see e.g. http://en.wikipedia.org/wiki/Clonal_Selection_Algorithm). More...
Public Member Functions | |
void | registerParameters (StateP state) |
Register algorithm's parameters (if any). | |
bool | initialize (StateP state) |
Initialize the algorithm, read parameters from the system, do a sanity check. | |
bool | advanceGeneration (StateP state, DemeP deme) |
Perform a single generation on a single deme. | |
bool | markAntibodies (DemeP deme) |
bool | cloningPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones) |
bool | hypermutationPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones) |
bool | selectionPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones) |
bool | birthPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones) |
bool | replacePopulation (StateP state, DemeP deme, std::vector< IndividualP > &clones) |
Static Protected Member Functions | |
static bool | sortPopulationByFitness (IndividualP ab1, IndividualP ab2) |
static bool | sortPopulationByParentAndFitness (IndividualP ab1, IndividualP ab2) |
Protected Attributes | |
double | ubound |
double | lbound |
uint | dimension |
uint | n |
double | beta |
double | c |
double | d |
string | cloningVersion |
string | selectionScheme |
Clonal Selection Algorithm (see e.g. http://en.wikipedia.org/wiki/Clonal_Selection_Algorithm).
this CLONALG implements:
birthPhase: where d * populationSize of new antibodies are randomly created and added to the population for diversification
CLONALG algorithm accepts only a single FloatingPoint genotype Additionally, if chosen, selectionScheme CLONALG1 adds a FloatingPoint genotype (parentAntibody) to mark which clone came from which antibods
Definition at line 17 of file main_clonalg.cpp.
bool MyAlg::advanceGeneration | ( | StateP | , | |
DemeP | ||||
) | [inline, virtual] |
Perform a single generation on a single deme.
Must be implemented by a specific algorithm class
Implements Algorithm.
Definition at line 158 of file main_clonalg.cpp.
bool MyAlg::initialize | ( | StateP | ) | [inline, 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 68 of file main_clonalg.cpp.
void MyAlg::registerParameters | ( | StateP | ) | [inline, virtual] |
Register algorithm's parameters (if any).
Called by the system before algorithm initialization (Algorithm::initialize)
Reimplemented from Algorithm.
Definition at line 57 of file main_clonalg.cpp.