Darwin Neuroevolution Framework
|
A population implementation encapsulates the fixed-size set of genotypes, together with the rules for creating a new generation from the previous one. More...
#include <darwin.h>
Public Member Functions | |
virtual size_t | size () const =0 |
The fixed number of genotypes in the population. | |
virtual Genotype * | genotype (size_t index)=0 |
Indexed access to a genotype in the population. | |
virtual const Genotype * | genotype (size_t index) const =0 |
Indexed access to a genotype in the population. | |
virtual vector< size_t > | rankingIndex () const =0 |
Return the indexes of the ranked genotypes (sorted from best to worst) More... | |
virtual int | generation () const =0 |
The current generation number. | |
virtual void | createPrimordialGeneration (int population_size)=0 |
Initialize an initial generation. | |
virtual void | createNextGeneration ()=0 |
Creates a new generation based on the current one. More... | |
Genotype * | operator[] (size_t index) |
Array subscript operator (required for pp::for_each) | |
A population implementation encapsulates the fixed-size set of genotypes, together with the rules for creating a new generation from the previous one.
|
pure virtual |
Creates a new generation based on the current one.
It assumes that all the genotypes have been evaluated (see Domain::evaluatePopulation())
|
pure virtual |
Return the indexes of the ranked genotypes (sorted from best to worst)
The rankings are calculated based on the fitness values assigned to each genotype, and potentially other criteria internal to the population (for example a population may break the fitness ties by favoring less complex genotypes)