AlgoDisco: Algorithm Discovery - LLM-driven Algorithm Search Framework
Project description
AlgoDisco: Method Implementations and Tools for
LLM-driven Automated Algorithm Design
✨ Key features
- Multiple Search Methods: FunSearch, OpenEvolve, EoH, (1+1)-EPS, RandSample
- Multiple LLM Providers: OpenAI, Claude, vLLM, SGLang
- Sandboxed Execution: Safe evaluation of generated algorithms
- Flexible Configuration: YAML-based configuration system
🛠️ Requirements
- Python >= 3.11 (recommended: 3.12)
🚀 Quick start
# Install the package in editable mode
pip install -e .
If you want to use the default OpenAI path, export your API key first:
export OPENAI_API_KEY="your-api-key"
We provide two practical starting points:
-
Python API example:
python examples/online_bin_packing/run_funsearch.py -
YAML example (recommended for learning the config system):
bash examples/run_online_bin_packing.sh funsearch
For more details, see Quick Start.
📖 Documentation
🔍 Available search methods
- FunSearch
- OpenEvolve
- EoH
- (1+1)-EPS
- RandSample
💡 Quick example
Want to run a search? Here's how:
Option 1: Use provided example (Online Bin Packing)
We provide a ready-to-use example in examples/online_bin_packing/.
Python-style (direct code):
python examples/online_bin_packing/run_funsearch.py
Set your API key first:
export OPENAI_API_KEY="your-api-key"
YAML-style (recommended):
Configs for each method are in examples/online_bin_packing/configs/:
| Method | Config File |
|---|---|
| FunSearch | configs/funsearch.yaml |
| OpenEvolve | configs/openevolve.yaml |
| EoH | configs/eoh.yaml |
| (1+1)-EPS | configs/one_plus_one_eps.yaml |
| RandSample | configs/randsample.yaml |
-
Copy and edit the config:
cp examples/online_bin_packing/configs/funsearch.yaml examples/online_bin_packing/configs/my_config.yaml
-
Open
my_config.yamland replace:api_key: null→api_key: "your-openai-key"(or setOPENAI_API_KEYenv var)
-
Run with any method (just change the argument):
# Run with FunSearch bash examples/run_online_bin_packing.sh funsearch # Run with OpenEvolve bash examples/run_online_bin_packing.sh openevolve # Run with EoH bash examples/run_online_bin_packing.sh eoh # Run with (1+1)-EPS bash examples/run_online_bin_packing.sh one_plus_one_eps # Run with RandSample bash examples/run_online_bin_packing.sh randsample
Available methods: funsearch, openevolve, eoh, one_plus_one_eps, randsample
For SwanLab integration, use funsearch_swanlab:
bash examples/run_online_bin_packing.sh funsearch_swanlab
Option 2: Create your own experiment
-
Choose a method (e.g., FunSearch) and copy one of the example configs:
cp examples/online_bin_packing/configs/funsearch.yaml my_experiment.yaml
-
Edit
my_experiment.yamlto set your:template_program_path: Your algorithm templatetask_description_path: Problem descriptionevaluator.class_path: Your evaluator class- LLM provider settings (API key, model, etc.)
-
Run:
python -m algodisco.methods.funsearch.main_funsearch --config my_experiment.yaml
📝 Citation
If you use AlgoDisco in your research, please cite:
@misc{algodisco,
title = {AlgoDisco: Method Implementations and Tools for LLM-driven Automated Algorithm Design},
author = {Rui Zhang},
year = {2026},
url = {https://github.com/RayZhhh/algodisco},
}
📜 License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algodisco-0.1.0.tar.gz.
File metadata
- Download URL: algodisco-0.1.0.tar.gz
- Upload date:
- Size: 413.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40da54042e5446d1d040f0bdf150114d325096ef46bef4e393c7aca81cae030e
|
|
| MD5 |
cdbe50ef9523466044bdda194e85f48e
|
|
| BLAKE2b-256 |
d0f6b895de9c663efc2bedbb46627e22510355a487502ac4e31edf3f7b8bf3db
|
File details
Details for the file algodisco-0.1.0-py3-none-any.whl.
File metadata
- Download URL: algodisco-0.1.0-py3-none-any.whl
- Upload date:
- Size: 288.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5537d3d7b15d6118f14fe5af2a7be0bf60ab684e4ce328db695b2ca13f55ac0
|
|
| MD5 |
63d94b42d5481f8dc4e87db86b2b43b4
|
|
| BLAKE2b-256 |
3f1d564743eaf9f89ff882930bdf006057469028f6b7e52014a0eb30e61ec72e
|