A next-generation automatic algorithm design platform, making automated algorithm design more accessible and easier to use
See the code
From problem description to runnable evolutionary algorithm search — in one command.
LLM-driven automated algorithm design with evolutionary optimization
Website · Quickstart · Docs · Wiki
English | 中文
⭐ Star us on GitHub to earn 10$ bonus tokens for the Online Website!
llm4ad experiment mode.Traditionally, using Large Language Models for Automated Algorithm Design (LLM4AD) required a tedious, multi-step configuration pipeline. LLM4AD_Next destroys this entry barrier.
With LLM4AD_Next, after creating your directory, all of these painful steps are fully automated through an interactive conversational terminal. Just run:
uv run llm4ad chat
Our built-in AI-powered consultant will interview you, instantly understand your requirements, and automatically generate a ready-to-run pipeline (evaluator, algorithm skeleton, configuration, and debugger) so you can leap straight into producing Useful Algorithms.
llm4ad chat) — Your conversational AI consultant that generates the entire runnable app framework.llm4ad experiment mode to evolve algorithms and retain the original code when candidates do not improve their evaluation scores.Overview of the Automatic Heuristic Design (AHD) search methods from the original LLM4AD platform. Impl = whether the method has a working orchestrator implementation in code; Skill = whether an algorithm design skill is available for coding agents.
| Method | Impl | Skill | Method | Impl | Skill |
|---|---|---|---|---|---|
| -------- | -------- | ------- | -------- | -------- | ------- |
| IslandGA | ✅ Available | ✅ Available | FunSearch | ⏳ Pending | ✅ Available |
| Diverse Island GA | ✅ Available | ✅ Available | HillClimb | ⏳ Pending | ⏳ Pending |
| MEoH | ✅ Available | ✅ Available | LHNS | ⏳ Pending | ⏳ Pending |
| DyCA | ✅ Available | ✅ Available | LLaMEA | ⏳ Pending | ⏳ Pending |
| EoH | ✅ Available | ✅ Available | MLES | ⏳ Pending | ⏳ Pending |
| ReEvo | ✅ Available | ✅ Available | MOEA/D | ⏳ Pending | ✅ Available |
| MCTS-AHD | ✅ Available | ✅ Available | NSGA-II | ⏳ Pending | ✅ Available |
| PartEvo | ⏳ Pending | ⏳ Pending | |||
| RandSample | ⏳ Pending | ⏳ Pending |
Set evolution.type in your config and run llm4ad run <config.yaml>. See examples/config/config.complete.yaml for full examples.
evolution:
type: "eoh" # options include "diverse_island_ga", "island_ga", "eoh", "meoh", "reevo", "mcts_ahd", "dyca"
Modular skill definitions that enable coding agents to autonomously design algorithms. Give a coding agent this prompt:
I want you to design a [PROBLEM] solver using the [SKILL] method.
Skill: https://github.com/Optima-CityU/LLM4AD_Next/blob/develop/skills/algo-design/[SKILL]/SKILL.md
Task: /path/to/your/task/
Read the skill, read the task package, run [N] generations, give me the best algorithm.
See use_example for a complete TSP + EoH example.
| Case (↑ Max · ↓ Min) | LLM4AD Next | Published Results | Artifacts |
|---|---|---|---|
| 26 circles in a unit square ↑ | 2.6359830833Δ +1.21e-7 | AlphaEvolve 2.6358627564LoongFlow 2.6359829625 | Code · Experience · Result |
| 21 circles in a perimeter-four rectangle ↑ | 2.3658323757Δ +1.46e-7 | AlphaEvolve 2.3658321334LoongFlow 2.3658322295 | Code · Experience · Result |
| 11 unit hexagons in a regular hexagon ↓ | 3.9246884168Δ +0.00421844 | AlphaEvolve 3.930092LoongFlow 3.9289068555 | Code · Experience · Result |
| 16-point maximum/minimum distance ratio ↓ | 12.8892299077Δ +1.36e-5 | AlphaEvolve 12.8892661120LoongFlow 12.8892435472 | Code · Experience · Result |
| Uncertainty inequality ↓ | 0.352099104419Δ +2.68e-12 | AlphaEvolve 0.352099104423LoongFlow 0.352099104422 | Code · Experience · Result |
| Second autocorrelation inequality ↑ | 0.9053043553Δ +0.00260225 | AlphaEvolve 0.8962799442LoongFlow 0.9027021077 | Code · Experience · Result |
| First autocorrelation inequality ↓ | 1.5074598117Δ -0.00216584 | AlphaEvolve 1.5052939684LoongFlow 1.5095273149 | Code · Experience · Result |
| Minimum overlap ↓ | 0.3809250447Δ -1.13e-5 | AlphaEvolve 0.380924LoongFlow 0.3809137564 | Code · Experience · Result |
| Heilbronn problem in an equilateral triangle ↑ | 0.0365298881928Δ -1.69e-9 | AlphaEvolve 0.0365298898800LoongFlow 0.0365298898793 | Code · Experience · Result |
Use the online demo from Quick Start, or open it directly: Launch Online Demo.
No setup, no API key needed — just open the link and start designing algorithms.
Requires Python 3.12+ (pinned in .python-version) and uv (recommended) or pip. A plain uv sync sets up everything, including the chatv2 AI build agent, out of the box.
# Clone the repository
git clone https://github.com/Optima-CityU/LLM4AD_Next.git
cd LLM4AD_Next
# Install dependencies
uv sync
# Configure your LLM provider (see Global Settings section below)
# Or set environment variables directly:
export LLM_BASE_URL="https://api.openai.com/v1"
export LLM_API_KEY="your-api-key"
export LLM_MODEL="gpt-4o"
# Option 1: Interactive configuration (recommended for new users)
llm4ad chat
# Option 2: Run with an existing config file
llm4ad run examples/applications/tsp_benchmark_python/config.yaml
For optional dependency groups (infra, providers, eval, dev, docs, all) and uv installation, see the Installation Guide.
Create ~/.llm4ad/settings.yaml to configure shared providers across all projects:
providers:
- name: default
type: openai
api_key: ${OPENAI_API_KEY}
model: gpt-4o
- name: anthropic
type: anthropic
api_key: ${ANTHROPIC_API_KEY}
model: claude-sonnet-4-20250514
Task configs then only need the provider name — credentials and model are resolved from global settings automatically.
For CLI commands, the interactive chat workflow, the Evolve-Block Advisor / Recommender, and the Python API, see the Documentation.
# Serve documentation with live reload
mkdocs serve
# Build static documentation
mkdocs build
LLM4AD_Next/
├── src/
│ ├── llm4ad/ # Core Python package and CLI
│ │ ├── agent/ # Conversational task-building agent
│ │ ├── advisor/ # Evolve-block advisor and recommender
│ │ ├── builder/ # Runnable task-package builder
│ │ ├── config/ # Configuration schemas and settings
│ │ ├── planner/ # Algorithm planning
│ │ ├── coder/ # Code generation
│ │ ├── evaluator/ # Candidate evaluation
│ │ ├── orchestrator/ # Evolution workflows
│ │ ├── memory/ # Memory integration
│ │ └── infra/ # Providers and shared infrastructure
│ ├── backend/ # FastAPI, workers, migrations, and API tests
│ └── frontend/ # React/Vite web app and UI tests
├── skills/ # Agent skills
│ ├── algo-design/ # Algorithm design methods
│ ├── autodiscovery/ # Paper-to-evolvable-task workflow
│ ├── autorebuttal/ # Reviewer response and AC summary workflow
│ ├── document-knowledge-organizer/ # Markdown knowledge organization
│ ├── llm4ad-task-builder/ # Runnable task-package creation
│ ├── openair-proposal/ # Staged research proposal writing
│ ├── research-stage-publication/ # Stage result publication
│ └── typst-author/ # Typst document authoring
├── docker/ # Compose stacks and runtime support
├── third_party/ # Integrated upstream submodules
│ ├── CloudCLI/ # Cloud development workspace
│ └── MindMemOS/ # Memory service and SDK
├── examples/ # Example tasks and benchmarks
│ ├── applications/ # Runnable tasks and benchmarks (examples below)
│ │ ├── alphaevolve_math_benchmark/ # Mathematical optimization cases
│ │ ├── lunarlander_python/ # Reinforcement learning example
│ │ ├── sorting_benchmark/ # Sorting algorithm benchmark
│ │ └── tsp_benchmark_python/ # Traveling-salesperson benchmark
│ ├── auto_applications/ # Automatic task-building examples
│ │ ├── from_code/ # Build tasks from existing code
│ │ └── from_description/ # Build tasks from a description
│ └── config/ # Sample configuration files
├── tests/ # Core Python test suite
├── docs/ # English and Chinese documentation
└── scripts/ # Repository utilities
Contributions are welcome! Please read our Contributing Guide for details.
# Set up development environment
uv sync --extra all
# Run tests
pytest
# Format code
black src/ tests/
ruff check src/ tests/ --fix
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
The AutoResearch module is based on / adapted from AutoResearchClaw (MIT License). Its original copyright and license notice are retained in THIRD_PARTY_LICENSES.md.
Scan the QR code with WeChat to join the LLM4AD_Next community group.
A next-generation automatic algorithm design platform, making automated algorithm design more accessible and easier to use
See the code
From problem description to runnable evolutionary algorithm search — in one command.
LLM-driven automated algorithm design with evolutionary optimization
Website · Quickstart · Docs · Wiki
English | 中文
⭐ Star us on GitHub to earn 10$ bonus tokens for the Online Website!
llm4ad experiment mode.Traditionally, using Large Language Models for Automated Algorithm Design (LLM4AD) required a tedious, multi-step configuration pipeline. LLM4AD_Next destroys this entry barrier.
With LLM4AD_Next, after creating your directory, all of these painful steps are fully automated through an interactive conversational terminal. Just run:
uv run llm4ad chat
Our built-in AI-powered consultant will interview you, instantly understand your requirements, and automatically generate a ready-to-run pipeline (evaluator, algorithm skeleton, configuration, and debugger) so you can leap straight into producing Useful Algorithms.
llm4ad chat) — Your conversational AI consultant that generates the entire runnable app framework.llm4ad experiment mode to evolve algorithms and retain the original code when candidates do not improve their evaluation scores.Overview of the Automatic Heuristic Design (AHD) search methods from the original LLM4AD platform. Impl = whether the method has a working orchestrator implementation in code; Skill = whether an algorithm design skill is available for coding agents.
| Method | Impl | Skill | Method | Impl | Skill |
|---|---|---|---|---|---|
| -------- | -------- | ------- | -------- | -------- | ------- |
| IslandGA | ✅ Available | ✅ Available | FunSearch | ⏳ Pending | ✅ Available |
| Diverse Island GA | ✅ Available | ✅ Available | HillClimb | ⏳ Pending | ⏳ Pending |
| MEoH | ✅ Available | ✅ Available | LHNS | ⏳ Pending | ⏳ Pending |
| DyCA | ✅ Available | ✅ Available | LLaMEA | ⏳ Pending | ⏳ Pending |
| EoH | ✅ Available | ✅ Available | MLES | ⏳ Pending | ⏳ Pending |
| ReEvo | ✅ Available | ✅ Available | MOEA/D | ⏳ Pending | ✅ Available |
| MCTS-AHD | ✅ Available | ✅ Available | NSGA-II | ⏳ Pending | ✅ Available |
| PartEvo | ⏳ Pending | ⏳ Pending | |||
| RandSample | ⏳ Pending | ⏳ Pending |
Set evolution.type in your config and run llm4ad run <config.yaml>. See examples/config/config.complete.yaml for full examples.
evolution:
type: "eoh" # options include "diverse_island_ga", "island_ga", "eoh", "meoh", "reevo", "mcts_ahd", "dyca"
Modular skill definitions that enable coding agents to autonomously design algorithms. Give a coding agent this prompt:
I want you to design a [PROBLEM] solver using the [SKILL] method.
Skill: https://github.com/Optima-CityU/LLM4AD_Next/blob/develop/skills/algo-design/[SKILL]/SKILL.md
Task: /path/to/your/task/
Read the skill, read the task package, run [N] generations, give me the best algorithm.
See use_example for a complete TSP + EoH example.
| Case (↑ Max · ↓ Min) | LLM4AD Next | Published Results | Artifacts |
|---|---|---|---|
| 26 circles in a unit square ↑ | 2.6359830833Δ +1.21e-7 | AlphaEvolve 2.6358627564LoongFlow 2.6359829625 | Code · Experience · Result |
| 21 circles in a perimeter-four rectangle ↑ | 2.3658323757Δ +1.46e-7 | AlphaEvolve 2.3658321334LoongFlow 2.3658322295 | Code · Experience · Result |
| 11 unit hexagons in a regular hexagon ↓ | 3.9246884168Δ +0.00421844 | AlphaEvolve 3.930092LoongFlow 3.9289068555 | Code · Experience · Result |
| 16-point maximum/minimum distance ratio ↓ | 12.8892299077Δ +1.36e-5 | AlphaEvolve 12.8892661120LoongFlow 12.8892435472 | Code · Experience · Result |
| Uncertainty inequality ↓ | 0.352099104419Δ +2.68e-12 | AlphaEvolve 0.352099104423LoongFlow 0.352099104422 | Code · Experience · Result |
| Second autocorrelation inequality ↑ | 0.9053043553Δ +0.00260225 | AlphaEvolve 0.8962799442LoongFlow 0.9027021077 | Code · Experience · Result |
| First autocorrelation inequality ↓ | 1.5074598117Δ -0.00216584 | AlphaEvolve 1.5052939684LoongFlow 1.5095273149 | Code · Experience · Result |
| Minimum overlap ↓ | 0.3809250447Δ -1.13e-5 | AlphaEvolve 0.380924LoongFlow 0.3809137564 | Code · Experience · Result |
| Heilbronn problem in an equilateral triangle ↑ | 0.0365298881928Δ -1.69e-9 | AlphaEvolve 0.0365298898800LoongFlow 0.0365298898793 | Code · Experience · Result |
Use the online demo from Quick Start, or open it directly: Launch Online Demo.
No setup, no API key needed — just open the link and start designing algorithms.
Requires Python 3.12+ (pinned in .python-version) and uv (recommended) or pip. A plain uv sync sets up everything, including the chatv2 AI build agent, out of the box.
# Clone the repository
git clone https://github.com/Optima-CityU/LLM4AD_Next.git
cd LLM4AD_Next
# Install dependencies
uv sync
# Configure your LLM provider (see Global Settings section below)
# Or set environment variables directly:
export LLM_BASE_URL="https://api.openai.com/v1"
export LLM_API_KEY="your-api-key"
export LLM_MODEL="gpt-4o"
# Option 1: Interactive configuration (recommended for new users)
llm4ad chat
# Option 2: Run with an existing config file
llm4ad run examples/applications/tsp_benchmark_python/config.yaml
For optional dependency groups (infra, providers, eval, dev, docs, all) and uv installation, see the Installation Guide.
Create ~/.llm4ad/settings.yaml to configure shared providers across all projects:
providers:
- name: default
type: openai
api_key: ${OPENAI_API_KEY}
model: gpt-4o
- name: anthropic
type: anthropic
api_key: ${ANTHROPIC_API_KEY}
model: claude-sonnet-4-20250514
Task configs then only need the provider name — credentials and model are resolved from global settings automatically.
For CLI commands, the interactive chat workflow, the Evolve-Block Advisor / Recommender, and the Python API, see the Documentation.
# Serve documentation with live reload
mkdocs serve
# Build static documentation
mkdocs build
LLM4AD_Next/
├── src/
│ ├── llm4ad/ # Core Python package and CLI
│ │ ├── agent/ # Conversational task-building agent
│ │ ├── advisor/ # Evolve-block advisor and recommender
│ │ ├── builder/ # Runnable task-package builder
│ │ ├── config/ # Configuration schemas and settings
│ │ ├── planner/ # Algorithm planning
│ │ ├── coder/ # Code generation
│ │ ├── evaluator/ # Candidate evaluation
│ │ ├── orchestrator/ # Evolution workflows
│ │ ├── memory/ # Memory integration
│ │ └── infra/ # Providers and shared infrastructure
│ ├── backend/ # FastAPI, workers, migrations, and API tests
│ └── frontend/ # React/Vite web app and UI tests
├── skills/ # Agent skills
│ ├── algo-design/ # Algorithm design methods
│ ├── autodiscovery/ # Paper-to-evolvable-task workflow
│ ├── autorebuttal/ # Reviewer response and AC summary workflow
│ ├── document-knowledge-organizer/ # Markdown knowledge organization
│ ├── llm4ad-task-builder/ # Runnable task-package creation
│ ├── openair-proposal/ # Staged research proposal writing
│ ├── research-stage-publication/ # Stage result publication
│ └── typst-author/ # Typst document authoring
├── docker/ # Compose stacks and runtime support
├── third_party/ # Integrated upstream submodules
│ ├── CloudCLI/ # Cloud development workspace
│ └── MindMemOS/ # Memory service and SDK
├── examples/ # Example tasks and benchmarks
│ ├── applications/ # Runnable tasks and benchmarks (examples below)
│ │ ├── alphaevolve_math_benchmark/ # Mathematical optimization cases
│ │ ├── lunarlander_python/ # Reinforcement learning example
│ │ ├── sorting_benchmark/ # Sorting algorithm benchmark
│ │ └── tsp_benchmark_python/ # Traveling-salesperson benchmark
│ ├── auto_applications/ # Automatic task-building examples
│ │ ├── from_code/ # Build tasks from existing code
│ │ └── from_description/ # Build tasks from a description
│ └── config/ # Sample configuration files
├── tests/ # Core Python test suite
├── docs/ # English and Chinese documentation
└── scripts/ # Repository utilities
Contributions are welcome! Please read our Contributing Guide for details.
# Set up development environment
uv sync --extra all
# Run tests
pytest
# Format code
black src/ tests/
ruff check src/ tests/ --fix
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
The AutoResearch module is based on / adapted from AutoResearchClaw (MIT License). Its original copyright and license notice are retained in THIRD_PARTY_LICENSES.md.
Scan the QR code with WeChat to join the LLM4AD_Next community group.