Module genevo::genetic[][src]

Expand description

The ‘genetic’ module defines types for the genetic algorithm. The traits defined in this module should be implemented to formulate an optimization or search problem. The types are named after terms as they are found in genetic biology.

Traits

In order to be able to use operator::GeneticOperators designed for single-objective optimization to be used for multi-objective Fitness values the struct implementing the Fitness trait must also implement this AsScalar trait.

A Fitness value is used to determine the quality of a Genotype. Fitness values should have an ordering, also called ranking.

Defines the evaluation function to calculate the Fitness value of a Genotype based on its properties.

A Genotype defines those properties of a Phenotype that are relevant for the genetic algorithm. Respectively they are used to determine the Fitness value of the solution candidate. These properties are also called chromosomes.

A Phenotype is a candidate solution of the optimization or search problem. Phenotypes are also called individuals or creatures. A Phenotype is the type of data for which the optimal value for solving an optimization or search problem should be found.

Type Definitions

The Children type defines a set of Genotypes which is the outcome of the operator::CrossoverOp function.

The Locus is a position within a Genotype.

The Offspring type defines the set of Children of type Genotype which represents the all children of all Parents of one generation.

The Parents type defines a tuple of individuals that are needed for breeding one offspring. The operator::SelectionOp selects a list of parents which are taken by the operator::CrossoverOp for breeding the offspring.