Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FeiLiu36/EoH-S

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EoH-S: Evolution of Heuristic Set using LLMs for Automated Heuristic Design

Python 3.8+ License

Official implementation of "EoH-S: Evolution of Heuristic Set using LLMs for Automated Heuristic Design" accepted at AAAI 2026 as an Oral presentation.

Paper | Project Page | Demo


📋 Table of Contents


🔍 Overview

EoH-S (Evolution of Heuristic Set) introduces Automated Heuristic Set Design (AHSD), a novel formulation that addresses the generalization limitations of traditional LLM-driven Automated Heuristic Design (AHD). While existing methods design a single heuristic for all problem instances, EoH-S automatically generates a small-sized complementary heuristic set where each problem instance is optimized by at least one heuristic in the set.

Key Features

  • 🎯 Automated Heuristic Set Design (AHSD): Novel formulation that generates complementary heuristic sets instead of single heuristics
  • 🔄 Complementary Population Management: Maintains diversity through specialized population management strategies
  • 🧠 Diversity-Aware Memetic Search: Combines evolutionary search with local refinement for high-quality heuristic discovery
  • 🌐 Robust Cross-Distribution Performance: Designed heuristics show strong generalization across instances of varying sizes and distributions

Method Overview

Figure 1: Overview of the EoH-S framework and Comparison to Existing LLM-driven AHD methods


📁 Repository Structure

  • code/: Source code for EoH-S and baseline methods, implemented using the LLM4AD platform
  • datasets/: Training and testing datasets, along with instance generation scripts
  • examples/: Running scripts and configurations for different optimization tasks
  • heuristics/: Final heuristics designed by EoH-S and baseline methods
  • results/: Detailed experimental results, including performance metrics and logs for all methods

🛠️ Installation

Prerequisites

  • Python 3.8 or higher and < 3.13
  • pip package manager

Setup Instructions

  1. Clone the repository

    git clone https://github.com/FeiLiu36/EoH-S.git
    cd eohs
  2. Install LLM4AD platform

    cd code
    pip install .
    cd ..
  3. Set up API Endpoint, key, and LLM in the running script (e.g., examples/obp_set/run_eohs.py)

        llm = HttpsApi(host='xxx',  # your host endpoint, e.g., 'api.openai.com', 'api.deepseek.com'
                       key='xxx',  # your key, e.g., 'sk-abcdefghijklmn'
                       model='deepseek-v3',  # your llm, e.g., 'gpt-3.5-turbo'
                       timeout=60)

🚀 Quick Start

Running EoH-S on Online Bin Packing

cd examples
python obp_set/run_eohs.py

The results will be saved in the logs/ folder.

Running Other Tasks

# For TSP
python tsp_set/run_eohs.py

# For other tasks
python <task_name>/run_eohs.py

Customizing Experiments

from llm4ad.task.optimization.online_bin_packing_set import OBPSEvaluation
from llm4ad.tools.llm.llm_api_https import HttpsApi
from llm4ad.method.eohs import EoHS,EoHSProfiler

def main():

    llm = HttpsApi(host='xxx',  # your host endpoint, e.g., 'api.openai.com', 'api.deepseek.com'
                   key='xxx',  # your key, e.g., 'sk-abcdefghijklmn'
                   model='deepseek-v3',  # your llm, e.g., 'gpt-3.5-turbo'
                   timeout=60)

    task = OBPSEvaluation(
        timeout_seconds=120,
        dataset='./dataset_100_2k_128_5_80_training.pkl',
        return_list=True)

    method = EoHS(llm=llm,
                 profiler=EoHSProfiler(log_dir='logs/eohs', log_style='simple'),
                 evaluation=task,
                 max_sample_nums=2000,
                 max_generations=1000,
                 pop_size=10,
                 num_samplers=4,
                 num_evaluators=4,
                 debug_mode=False)

    method.run()

if __name__ == '__main__':
    main()

You can modify the configuration files in examples/ to customize:

  • Population size: pop_size

  • Total number of sampled heuristics: max_sample_nums

  • Number of parallel evaluations: num_samplers and num_evaluators

  • Others: e.g., LLM type and timeout

📝 Citation

If you find this work useful, please cite our paper:

@inproceedings{liu2026eohs,
  title={EoH-S: Evolution of Heuristic Set using {LLM}s for Automated Heuristic Design},
  author={Fei Liu, Yilu Liu, Qingfu Zhang, Xialiang Tong, Mingxuan Yuan},
  booktitle={The Fortieth AAAI Conference on Artificial Intelligence},
  year={2026},
  url={https://openreview.net/forum?id=JiOY4d5ktq}
}

📄 License

This project is licensed under the MIT License - see the [LICENSE] file for details.


🙏 Acknowledgments

  • Built on the LLM4AD platform
  • Thanks to the AAAI 2026 reviewers for their valuable feedback

📧 Contact

For questions and feedback:


About

Evolution of Heuristic Set using LLMs for Automated Heuristic Design

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages