GEP::Core::Float::Population Class Reference

A population of Genotypes. More...

Inheritance diagram for GEP::Core::Float::Population:

Inheritance graph
[legend]
Collaboration diagram for GEP::Core::Float::Population:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Population (int n_Genes, int headLength, int n_generations, Common.Alphabet functionsSet, Common.Alphabet variablesSet, Common.Alphabet constantsSet, double[] symbolSetsProbabilityDistribution, Common.Symbol genesLinkingFunction, OperatorsSet operators, ConstantsSetMutation constantsSetMutation)
override void Initialize (int populationSize)
 Initializes a population of Genotypes with random genome.
void UpdateSymbolRefereces (Alphabet functionsSet, Alphabet variablesSet, Alphabet constantsSet)
 Updates Symbol references from every Genotype._linearStructure in this population to point to symbols from the provided alphabets.
void NextGeneration ()
 Creates the next generation in this population.
void CalculateFitnessAndMatingProbabilities ()
 Calculates and assigns fitnesses and mating probability to Genotypes from this population.
void Start ()
 Starts the evolution of the population.
void AutoSave ()
 Auto saves the current population.
void Save (string filePath)
 Saves the current population.

Static Public Member Functions

static Population Load (string filePath)
 Loads a population from a file.

Public Attributes

GenerationCalculatedCallback _generationCalculatedCallback
int _n_generations
 The maximum number of generations this population will evolve.
string _autoSaveFilePath
 The path to the file to auto save the population.
int _autoSaveInterval
 The interval in minutes between auto saves.
DateTime _previousAutoSave = DateTime.Now
 The previous auto save time.
List< Genotype_fittestList = new List<Genotype>(20)
 List of fittest Genotypes that have occurred during evolution.

Protected Member Functions

override void MutateConstants ()
 Mutates values of constants in the _constantsSet.

Protected Attributes

Random _random = new Random()
 Since on some places random numbers are requred, every population has its own Random.
Genotype _fittest
int _generation
Symbol _genesLinkingFunction
Alphabet _functionsSet
Alphabet _variablesSet
Alphabet _constantsSet
double[] _symbolSetsProbabilityDistribution
 Array with two elements. It is the cumulative probability of the functions, variables and constants sets respective to the elements of the array.
int _n_Genes
int _geneLength
int _headLength
int _tailLength
int _genotypeLength

Properties

Genotype Fittest [get]
 The current fittest Genotype in the whole population.
int N_generations [get]
 Gets the number of generations that have to evolve.
int Size [get]
 Gets the number of Genotypes in this population.
double TotalMatingProbability [get]
 The total mating probability of all Genotypes in this population.
Genotype this [int genotypeIndex] [get, set]
 Gets or sets a genotype from / in this population.
int Generation [get]
 Gets the number of the current generation. The first generation is with number 0.
Symbol GenesLinkingFunction [get]
 Gets the linking function between genes of Genotypes from this population.
Alphabet FunctionsSet [get]
 The set of functions used in Genotypes.
Alphabet VariablesSet [get]
 The set of variables used in Genotypes.
Alphabet ConstantsSet [get]
 The set of constants used in Genotypes.
int N_Genes [get]
 Gets the number of genes each Genotype of this population has.
int GeneLength [get]
 Gets the length of genes each Genotype of this population has.
int HeadLength [get]
 Gets the genes' head length each Genotype of this population has.
int TailLength [get]
 Gets genes' tail length each Genotype of this population has.
int GenotypeLength [get]
 Gets the length of the genome (Genotype._linearStructure, that each genotype in this population has.


Detailed Description

A population of Genotypes.

This class is a centerpiece of GEP .NET Framework.

It governs the evolution process.

The value type in use here is float.

Definition at line 18 of file Population.cs.


The documentation for this class was generated from the following file:
GEP .NET Framwork Main Page
SourceForge.net Logo