SakanaAI/ShinkaEvolve
ShinkaEvolve: Towards Open-Ended and Sample-Efficient Program Evolution 🧬
What it solves
ShinkaEvolve automates the improvement of scientific code by combining large language models (LLMs) with evolutionary algorithms. It helps researchers and developers explore and optimize programs when there's a clear way to verify correctness and measure performance, without manually writing every improvement.
How it works
It maintains a population of program variants that evolve over generations. An ensemble of LLMs acts as mutation operators, suggesting code changes (patches) to improve the programs. Each candidate is evaluated against a verifier (the user provides an evaluation program). The framework supports parallel evaluation locally or on a Slurm cluster, and keeps an archive of successful solutions to transfer knowledge between different evolutionary "islands". It also includes features like dynamic model selection, meta-recommendations, novelty generation, and prompt evolution.
Who it’s for
Researchers and developers working on scientific or algorithmic tasks where they can define a verifier and want to automatically optimize performance metrics (e.g., speed, accuracy) while preserving correctness. It's also useful for those who want to explore creative program generation (e.g., ASCII art) or evolve solutions in various languages (Python, Julia, Fortran, Wolfram, Verilog).
Highlights
- Combines LLMs with evolutionary search for open-ended program evolution.
- Supports parallel evaluation locally or on Slurm clusters.
- Maintains an archive of successful solutions for knowledge transfer.
- Includes a Python API, CLI (
shinka_launch), and WebUI for monitoring. - Provides examples for circle packing, Game 2048, Julia prime counting, Fortran heat diffusion, Wolfram GCD sum, novelty generation, and Verilog RTL optimization.
- Offers agent skills for use within coding agents (Claude Code, Codex) for setup, conversion, evolution, and inspection.
- Supports local LLMs and embeddings, and can log to Weights & Biases.
Related
- Project
- Project
- Project
- Dispatch
- Project