A standard Python API for single-agent reinforcement learning environments, plus a set of reference environments, forked from OpenAI's Gym.
Farama-Foundation/MPE2
A PettingZoo-style set of multi-agent particle environments for research on communication, cooperation and competition between agents.
- Stars
- 779
- Forks
- 22
- Open issues
- 3
- Last commit
- 13 days ago
What is it?
MPE2 is a collection of communication-oriented multi-agent reinforcement learning environments. Particle agents can move, communicate, observe each other, push one another, and interact with fixed landmarks in a 2D world.
The environments are derived from OpenAI's original MPE codebase, with fixes that make the action space discrete by default, make rewards consistent, and clean up observation spaces. It also adds three new environments. Environments are exposed through a PettingZoo-compatible API and installed with pip install mpe2.
The set includes adversarial scenarios such as Simple Tag and Simple Crypto, and cooperative ones such as Simple Spread, Simple Reference and Collect Treasure. Both discrete and continuous action spaces are supported, and rendering is available in a window or as a pixel array.
Key features
- 01Provides multi-agent environments with communication, movement and landmark interaction.
- 02Supports discrete action spaces by default and continuous actions via a flag.
- 03Offers both adversarial and cooperative scenarios.
- 04Uses a PettingZoo-style API with agent_iter, last and step.
- 05Installs with pip and renders to a window or pixel array.
Use cases
- Benchmarking multi-agent reinforcement learning algorithms on small communication tasks.
- Studying emergent communication between cooperating or competing agents.
- Teaching multi-agent RL with simple, readable environments.
Quick start
- 1
Install the mpe2 package from PyPI
pip install mpe2 - 2
Import an environment and run a random-agent loop as shown in the basic example
python -c "from mpe2 import simple_push_v3; env = simple_push_v3.env(render_mode='human'); env.reset(seed=42); env.close()"
Things to know
- Environments are 2D particle simulations with simple, low-fidelity dynamics, so they suit research prototyping rather than realistic tasks.
- Based on OpenAI's original MPE codebase, with default discrete action spaces that differ from the original continuous ones.
In collections
Topics
FAQ
- What is MPE2?
- A PettingZoo-style set of multi-agent particle environments for research on communication, cooperation and competition between agents. MPE2 is a collection of communication-oriented multi-agent reinforcement learning environments. Particle agents can move, communicate, observe each other, push one another, and interact with fixed landmarks in a 2D world.
- Is MPE2 free to use? What license does it have?
- MPE2 is open source under the MIT license. Check the license terms before using it in commercial products.
- Is MPE2 still maintained?
- Actively maintained. The last commit to MPE2 was on Oct 9, 2026.
- What can I use MPE2 for?
- Benchmarking multi-agent reinforcement learning algorithms on small communication tasks. Studying emergent communication between cooperating or competing agents. Teaching multi-agent RL with simple, readable environments.
- How do I install MPE2?
- Install the mpe2 package from PyPI: pip install mpe2 Import an environment and run a random-agent loop as shown in the basic example: python -c "from mpe2 import simple_push_v3; env = simple_push_v3.env(render_mode='human'); env.reset(seed=42); env.close()"
- Where can I get MPE2?
- The source code and installation instructions are on GitHub: https://github.com/Farama-Foundation/MPE2
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
ASPIRE is a framework where coding agents iteratively refine reusable robot skills for simulated and real-robot manipulation tasks instead of training model weights.
A MIT-licensed starter kit for deploying and customizing AI Town, a virtual town where AI characters live, chat and socialize, built on Convex.
A general-purpose physics engine for fast, accurate simulation of articulated bodies in contact, widely used in robotics and machine learning research.
Unity ML-Agents Toolkit lets Unity games and simulations serve as environments for training AI agents with reinforcement and imitation learning.
Open-source notification and agent communication infrastructure that sends messages across Inbox, Email, SMS, Push, Chat and Slack through one API.