Multi-agent RL environments that still speak gym
A drop-in collection of multi-agent environments using the classic OpenAI gym API, so you don't have to rewrite your training loop.

What it does
ma-gym wraps multi-agent scenarios—Combat, Predator-Prey, Traffic Junction, a two-player Pong duel—into the familiar gym.make() interface. Each agent gets its own observation and reward, but the API stays single-agent-simple. There’s even a “ma_” prefix to wrap standard OpenAI envs in a multi-agent shell for debugging.
The interesting bit
The project keeps the old gym API rather than chasing PettingZoo or gymnasium. That makes it frictionless if your stack predates the great gym schism, or if you just want to prototype without learning new conventions. The bundled minimal-marl repo offers starter training code to go with it.
Key highlights
- Seven native environments: Checkers, Combat, PredatorPrey, PongDuel, Switch, Lumberjacks, TrafficJunction
- Standard
env.reset()/env.step()loop with per-agent observations and rewards - “ma_” wrapper for single-agent gym envs (handy for sanity checks)
- Colab notebook and wiki docs for usage details
- PyPI installable, though source install is recommended
Caveats
- Setup requires pinning
pip<24.1,setuptools<=66, andwheel<=0.38.4—the dependency stack is showing its age - Still uses the legacy
gymimport rather thangymnasium; new projects may need compatibility shims
Verdict
Worth a look if you’re teaching multi-agent RL or extending legacy code that speaks classic gym. Skip it if you’re already committed to PettingZoo or need modern gymnasium features out of the box.