Module fitness

Source
Expand description

The search goal to optimize towards (maximize or minimize).

Each problem will usually have its own specific Fitness function, therefore you need to implement it yourself. Because the Fitness function is specific, it is also bound to the Genotype through a trait attribute (no reason to make it generic, as the client implements for a single Genotype type).

See Fitness Trait for examples and further documentation

Modules§

placeholders
placeholders for testing and bootstrapping, not really used in practice
prelude

Enums§

FitnessOrdering

Traits§

Fitness
The fitness function, is implemented as a fitness method object.

Type Aliases§

FitnessChromosome
This is just a shortcut for <Self::Genotype as Genotype>::Chromosome
FitnessGenotype
This is just a shortcut for Self::Genotype
FitnessPopulation
This is just a shortcut for Population<<Self::Genotype as Genotype::Chromosome>
FitnessValue
Use isize for easy handling of scores (ordering, comparing) as floats are tricky in that regard.