ScriptsMay 24, 2026·2 min read

OpenEvolve — Open-Source Implementation of AlphaEvolve

An open-source evolutionary code optimization framework inspired by DeepMind's AlphaEvolve, using LLM ensembles to iteratively discover better algorithms and solutions.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
OpenEvolve
Universal CLI install command
npx tokrepo install c741f205-57ad-11f1-9bc6-00163e2b0d79

Introduction

OpenEvolve is an open-source implementation of the evolutionary code optimization approach pioneered by DeepMind's AlphaEvolve. It uses ensembles of LLMs as mutation operators within an evolutionary algorithm to iteratively discover improved code solutions for optimization problems, from sorting algorithms to mathematical conjectures.

What OpenEvolve Does

  • Evolves code solutions using LLM-guided mutations and crossover
  • Maintains a population of candidate programs ranked by fitness
  • Supports multi-objective optimization with Pareto frontiers
  • Runs distributed evaluations across multiple workers
  • Provides structured logging of evolutionary trajectories

Architecture Overview

OpenEvolve implements an island-model evolutionary algorithm where each island maintains a population of code candidates. LLMs serve as intelligent mutation operators, generating variations guided by fitness feedback and the current best solutions. An evaluation harness scores candidates against user-defined fitness functions. The framework supports multiple LLM backends running in parallel to increase mutation diversity.

Self-Hosting & Configuration

  • Install via pip with Python 3.10+
  • Define problems as Python modules with fitness functions
  • Configure LLM providers (OpenAI, Anthropic, local models) in YAML
  • Set population size, mutation rate, and generation count
  • Supports distributed execution via Ray for large-scale searches

Key Features

  • Multi-LLM ensemble mutations for diverse search strategies
  • Automatic prompt engineering based on fitness landscape feedback
  • Checkpoint and resume for long-running evolutionary searches
  • Visualization of fitness trajectories and population diversity
  • Pluggable fitness functions for any domain

Comparison with Similar Tools

  • FunSearch (DeepMind) — closed-source; OpenEvolve replicates the core approach openly
  • EvoTorch — focuses on neural network evolution; OpenEvolve evolves code artifacts
  • LLM-based code generation — single-shot; OpenEvolve iteratively refines over generations
  • Genetic programming (DEAP) — syntax-tree mutations; OpenEvolve uses semantic LLM mutations

FAQ

Q: What kinds of problems can OpenEvolve solve? A: Any problem expressible as a Python program with a measurable fitness metric: algorithms, heuristics, math proofs, configuration optimization.

Q: How many LLM calls does a typical run require? A: Depends on population size and generations. A small run (pop=20, gen=50) uses roughly 1000 LLM calls. Larger searches scale linearly.

Q: Can I use local models instead of API providers? A: Yes. OpenEvolve supports any OpenAI-compatible endpoint, including Ollama, vLLM, and LM Studio.

Q: Is the approach guaranteed to find optimal solutions? A: No. Like all evolutionary methods, it finds good-enough solutions. Longer runs and larger populations improve results but don't guarantee optimality.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets