Module gas::fitness

source · []

Re-exports

pub use color_count::ColorCount;
pub use distance::Distance;
pub use locus_desirability::LocusDesirability;
pub use weighted_count::WeightedCount;

Modules

Structs

FitnessName describes a score. The full name would be [FitnessName.prefix] + [FitnessName.gene] name + [FitnessName.locus] name

Traits

  • A FitnessFunction returns a set of fitness scores when passed a chromosone.

  • This is implemented as an enum rather than a trait so that we can store them

  • inside a const FitnessConfig

  • Fitness scores are floating point numbers where a higher number is considered

  • better. Negative numbers are allowed, so if you wish to optimize to zero you

  • may simply return the negative of the absolute value.

  • NaN values are valid scores, and indicate that the score cannot be

  • calculated. When comparing scores, any number compared to a NaN is considered

  • a tie.

  • Implementations: color_count::ColorCount, distance::Distance, weighted_count::WeightedCount