Expand description
WeightOnly — a Strategy wrapper that ties a flat-genome strategy to
a concrete Burn Module for weight-only neuroevolution.
WeightOnly<B, S, M> composes an inner S: Strategy<B, Genome = Tensor<B, 2>> with a fixed-topology module M. It owns a
ModuleReshaper (the single source of truth for the genome width,
num_params) but performs no reshaping in
ask/tell — the genome stays a flat (pop_size, num_params) tensor and
every Strategy method delegates verbatim to the inner strategy. Reshaping
to a module happens only at the fitness boundary, in
ModuleEvalFn (supervised fitness)
or rlevo_hybrid’s RolloutFitness (RL fitness).
This follows the MemeticWrapper
pattern (ADR 0016): the inner strategy owns all population state; the
wrapper adds one orthogonal concern (here, the module binding).
§Gradient isolation
B: Backend, not AutodiffBackend. A caller holding an autodiff
module calls .valid() before constructing the wrapper, so gradient
tracking cannot leak into evolution — enforced at the type level.
Structs§
- Weight
Only - Composes a flat-genome
Strategywith a fixed-topology BurnModule.