Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Teem::GenerationalEvolutionRun Class Reference
[Genetic Algorithms]

#include <GenerationalEvolution.h>

Inheritance diagram for Teem::GenerationalEvolutionRun:

Teem::EvolutionRun Teem::MultiDecoderEvolutionRun Teem::SingleDecoderEvolutionRun Teem::SimpleMultiGenomeEvolutionRun Teem::SimpleEvolutionRun List of all members.

Detailed Description

The basic class for generational GAs including all basic features.

It is overloaded by specific algorithms.


Public Member Functions

 GenerationalEvolutionRun ()
 Constuctor.
virtual ~GenerationalEvolutionRun ()
 Destructor.
virtual void createGenotypeDecoders (Setupable *experiment)=0
 Create the necessary genotype decoders.
virtual void createRandomPopulation ()
 Create a population of random genomes, using the genotype decoder By default, use the first decoder to create the population.
virtual bool loadPopulation (Experiment *experiment)
 Load a population from a filestream.
virtual bool loadPopulation (Experiment *experiment, const char *generation)
 Load a population at a specific generation.
virtual void run (Setupable *experiment)
 Evaluate, Save, Log and Reproduce the population.
virtual void testBestIndividual (Setupable *experiment)
 Test the best Individual and test it (used to view and evaluate indivuals for analysis).
virtual void testIndividual (Setupable *experiment, const char *)
 Test a certain individual and evaluate it (used to view and evaluate individuals for analysis).

Protected Member Functions

void deleteGenomes (void)
 Delete unused genomes leftover from a previous generation.
bool loadPopulationFromStream (Experiment *experiment, Ishtar::InputStream *stream)
 Get the population through Ishtar.
double computeMean (const std::valarray< GenerationalIndividual > &group)
 Compute the mean fitness of a group, which is a part of a population.
double computeSD (const std::valarray< GenerationalIndividual > &group)
 Compute the Standard Deviation of a group.
double computeDiversity (const std::valarray< GenerationalIndividual > &group)
 Calculate the Diversity of a group (we use the standard deviation of the Hamming distance).
virtual void evaluatePopulation (Evaluable *fitness)=0
 The function used to test the population and determine a fitness for each individual.
virtual void reproducePopulation (void)=0
 Randomly picks individuals from the part of the population defined by the reproductionRatio.
virtual void logPopulation (void)
 Documenting, data dumping and Writing to the log files.
virtual bool savePopulation (void)
 Save the current population to the file.
virtual bool loadPopulation (Experiment *experiment, unsigned generation)
 Load a population at a specific generation.
virtual void run (Evaluable *fitness)
 Evaluate, Save, Log and Reproduce the population. Wrapping function.
virtual void testBestIndividual (Evaluable *fitness)=0
 Test the best individual and evaluate it (used to view and evaluate individuals for analysis). Wrapping function.
virtual void testIndividual (Evaluable *fitness, size_t number)=0
 Test a certain individual and evaluate it (used to view and evaluate individuals for analysis). Wrapping function.

Protected Attributes

GenerationalPopulation population
 A population, consisting of all individuals.
Ishtar::Variable< double > crossoverProbability
 The crossover probability per.
Ishtar::Variable< double > elitismRatio
 The percentage of the population that is kept unchanged ("elite").
Ishtar::Variable< double > reproductionRatio
 The percentage of the population that will be reproduced.
Ishtar::Variable< unsigned > populationCount
 The total number of individuals present in the population.
Ishtar::Variable< unsigned > generationCount
 The number of generations the experiment will run.
unsigned generation
 The current generation during runtime.
bool wasLoaded
 Parameter used to toggle between evaluation and reproduction.


Member Function Documentation

virtual void Teem::GenerationalEvolutionRun::createGenotypeDecoders Setupable experiment  )  [pure virtual]
 

Create the necessary genotype decoders.

Fill genotypeDecoders.

Parameters:
experiment to provide a hook for experiment to configure decoders

Implements Teem::EvolutionRun.

Implemented in Teem::SingleDecoderEvolutionRun, and Teem::MultiDecoderEvolutionRun.


The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:38:27 2005 for Teem by  doxygen 1.4.2