Skip to main content

AlgoDisco: Algorithm Discovery - LLM-driven Algorithm Search Framework

Project description

algodisco

AlgoDisco: Method Implementations and Tools for
LLM-driven Automated Algorithm Design

Stars Forks License Ask DeepWiki

✨ 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:

  1. Python API example:

    python examples/online_bin_packing/run_funsearch.py
    
  2. 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
  1. Copy and edit the config:

    cp examples/online_bin_packing/configs/funsearch.yaml examples/online_bin_packing/configs/my_config.yaml
    
  2. Open my_config.yaml and replace:

    • api_key: nullapi_key: "your-openai-key" (or set OPENAI_API_KEY env var)
  3. 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

  1. Choose a method (e.g., FunSearch) and copy one of the example configs:

    cp examples/online_bin_packing/configs/funsearch.yaml my_experiment.yaml
    
  2. Edit my_experiment.yaml to set your:

    • template_program_path: Your algorithm template
    • task_description_path: Problem description
    • evaluator.class_path: Your evaluator class
    • LLM provider settings (API key, model, etc.)
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

algodisco-0.1.0.tar.gz (413.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

algodisco-0.1.0-py3-none-any.whl (288.3 kB view details)

Uploaded Python 3

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

Hashes for algodisco-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40da54042e5446d1d040f0bdf150114d325096ef46bef4e393c7aca81cae030e
MD5 cdbe50ef9523466044bdda194e85f48e
BLAKE2b-256 d0f6b895de9c663efc2bedbb46627e22510355a487502ac4e31edf3f7b8bf3db

See more details on using hashes here.

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

Hashes for algodisco-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5537d3d7b15d6118f14fe5af2a7be0bf60ab684e4ce328db695b2ca13f55ac0
MD5 63d94b42d5481f8dc4e87db86b2b43b4
BLAKE2b-256 3f1d564743eaf9f89ff882930bdf006057469028f6b7e52014a0eb30e61ec72e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page