Optima-CityU/LLM4AD_Next
A next-generation automatic algorithm design platform, making automated algorithm design more accessible and easier to use
📦 What is LLM4AD Next?
LLM4AD Next (the successor to the original LLM4AD project) is a Python‑based platform that lets you describe a problem in natural language and instantly get a complete, runnable evolutionary‑algorithm search pipeline. It combines:
- a conversational AI “consultant” (
llm4ad chat) that interviews you and writes the scaffolding code, configuration files and an evaluator; - a collection of search/orchestrator methods (IslandGA, Diverse Island GA, EoH, MEoH, ReEvo, MCTS‑AHD, etc.) that evolve algorithm implementations;
- Algorithm‑design skills that encode how to build specific heuristics (e.g., EoH, MOEA/D) which the AI can invoke automatically.
The end‑to‑end flow is: problem description → AI‑generated project → evolutionary optimisation → best algorithm code – all triggered from a single command.
🚀 Key Features (as described in the README)
| Feature | What it does |
|---|---|
LLM‑powered interactive configuration (llm4ad chat) |
Conversational terminal that asks you about the task and creates a ready‑to‑run project (evaluator, algorithm skeleton, config, debugger). |
| Automatic heuristic design (AHD) search methods | Built‑in orchestrators such as IslandGA, Diverse Island GA, EoH, MEoH, ReEvo, MCTS‑AHD, DyCA, etc. (some already have Python implementations, others are marked pending). |
| Algorithm‑design skills | Modular skill definitions (e.g., EoH, FunSearch, MOEA/D) that let the coding agent autonomously design algorithms for a given problem. |
| Evolve‑Block Advisor & Recommender | Point the tool at any code repository; it scans, scores, and suggests which blocks of code are most promising to evolve. |
| AutoResearch workflow | An experimental mode (llm4ad experiment) that runs the AutoResearchClaw pipeline, evolving algorithms and only keeping improvements. |
| Long‑term memory (MindMemOS) | Global/project/task‑scoped memory with optional chat/embedding model bindings. |
| Web demo & Docker images | A hosted online demo (https://llm4ad-next.cn/) that requires no local install, plus versioned Docker images for reproducible local deployment. |
| Extensive examples | Benchmarks such as the AlphaEvolve Mathematics suite, TSP, lunar‑lander RL, sorting benchmarks, etc., with ready‑to‑run configs and result artifacts. |
🛠️ Installation & Quick Start
| Step | Command / Action |
|---|---|
| Clone | git clone https://github.com/Optima-CityU/LLM4AD_Next.git && cd LLM4AD_Next |
| Dependencies | Install uv (recommended) then run uv sync (or pip install -r requirements.txt). |
| Configure LLM provider | Set environment variables or create ~/.llm4ad/settings.yaml with provider info (OpenAI, Anthropic, etc.). |
| Run interactive builder | llm4ad chat – the AI will ask you about the problem and generate a full project. |
| Run a prepared example | llm4ad run examples/applications/tsp_benchmark_python/config.yaml |
| Online demo (no install) | Open https://llm4ad-next.cn/ and start designing algorithms in the browser. |
The package is published on PyPI (llm4ad‑next) and requires Python 3.12+.
📂 Project Layout (high‑level)
src/llm4ad/– core library: agents, advisors, builders, planners, coders, evaluators, orchestrators, memory, infra.skills/– reusable “skill” definitions for algorithm design, paper‑to‑task conversion, research‑stage writing, etc.examples/– ready‑to‑run benchmark tasks (math optimisation, TSP, RL, sorting) and auto‑application demos.docker/,frontend/,backend/– Docker compose, FastAPI backend, React/Vite UI for the web demo.docs/– MkDocs site with full user guide, installation, configuration, and contribution docs.
🎯 Typical Use‑Case Workflow
- Describe your problem (e.g., “find a high‑quality traveling‑salesperson route for 200 cities”).
- Run
llm4ad chat; the AI asks clarifying questions and creates a project folder containing:- an evaluator that can score candidate solutions,
- a skeleton algorithm (e.g., a GA template),
- a configuration file (
config.yaml) selecting a search method.
- Optionally tweak the config or add custom evaluation code.
- Execute
llm4ad run <config.yaml>– the selected evolutionary search runs, repeatedly generating and evaluating code variants. - When the evolution stops, the best‑performing algorithm code is saved and can be inspected or deployed.
📚 Documentation & Help
- Online docs:
docs/en/index.md(covers installation, quick‑start, configuration, writing evaluators, etc.). - Video tutorial: https://youtu.be/x47kEosu0jk
- Community: GitHub Discussions, Issues, and a WeChat QR‑code community group.
- Contributing: Follow the guide in
docs/en/contributing/guidelines.md; run tests withpytestand format withblack/ruff.
📄 License
BSD‑3‑Clause (see LICENSE).
TL;DR – LLM4AD Next is a genuine, actively maintained open‑source tool that fuses conversational LLM assistance with evolutionary algorithm search, letting users go from a plain English problem statement to a working, optimized algorithm in a single command.
Related
- Project
- Project
- Project
- Project
- Project