Skip to main content

Module mutation

Module mutation 

Source
Expand description

Mutation operators for real-valued genomes.

Every mutation is an in-place-ish tensor transform: it consumes a population tensor and returns a new one with noise added per gene. Tensor ops already compose nicely with Burn’s JIT fuser, so these functions are just thin wrappers around randn_like-style patterns.

Functions§

bit_flip_mutation
Bit-flip mutation on a binary Tensor<B, 2, Int> population.
gaussian_mutation
Isotropic Gaussian mutation with scalar σ.
gaussian_mutation_per_row
Per-row anisotropic Gaussian mutation.
uniform_reset
Uniform-reset mutation with per-gene probability p.