#include <individual.h>
Public Methods | |
Individual (const Genome &prototype) | |
void | incarnate (bool init) |
void | set (const String &key, Object *val) |
void | remove (const String &key) |
Object & | operator[] (const String &key) |
const Object & | operator[] (const String &key) const |
const Map< String, Object > & | features () const |
double | evaluate (EAEnvironment &envr, bool force=false) |
int | getage () const |
const Selector & | selector () const |
void | setSelector (const SelectionPrms &templ) |
bool | execute (const GeneticMsg &msg) const |
void | init () |
bool | pointMutate (const MutationRate &k) |
const Genstruct * | getGene (const GeneticID &n) const |
void | addking () |
int | getkings () const |
void | recombine (const Individual &a, const Individual &b) |
double | equality (const Individual &other) const |
void | print (TextOStream &out) const |
virtual DataOStream & | operator>> (DataOStream &out) const |
virtual void | check () const |
Static Public Methods | |
void | addGenesTo (Genome &g, const StringMap ¶ms) |
Another central feature of an Individual is that it's fitness in an EAEnvironment can be measured.
Definition at line 33 of file individual.h.
|
Construction from genotypic template.
Definition at line 56 of file individual.cc. References incarnate(). |
|
Passthrough to the Genome of the Individual.
Definition at line 65 of file individual.cc. References Selector::addGenesTo(). Referenced by SimplePopulation::SimplePopulation(). |
|
Passthrough to the Genome of the Individual.
Definition at line 143 of file individual.h. References Genome::addking(). Referenced by EAStrategy::evolve(). |
|
Implementation for Object.
Definition at line 212 of file individual.cc. References Genome::check(). |
|
Passthrough to the Genome of the Individual.
Definition at line 149 of file individual.h. References Gentainer::equality(), and genome. |
|
Evaluates the fitness of the phenotype in the given environment. The evaluation is done as many times as defined for the environment. The resulting fitness of the evaluations is averaged. The multiple evaluation is useful if the environment or the decoding from genotype to phenotype has randomness. The fitness is also cached for later comparisons, if the genotype does not change.
Definition at line 103 of file individual.cc. References EAEnvironment::evals(), and EAEnvironment::evaluate(). Referenced by EAStrategy::evolve(). |
|
Passthrough to the Genome of the Individual.
Definition at line 133 of file individual.h. References Gentainer::execute(). Referenced by InterGene::execute(). |
|
Returns a reference to the phenotypic features of the Individual.
Definition at line 77 of file individual.h. |
|
Returns the age of the individual; how many generations it has been an elite.
Definition at line 108 of file individual.h. Referenced by print(). |
|
Passthrough to the Genome of the Individual.
Definition at line 139 of file individual.h. References Gentainer::getGene(). Referenced by FloatTestEAEnv::evaluateg(), and BinaryTestEAEnv::evaluateg(). |
|
Passthrough to the Genome of the Individual.
Definition at line 145 of file individual.h. References Genome::getkings(). |
|
Resets the individual to birth conditions; removes any phenotypic features.
Definition at line 69 of file individual.cc. References Gentainer::execute(), and Selector::read(). Referenced by Individual(), pointMutate(), and recombine(). |
|
Passthrough to the Genome of the Individual.
Definition at line 135 of file individual.h. References Genome::init(). |
|
Implementation for Object. Verbose printout. Definition at line 203 of file individual.cc. |
|
Returns a const phenotypic feature.
Definition at line 69 of file individual.h. |
|
Returns a phenotypic feature.
Definition at line 66 of file individual.h. |
|
Passthrough to the Genome of the Individual.
Definition at line 157 of file individual.cc. References incarnate(), and Gentainer::pointMutate(). |
|
Brief printout.
Definition at line 174 of file individual.cc. References getage(), and Genome::print(). |
|
Passthrough to the Genome of the Individual.
Definition at line 152 of file individual.cc. References genome, incarnate(), and Gentainer::recombine(). |
|
Remove a phenotypic feature.
Definition at line 63 of file individual.h. |
|
Returns the selection handler of the Individual.
Definition at line 112 of file individual.h. Referenced by SelectionMatrix::calculateMatrix(). |
|
Add or change a phenotypic feature.
Definition at line 58 of file individual.h. |
|
Sets the selector of the Individual using the given template. This method is typically called by a Population or it's EAStrategy, and the template consists of global selection parameters. Definition at line 223 of file individual.cc. |