https://github.com/geek-ai/MAgent
A Platform for Many-Agent Reinforcement Learning
https://github.com/geek-ai/MAgent
deep-learning multi-agent reinforcement-learning
Last synced: 4 months ago
JSON representation
A Platform for Many-Agent Reinforcement Learning
- Host: GitHub
- URL: https://github.com/geek-ai/MAgent
- Owner: geek-ai
- License: mit
- Created: 2017-11-06T10:09:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-22T00:21:27.000Z (over 2 years ago)
- Last Synced: 2025-03-02T03:59:49.793Z (4 months ago)
- Topics: deep-learning, multi-agent, reinforcement-learning
- Language: Python
- Homepage:
- Size: 9.39 MB
- Stars: 1,712
- Watchers: 67
- Forks: 332
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deep-rl - MAgent - A Platform for Many-agent Reinforcement Learning. (Libraries)
- awesome-AI-books - MAgent - agent Reinforcement Learning (Training ground)
README
## This project is no longer maintained
Please see https://github.com/Farama-Foundation/MAgent2 for a maintained fork of this project that's installable with pip.
## MAgent
MAgent is a research platform for many-agent reinforcement learning.
Unlike previous research platforms that focus on reinforcement learning research with a single agent or only few agents,
MAgent aims at supporting reinforcement learning research that scales up from hundreds to millions of agents.- AAAI 2018 demo paper: [MAgent: A Many-Agent Reinforcement Learning Platform for Artificial Collective Intelligence](https://arxiv.org/abs/1712.00600)
- Watch [our demo video](https://www.youtube.com/watch?v=HCSm0kVolqI) for some interesting show cases.
- Here are two immediate demo for the battle case.
## Requirement
MAgent supports Linux and OS X running Python 2.7 or python 3.
We make no assumptions about the structure of your agents.
You can write rule-based algorithms or use deep learning frameworks.## Install on Linux
```bash
git clone [email protected]:geek-ai/MAgent.git
cd MAgentsudo apt-get install cmake libboost-system-dev libjsoncpp-dev libwebsocketpp-dev
bash build.sh
export PYTHONPATH=$(pwd)/python:$PYTHONPATH
```## Install on OSX
**Note: There is an issue with homebrew for installing websocketpp, please refer to [#17](https://github.com/geek-ai/MAgent/issues/17)**
```bash
git clone [email protected]:geek-ai/MAgent.git
cd MAgentbrew install cmake llvm [email protected]
brew install jsoncpp argp-standalone
brew tap david-icracked/homebrew-websocketpp
brew install --HEAD david-icracked/websocketpp/websocketpp
brew link --force [email protected]bash build.sh
export PYTHONPATH=$(pwd)/python:$PYTHONPATH
```## Docs
[Get started](/doc/get_started.md)## Examples
The training time of following tasks is about 1 day on a GTX1080-Ti card.
If out-of-memory errors occur, you can tune infer_batch_size smaller in models.**Note** : You should run following examples in the root directory of this repo. Do not cd to `examples/`.
### Train
Three examples shown in the above video.
Video files will be saved every 10 rounds. You can use render to watch them.* **pursuit**
```
python examples/train_pursuit.py --train
```* **gathering**
```
python examples/train_gather.py --train
```* **battle**
```
python examples/train_battle.py --train
```
### Play
An interactive game to play with battle agents. You will act as a general and dispatch your soldiers.* **battle game**
```
python examples/show_battle_game.py
```## Baseline Algorithms
The baseline algorithms parameter-sharing DQN, DRQN, a2c are implemented in Tensorflow and MXNet.
DQN performs best in our large number sharing and gridworld settings.## Acknowledgement
Many thanks to [Tianqi Chen](https://tqchen.github.io/) for the helpful suggestions.