Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A collection of multi agent environments based on OpenAI gym.
| Date | Stars |
|---|---|
| 2026-07-31 | 632 |
| 2026-08-06 | 634 |
Today
+2 stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# ma-gym
It's a collection of multi agent environments based on OpenAI gym. Also, you can use [**minimal-marl**](https://github.com/koulanurag/minimal-marl) to warm-start training of agents.



[](https://pepy.tech/project/ma-gym)
[](https://github.com/koulanurag/ma-gym/wiki)
[](https://scholar.google.com/scholar?oi=bibs&hl=en&cites=14123576959169220642,12284637994392993807)
[](https://colab.research.google.com/github/koulanurag/ma-gym/blob/master/examples/colab_example.ipynb)
## Installation
- Setup (important):
```bash
pip install 'pip<24.1'
pip install 'setuptools<=66'
pip install 'wheel<=0.38.4'
```
- Install package:
- Using PyPI:
```bash
pip install ma-gym
```
- Directly from source (recommended):
```bash
git clone https://github.com/koulanurag/ma-gym.git
cd ma-gym
pip install -e .
```
## Reference:
Please use this bibtex if you would like to cite it:
```
@misc{magym,
author = {Koul, Anurag},
title = {ma-gym: Collection of multi-agent environments based on OpenAI gym.},
year = {2019},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/koulanurag/ma-gym}},
}
```
## Usage:
```python
import gym
env = gym.make('ma_gym:Switch2-v0')
done_n = [False for _ in range(env.n_agents)]
ep_reward = 0
obs_n = env.reset()
while not all(done_n):
env.render()
obs_n, reward_n, done_n, info = env.step(env.action_space.sample())
ep_reward += sum(reward_n)
env.close()
```
Please refer to [**Wiki**](https://github.com/koulanurag/ma-gym/wiki/Usage) for complete usage details
## Environments:
- [x] Checkers
- [x] Combat
- [x] PredatorPrey
- [x] Pong Duel ```(two player pong game)```
- [x] Switch
- [x] Lumberjacks
- [x] TrafficJunction
```
Note : openai's environment can be accessed in multi agent form by prefix "ma_".Eg: ma_CartPole-v0
This returns an instance of CartPole-v0 in "multi agent wrapper" having a single agent.
These environments are helpful during debugging.
```
Please refer to [Wiki](https://github.com/koulanurag/ma-gym/wiki/Environments) for more details.
## Zoo!
| __Checkers-v0__ | __Combat-v0__ | __Lumberjacks-v0__ |
|:---:|:---:|:---:|
||||
| __PongDuel-v0__ | __PredatorPrey5x5-v0__ | __PredatorPrey7x7-v0__ |
|  |  |  |
| __Switch2-v0__ | __Switch4-v0__ | __TrafficJunction4-v0__ | |
|  | ![Switch4-v0.gif](https://raw.githubusercontent.com/koulanurag/ma-gym/master/static/gif/Switch4Excerpt of 4,599 characters
Read on GitHub208
23
11
2
1
1
1
1
Jerry Zhi-Yang He · UC Berkeley
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:22743e629bf35154, topic:reinforcement-learning, topic:openai-gym
matched fp:22743e629bf35154, topic:multi-agent, desc:multi-agent, desc:multi agent