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`
The six components this scaffold snaps together. Each block names its concrete implementation.
The set of candidate solutions in play — the gene pool the search evolves over.
Decides which genomes survive and reproduce — tournament, elitism, novelty, or your own policy.
Assembles the context handed to the model — parents, feedback, instructions, examples.
The LLM-driven variation operator — proposes new candidates by mutation and crossover.
Scores each candidate against the task — the fitness signal that drives selection.
SkyDiscover gepa_native at commit 4734f324c4c3909eb3c8a4bc72a4ca34e6e679ed — github.com/skydiscover-ai/skydiscover
galapagos run --scaffold gepa_native --task circle_packing \
--proposer.model_name openai/gpt-4o-mini \
--proposer.api_base openrouter