Module genetic_algorithm::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 Allele through a trait attribute (no reason to make it generic, as the client implements for a single Allele type).
See Fitness Trait
Modules§
- placeholders for testing and bootstrapping, not really used in practice
Enums§
Traits§
- The fitness function, is implemented as a fitness method object.
Type Aliases§
- Use isize for easy handling of scores (ordering, comparing) as floats are tricky in that regard.