Behavior for selecting which program candidate to mutate.
Candidate selection strategies balance exploration and exploitation in the optimization search space.
Summary
Callbacks
Select a candidate program index for mutation.
Callbacks
@callback select(term(), GEPA.State.t(), :rand.state() | nil) :: {GEPA.Types.program_idx(), :rand.state()} | {GEPA.Types.program_idx(), term(), :rand.state()}
Select a candidate program index for mutation.
Parameters
selector_state: Struct or module implementing the selection logicstate: Current optimization staterand_state: Erlang random state (optional, for stochastic selectors)
Returns
Stateless selectors: {program_idx, new_rand_state}
Stateful selectors: {program_idx, updated_selector, new_rand_state}