Expand description
Recombination / crossover operators for real-valued genomes.
Operators in this module consume two parent tensors of shape
(N, D) and produce an offspring tensor of the same shape. Seeding
the per-generation RNG via B::seed(device, ...) is the caller’s
responsibility — see crate::strategy for the canonical pattern.
§BLX-α
For each gene, child ∈ U(min(a,b) − α·|a−b|, max(a,b) + α·|a−b|).
A common default is α = 0.5.
§Uniform
For each gene, child takes parent A’s value with probability p and
parent B’s otherwise. Pure swap crossover — no blending — so the
distribution is exactly preserved. A binary-genome variant
(binary_uniform_crossover) operates on Tensor<B, 2, Int> with
values in {0, 1}.
Functions§
- binary_
uniform_ crossover - Binary uniform crossover on
Tensor<B, 2, Int>populations. - blx_
alpha - BLX-α crossover between two parent populations.
- uniform_
crossover - Uniform crossover: per-gene Bernoulli swap between parents.