Algorithm Evolution using Large Language Model
Project description
AEL: Algorithm Evolution using Large Language Model
[![Github][Github-image]][Github-url]
[![License][License-image]][License-url]
[![Releases][Releases-image]][Releases-url]
[![Web Demo][Installation-image]][Web Demo-url]
[![Wiki][Wiki-image]][Wiki-url]
This code provides a framework for **Evolutionary Computation** + **Large Language Model** for automatic algorithm design.
Introduction
If you are interested on LLM&Opt or AEL, you can:
- Join LLM4Opt in Slack,
- Join Wechat Group,
- Contact us through email.
If you encounter any difficulty using the code, you can contact use thought the above or submit an [issue]
Our implementation of FunSearch, Deepmind as the baseline, can be found here
A Quick Web Demo
A Quick Web Demo can be found here
Examples using AEL
Step 1: Install AEL
cd ael
pip install .
Step 2: Try Example: Greedy Algorithm for TSP
cd ael/examples/greedy_tsp
python runAEL.py
More Examples using AEL (Code & Paper)
Combinatorial Optimization
- Online Bin Packing, greedy heuristic, code, [paper]
- TSP, construct heuristic, code, [paper]
- TSP, guided local search, [code], [paper]
- Flow Shop Scheduling Problem (FSSP), guided local search, [code], [paper]
Machine Learning
Bayesian Optimization
Use AEL in You Application
A Step-by-step guide is provided in here
Files in ael
- ael.py: main ael
- ec:
- interface_EC.py: interface for ec
- evolution.py: evolution operators
- management.py: population management
- selection.py: parents selection
- llm
- interface_LLM.py: interface for LLM
- api_api2d.py: api2d api for GPT
- others
- utils:
- some util functions
Current support:
- ECs:
- 1i: design a new algorithm without any in-context inf.
- e1: design an algorithm totally different from existing ones
- e2: identify the common patterns in existing algorithms, design a new algorithm
- m1: design a new algorithm modified from existing one
- m2: do not design new algorithm, try different parameter settings
- LLMs:
- API2D (https://api2d.com/) or OpenAI interface for GPT3.5 and GPT4. (Paid)
- Huggingface interface (Free), in testing
- Local model Llama2, in testing
- If you want to use other LLM or if you want to use your own GPT API or local LLMs, please add your interface in ael/llm
- population management:
- delete worst
- selection:
- probability
Reference Papers
- AEL: "Fei Liu, Xialiang Tong, Mingxuan Yuan, and Qingfu Zhang, Algorithm Evolution Using Large Language Model. arXiv preprint arXiv:2311.15249. 2023." https://arxiv.org/abs/2311.15249
- Guided Local Search: "Fei Liu, Xialiang Tong, Mingxuan Yuan, Xi Lin, Fu Luo, Zhenkun Wang, Zhichao Lu, and Qingfu Zhang, An Example of Evolutionary Computation+ Large Language Model Beating Human: Design of Efficient Guided Local Search" https://arxiv.org/abs/2401.02051
- Adversarial Attacks: Pin Guo, Fei Liu, Xi Lin, Qingchuan Zhao, and Qingfu Zhang, L-AutoDA: Leveraging Large Language Models for Automated Decision-based Adversarial Attacks. arXiv preprint arXiv:2401.15335. 2024.
License
MIT
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 aell-0.0.1.tar.gz.
File metadata
- Download URL: aell-0.0.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50c5dd8c6ae459da39126d05786e6c5628dd0c6db8afd5df227e53f9730fed3e
|
|
| MD5 |
87cf0efc2ed33ab2df2a9f0d53132c40
|
|
| BLAKE2b-256 |
2d5cef0e4fe8cd8c003dac96433d6c2a88f1fdf49c8291f00da13ebf4cd6d729
|
File details
Details for the file aell-0.0.1-py3-none-any.whl.
File metadata
- Download URL: aell-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
843aefebe147219c4576678feb2f60739cea8e3a082546450a0b4da2f8d269e2
|
|
| MD5 |
7a5234dc4c5ddba4104e699c9c1b1988
|
|
| BLAKE2b-256 |
07cc30abacb4ffb945a9e11c82944704647628cedac141a141e1961e543962ec
|