Skip to main content

Module selection

Module selection 

Source
Expand description

Parent-selection operators.

Selection operators turn a fitness tensor into winner indices that the caller uses (via Tensor::select) to gather parents out of the population. The baseline is host-side sampling + a single device gather; a fused kernel variant is tracked as follow-up work.

§Fitness convention

Fitness values are interpreted as “lower is better” (cost). Tournament selection picks the smaller of the two sampled fitnesses.

Functions§

tournament_indices_host
Binary tournament selection over a fitness slice.
tournament_select
Gather n_winners rows out of the population by tournament.
truncation_indices_host
Truncation selection: returns the indices of the top_k lowest- fitness members.
truncation_select
Gather the top_k lowest-fitness rows out of the population.