Python library of multi-agent reinforcement learning environments with a standard API, the multi-agent counterpart of Gymnasium.
open sourceMIT
PettingZoo is a Python library for multi-agent reinforcement learning research, made by the Farama Foundation as a multi-agent version of Gymnasium. It gives every environment one standard API, both turn-based (the agent environment cycle) and parallel, and ships families of reference environments: multi-player Atari 2600 games, cooperative Butterfly games, classic card and board games, and SISL's cooperative tasks. Each family's dependencies install as an extra (pip install 'pettingzoo[atari]'), and tutorials cover creating custom environments and training with common RL libraries. It's supported on Linux and macOS.
Problems it solves
- train several reinforcement learning agents that interact in the same environment
- find ready-made multi-agent environments to benchmark my RL algorithm
- wrap my own multi-agent simulation in a standard API so RL libraries can use it
Features
- standard multi-agent environment API (AEC and parallel)
- multi-player Atari environments
- cooperative Butterfly games
- classic card and board games
- SISL cooperative environments
- custom environment tutorials
Alternatives
The same job
These do what PettingZoo does.
- Gymnasium The standard Python API for single-agent reinforcement learning environments, formerly OpenAI Gym
- Agent Lightning Microsoft's lightweight reinforcement learning framework for training LLM agents inside their real harnesses
- Unity ML-Agents Toolkit An open source toolkit that turns Unity scenes into environments for training game and simulation agents with reinforcement and imitation learning.
- FinRL Deep reinforcement learning framework for quantitative trading research
- Stable Baselines3 Reliable reinforcement learning algorithms in PyTorch
