https://github.com/yunxiaoguo/abcs-flocking
The Code of the paper: "An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning", which implemented fixed-wing UAV/Drone flocking with collision-free.
https://github.com/yunxiaoguo/abcs-flocking
drones flocking multi-agent-reinforcement-learning swarm uavs
Last synced: about 2 months ago
JSON representation
The Code of the paper: "An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning", which implemented fixed-wing UAV/Drone flocking with collision-free.
- Host: GitHub
- URL: https://github.com/yunxiaoguo/abcs-flocking
- Owner: YunxiaoGuo
- License: mit
- Created: 2024-03-24T15:12:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-21T00:18:45.000Z (5 months ago)
- Last Synced: 2025-11-21T02:25:41.447Z (5 months ago)
- Topics: drones, flocking, multi-agent-reinforcement-learning, swarm, uavs
- Language: Python
- Homepage:
- Size: 1.48 MB
- Stars: 25
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)](https://github.com/openai/multiagent-particle-envs), the corresponding paper is [An invulnerable leader–follower collision-free unmanned aerial vehicle flocking system with attention-based Multi-Agent Reinforcement Learning](https://doi.org/10.1016/j.engappai.2025.111797)
The MADDPG part is come from: [MADDPG](https://gitee.com/ming_autumn/MADDPG-1?_from=gitee_search)
## Requirements
### Key Requirements
- python>=3.6.5 (we recommend python==3.9)
- [Multi-Agent Particle Environment(MPE)](https://github.com/openai/multiagent-particle-envs)
- 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](https://pan.baidu.com/s/1ODtPNWxLOWAHcw7ZDz2sWw/MARL)**
**Extract code: MARL**
## Complie Cython Code
Before running the code, please complie the environment code (Or download the complied version (`.pyd` file) from: [release](https://github.com/YunxiaoGuo/ABCS-Flocking/releases), and put `.pyd` in `./envs`):
```shell
cd ./envs
python setup.py build_ext --inplace --force
```
## Training Agents
Running the main.py, the agents will learn from the flocking scenario:
```shell
python main.py --n-agents=5 --evaluate-episodes=256
```
If you want to adjust the parameters, please see the `./common/arguments.py` for more details.
## Testing Agents
```shell
python main.py --n-agents=5 --evaluate-episodes=10 --evaluate=True
```
## Display Results
After data collection:
```shell
python display.py
```
# Citation
If 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}
}
```