CodeEvolve Beats AlphaEvolve on Algorithm Discovery at a Tenth of the Cost
An open-source framework pairs island-based genetic search with LLM ensembles to match DeepMind's AlphaEvolve at roughly one-tenth the cost.
ProTakeaways
- CodeEvolve is a new open-source evolutionary coding agent that ships on GitHub under Apache 2.0.
- Matches or beats AlphaEvolve on 5 of 9 benchmarks and beats OpenEvolve and ShinkaEvolve on 6 of 9 under matched budgets.
- With Qwen3-Coder-30B it surpasses AlphaEvolve at roughly 10x lower cost than frontier closed-source ensembles.
- Combines island genetic search, CVT-MAP-Elites, inspiration-based crossover, meta-prompting, and depth-based refinement.
- Robust across GPT-4.1, Claude Sonnet 4.5, o4-mini, Gemini-2.5, and gpt-oss-20B without retuning prompts or operators.
- Underperforms on autocorrelation inequality problems requiring specialized analytic constructions; paper here.
A team from Inter Science and the Federal University of Minas Gerais has released CodeEvolve, an open-source framework that pairs large language models with evolutionary search to discover algorithms end-to-end. On the AlphaEvolve benchmark suite, CodeEvolve matches or surpasses the reported AlphaEvolve results on 5 of 9 problems and, under matched conditions, outperforms the open-source frameworks OpenEvolve and ShinkaEvolve on 6 of 9. The more striking result: it does this with an open-weight 30B model at roughly a tenth of the API cost of frontier closed-source ensembles.
The closed door behind algorithmic discovery
Coupling LLMs with evolutionary algorithms has become the dominant recipe for automated algorithm discovery. The idea is simple: treat the LLM as a semantically aware mutation operator, iteratively refining a population of candidate programs against a fitness function. FunSearch first showed this could beat human baselines, and Google DeepMind's AlphaEvolve pushed the paradigm further by evolving entire codebases to reach state-of-the-art on hard math and systems problems.
The catch is reproducibility. AlphaEvolve is closed-source and relies on proprietary frontier models, and existing open-source replicas like OpenEvolve and ShinkaEvolve have struggled to close the quality gap. CodeEvolve targets exactly this gap: an evolutionary coding agent that couples an islands-based genetic algorithm with modular LLM orchestration, using execution feedback and task-specific metrics to guide selection and variation, and balancing exploration and exploitation through context-aware recombination, adaptive meta-prompting, and targeted refinement of promising solutions.
How the search machinery fits together
CodeEvolve borrows the classic island model from genetic algorithms: multiple populations evolve independently in parallel and periodically swap their top performers. On top of that, four ideas do the heavy lifting.
- Weighted LLM ensemble. A pool of models is sampled per generation step according to configurable weights. You can wire high-temperature models to exploration and stronger ones to exploitation. Edits are proposed as diff-based SEARCH/REPLACE patches rather than full rewrites.
- Depth-based exploitation. A parent solution is picked by rank, and the LLM is shown the parent, its originating prompt, and up to
knearest ancestors. That ancestral context steers the model toward incremental refinement instead of throwing out the strategy. - Meta-prompting exploration. A separate
MetaPromptingLLMrewrites the prompt itself using a sampled solution as feedback. The rewritten prompt then generates a new candidate, deliberately without ancestor context, so the search can leave a stuck lineage. - Inspiration-based crossover. Because diff-based edits work on a single parent, traditional two-parent crossover is awkward. Instead, the LLM is given a set of "inspiration" solutions alongside the parent and asked to fold their high-level strategies into targeted edits. Effectively multi-parent crossover through the context window.
Diversity is preserved by a per-island CVT-MAP-Elites archive, a variant of quality-diversity search that partitions the feature space via centroidal Voronoi tessellations rather than a regular grid. Users define feature descriptors like code properties or runtime profile, and the archive keeps the best solution per cell so crossover always has interesting material to draw from. A Plateau Scheduler nudges the exploration probability up when best-so-far fitness stalls and anneals it back once progress resumes.
The step-by-step loop
At each epoch, on each island, the framework does the following:
- Sample a coin against the current exploration probability
p_explr. - If exploiting: rank-sample a parent solution and inspirations, walk up its ancestor chain, and ask the ensemble to propose a diff that improves it.
- If exploring: uniformly sample a solution, inspirations, and a prompt. Use the meta-prompting model to rewrite the prompt, then have the ensemble generate a fresh solution.
- Execute the candidate in a sandbox with strict CPU, memory, and timeout limits. Failed executions get fitness zero, and their logs are recycled as feedback for future prompts.
- Update the MAP-Elites archive if the candidate improves its cell.
- Every migration interval, copy top performers to neighboring islands along a ring topology, but never migrate an island's single best solution.
Where it lands on the benchmarks
Evaluation covers nine instances from the AlphaEvolve suite (circle packing in squares and rectangles, hexagon packing, min-max-min distance point placement, and two autocorrelation inequality problems) plus three EoH heuristic-design problems: Online Bin Packing, TSP, and Flow Shop Scheduling.
Against AlphaEvolve's reported numbers, CodeEvolve matches or surpasses the reported AlphaEvolve results on 5 of 9 problems and establishes new best-known results on MinimizeMaxMinDist and CirclePackingSquare with n=32. In a matched-budget head-to-head against OpenEvolve and ShinkaEvolve using the same Qwen3-Coder-30B backbone, CodeEvolve wins best-solution on 6 of 9 problems and best-mean on 6 of 9. On heuristic design it holds its own against EoH's tuned pipeline using only default configurations and a single open-weight LLM.
The cost story is the real headline
The paper reports a striking cost-quality trade-off. With the open-weight Qwen3-Coder-30B backbone, it surpasses the reported AlphaEvolve score on both CirclePackingSquare instances at roughly an order of magnitude lower cost than a frontier closed-source ensemble. On CirclePackingSquare with n=26, Qwen3-Coder-30B beat AlphaEvolve after roughly 900 model calls at about $6, while the Gemini-2.5 ensemble needed around 400 calls at about $35. The framework was also validated without retuning across GPT-4.1, Claude Sonnet 4.5, o4-mini, and gpt-oss-20B backbones.
Ablations underline that no single trick carries the results. Depth-only configurations do not beat AlphaEvolve; inspiration-only configurations do, but with worse sample efficiency; and only the full method with CVT-MAP-Elites and ring-topology migration produces the top scores. The authors are explicit that the orchestration, not any individual operator, is the contribution.
What it is not good at
CodeEvolve visibly underperforms on the two autocorrelation inequality benchmarks, where both AlphaEvolve and ThetaEvolve substantially win. The authors suggest that problems requiring highly specialized analytic constructions may not be well suited to a purely combinatorial LLM search, and might need domain adaptations or stronger backbone models. The comparisons with AlphaEvolve and ThetaEvolve also rely on reported numbers rather than reruns, since neither is directly reproducible.
When to reach for it
The framework is a fit for problems where you can express a numerical fitness function and cheaply execute candidate programs in a sandbox: packing, scheduling, routing, heuristic design, kernel or inference-loop optimization, symbolic construction. The recommended defaults are compact: 5 to 10 islands, 200 to 250 epochs, ring migration at rate 0.1, initial exploration rate 0.2 with the Plateau Scheduler, CVT-MAP-Elites with fitness and evaluation time as descriptors, ancestor depth of 3 to 5, and 2 to 3 inspirations. Task-specific meta-prompt tuning is optional.
The full framework, experiment data, and hyperparameter guides are on GitHub under Apache 2.0, and the repo positions itself as a transparent, open-source framework that implements the high-level concepts of LLM-driven evolution, allowing for reproducible research and collective innovation. For anyone who wanted to poke at AlphaEvolve's ideas but did not want to burn frontier-API budgets to do it, that combination of transparency and open-weight cost efficiency is the practical breakthrough.