MAgent environments

Adversarial Pursuit



Combined Arms




The unique dependencies for this set of environments can be installed via:

pip install pettingzoo[magent]

MAgent is a set of environments where large numbers of pixel agents in a gridworld interact in battles or other competitive scenarios. These environments were originally derived from the MAgent codebase.

Types of Environments

All environments except Gather are competitive team games where each team must cooperate to defeat the other team. Note that reward is allocated entirely individually, so the team coordination, if any, must arise out of emergent behavior.

Gather is a survival game where agents must try to stay alive either by gathering the food or by killing other agents.

Key Concepts


The game terminates after all agents of either team have died. This means that in the battle environments, where HP heals over time instead of decays, the game will go on for a very long time with random actions.


The MAgent environments were originally created for the following work:

  author    = {Lianmin Zheng and
               Jiacheng Yang and
               Han Cai and
               Weinan Zhang and
               Jun Wang and
               Yong Yu},
  title     = {MAgent: {A} Many-Agent Reinforcement Learning Platform for Artificial
               Collective Intelligence},
  journal   = {CoRR},
  volume    = {abs/1712.00600},
  year      = {2017},
  url       = {},
  archivePrefix = {arXiv},
  eprint    = {1712.00600},
  timestamp = {Sun, 21 Apr 2019 10:04:41 +0200},
  biburl    = {},
  bibsource = {dblp computer science bibliography,}

Please cite this paper if you use these environments in your research.