OpenEvolve
Island-model MAP-Elites evolutionary search with diff mutation (the open AlphaEvolve).
OpenEvolve is the open-source re-implementation of Google DeepMind's AlphaEvolve, and in Galapagos it serves as the canonical evolutionary baseline that every other method is compared against. It evolves a population of programs by repeatedly picking a parent, showing an LLM the parent plus a handful of inspiring neighbours, and asking for a small SEARCH/REPLACE diff that improves the program's measured performance.
The population is not a flat pool but a quality-diversity store. Programs are spread across several islands, and within each island they are placed into the cells of a MAP-Elites grid whose axes are behaviour descriptors — by default a complexity axis (code length) and a diversity axis (a fast token/length/char distance from a reference sample). Each cell keeps only its single fittest elite, so the grid simultaneously preserves high performers and structurally distinct solutions, while a separate global archive and the full program store back the exploit and random sampling tiers.
Parent selection is a three-tier explore/exploit scheme: most of the time the method exploits a strong program drawn from the global archive, sometimes it explores a uniform-random program from the current island, and occasionally it takes a fitness-weighted draw. Islands evolve in round-robin rotation and stay loosely coupled through periodic ring migration, where the best programs of each island are copied to its two neighbours. This island-plus-migration structure is what keeps the search from collapsing onto a single lineage and gives OpenEvolve its characteristic breadth.
This Galapagos scaffold is a faithful port of the upstream `ProgramDatabase` and parallel controller: the feature scaling uses global running min/max, migration is lazy on per-island generation counters, and the proposer applies the LLM's SEARCH/REPLACE diff by **whole-line matching** (the reference `apply_diff`), with a response carrying no valid diff block treated as a no-op — exactly as the reference discards it in `diff_based` mode (no full-rewrite fallback).
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.
OpenEvolve (open implementation of AlphaEvolve, Google DeepMind)