GEPA Native (SkyDiscover)
Stored-parent reflective evolution with an elite pool, rejection history, and LLM-mediated merge.
# GEPA Native (SkyDiscover)
This scaffold is a Galapagos-native port of
`skydiscover/search/gepa_native` from SkyDiscover commit
`4734f324c4c3909eb3c8a4bc72a4ca34e6e679ed`.
It is intentionally separate from the `gepa` scaffold. `gepa` follows the official
`gepa-ai/gepa` algorithm contract; `gepa_native` is SkyDiscover's independent, stored-parent
heuristic.
## Algorithm
Each normal iteration:
1. runs a previously scheduled merge before parent selection;
2. chooses a parent with epsilon-greedy selection (or `best` / metric-front `pareto`);
3. mutates and evaluates it, retrying parse/invalid-result failures up to three times;
4. admits the child only when its stored score is strictly greater than its stored parent's;
5. retains rejected mutations in a bounded reflective history;
6. schedules an additional full-rewrite merge after every accepted mutation; and
7. triggers another merge after 15 iterations without a new global best.
Normal acceptance is strict (`child > parent`). A merge is accepted on equality
(`merged >= max(parent_a, parent_b)`), matching the source controller.
The population keeps every accepted program in a full archive while using a nominal 40-member
elite pool for sampling. Per-metric leaders provide both prompt context and complementary merge
candidates. Rejected normal mutations never enter the accepted archive.
## Galapagos integration
The task supplies the evaluator, and the shared Galapagos loop remains sequential. All native
controller behavior is isolated inside `GepaNativeScaffold`; no common scaffold algorithm is
modified.
Galapagos checkpoints additionally preserve the selection RNG cursor and controller merge state.
SkyDiscover's native checkpoint omits those cursors, so this makes a resumed Galapagos run match an
uninterrupted run without changing fresh-run behavior.
## Configuration
The bundled `config.yaml` reproduces SkyDiscover's defaults. Useful overrides include:
- `population.acceptance_gating`
- `selection_policy.candidate_selection_strategy`
- `selection_policy.epsilon`
- `proposer.use_merge`
- `general.merge_after_stagnation`
- `proposer.max_merge_attempts`