GEPA.Strategies.CandidateSelector behaviour (GEPA v0.3.0)

Copy Markdown View Source

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

select(term, t, arg3)

Select a candidate program index for mutation.

Parameters

  • selector_state: Struct or module implementing the selection logic
  • state: Current optimization state
  • rand_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}