An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning
This is the Attention Based Cucker-Smale Flocking algorithm (A Multi-Agent Reinforcement Learning Algorithm for UAV/Drone Flocking) implementation on Multi-Agent Particle Environment(MPE), the corresponding paper is An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning
The MADDPG part is come from: MADDPG
- python>=3.6.5
- Multi-Agent Particle Environment(MPE)
- torch=1.1.0
The full requirements can be installed by:
pip install -r requirements.txt
If you are troubled in installation of the requirements. We provide the Anaconda-python environment that you can download directly: LG-CS.zip
Extract code: MARL
Before running the code, please complie the environment code (Or download the complied version (.pyd file) from: release, and put .pyd in ./envs):
cd ./envs
python setup.py build_ext --inplace --forceRunning the main.py, the agents will learn from the flocking scenario:
python main.py --n-agents=5 --evaluate-episodes=256If you want to adjust the parameters, please see the ./common/arguments.py for more details.
python main.py --n-agents=5 --evaluate-episodes=10 --evaluate=TrueAfter data collection:
python display.pyIf you use this code, please cite our paper:
[1] Yunxiao Guo, Dan Xu, Chang Wang, Jinxi Li, Han Long, An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning,Engineering Applications of Artificial Intelligence,
2025,160, Part C,111797,doi: 10.1016/j.engappai.2025.111797.
Bibtex form:
@article{GUO2025111797,
author = {Yunxiao Guo and Dan Xu and Chang Wang and Jinxi Li and Han Long},
title = {An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning},
journal = {Engineering Applications of Artificial Intelligence},
volume = {160},
pages = {111797},
year = {2025},
issn = {0952-1976},
doi = {https://doi.org/10.1016/j.engappai.2025.111797},
url = {https://www.sciencedirect.com/science/article/pii/S0952197625017993}
}