reevo  by ai4co

LLMs as hyper-heuristics for algorithm generation

Created 2 years ago
257 stars

Top 98.2% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> ReEvo introduces Language Hyper-Heuristics (LHHs) and the Reflective Evolution (ReEvo) framework, leveraging Large Language Models (LLMs) to automate the generation of state-of-the-art algorithms for complex optimization problems. This approach targets researchers and engineers seeking to rapidly develop high-performance heuristics with minimal manual intervention, benefiting from LLM-driven exploration of vast heuristic spaces.

How It Works

ReEvo employs a novel "Reflective Evolution" process, where LLMs act as hyper-heuristics. The framework emulates human expert design by iteratively generating, evaluating, and refining heuristic algorithms. This approach capitalizes on LLMs' broad domain knowledge and scalable inference capabilities to explore an open-ended space of heuristics, aiming to surpass human-designed algorithms in performance and efficiency for various optimization tasks.

Quick Start & Requirements

Installation is recommended via uv for efficient dependency management. After cloning the repository, create a Python 3.12 virtual environment (uv venv --python 3.12), activate it, and synchronize dependencies (uv sync --all-extras). Alternatively, use pip install -e ".[gls,aco,nco]". A Python version >= 3.11 is required. Users must configure LLM API keys (e.g., OpenAI, Zhipu, Llama) via environment variables or command-line arguments. Datasets are generated dynamically. Test notebooks are available in ./problems/*/test.ipynb. Further details on uv can be found at https://github.com/astral-sh/uv.

Highlighted Details

  • Enhances algorithms: Neural Combinatorial Optimization (NCO), Genetic Algorithms (GA), Ant Colony Optimization (ACO), Guided Local Search (GLS), and Constructive Heuristics.
  • Supports diverse problems: Traveling Salesman Problem (TSP), Capacitated Vehicle Routing Problem (CVRP), Orienteering Problem (OP), Multiple Knapsack Problems (MKP), Bin Packing Problem (BPP), and Decap Placement Problem (DPP).
  • Operates in both black-box and white-box settings for problem evaluation.
  • Accepted at NeurIPS 2024, signifying strong academic validation.

Maintenance & Community

The project was accepted at NeurIPS 2024. Community interaction and support are available via a Slack channel. The developers encourage users to star the repository and cite the accompanying paper.

Licensing & Compatibility

The specific open-source license for this repository is not explicitly stated in the provided README. Consequently, compatibility for commercial use or closed-source linking cannot be determined without further clarification.

Limitations & Caveats

Successful operation necessitates access to and configuration of external LLM APIs, which may incur costs and require API key management. The effectiveness of generated heuristics is contingent on the chosen LLM and the problem's complexity.

Health Check
Last Commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
12 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.