Dsxir. Optimizer. SIMBA. Strategy behaviour
(dsxir v0.5.0)
Copy Markdown
Behaviour for SIMBA candidate-mutation strategies.
Each strategy receives a trajectory bucket, the candidate program, and a context map, and either mutates the program or signals that the current candidate should be skipped.
Context keys carried by ctx:
batch_p10— 10th percentile score across all sampled trajectories in the mini-batch. Used by all strategies as the low-quality skip threshold.batch_p90— 90th percentile score. Used byAppendRuleto guard the bad trajectory selection.reflective_lm—{impl, config}tuple forwarded to the LM call inAppendRule. Not used byAppendDemo.source— the source program picked from the pool for this candidate.rng— current:randstate, threaded through strategies that need randomness.demo_input_field_maxlen— maximum character length for any input field value in an augmented demo.AppendDemotruncates longer values.
Summary
Callbacks
@callback apply(bucket :: map(), program :: Dsxir.Program.t(), ctx :: map()) :: {:ok, Dsxir.Program.t()} | :skip