Expand description
Binary-coded Genetic Algorithm.
Operates on a Tensor<B, 2, Int> population where each gene is
restricted to {0, 1}. Selection and elitism reuse the host-side
fitness indexing helpers shared with the real-coded GA; crossover
and mutation use the binary-specific operators in
crate::ops::crossover::binary_uniform_crossover and
crate::ops::mutation::bit_flip_mutation.
Fitness is treated as cost (lower is better) to match the rest of
the strategies in this crate; benchmarks like OneMax must be phrased
as minimization (D − count_ones) before being plugged in.
Structs§
- Binary
GaConfig - Static configuration for a
BinaryGeneticAlgorithmrun. - Binary
GaState - State for
BinaryGeneticAlgorithm. - Binary
Genetic Algorithm - Binary-coded canonical Genetic Algorithm.