◆SkillGaming & SimulationFree
PettingZoo — Multi-Agent Reinforcement Learning
Farama Foundation's MIT-licensed multi-agent RL environment library — 50+ cooperative and competitive games for training and evaluating MARL algorithms.
PettingZoo — Multi-Agent Reinforcement Learning
PettingZoo is the multi-agent counterpart to Gymnasium, providing a standard API for environments where multiple agents interact simultaneously. It covers cooperative, competitive, and mixed-motive scenarios — from classic board games (Chess, Go, Connect Four) to Atari multiplayer games (Pong, Surround) and particle physics environments — making it the standard benchmark suite for multi-agent RL research and game AI development.
Key Features
- 50+ multi-agent environments across 5 families: Atari, Classic, MPE, SISL, Butterfly
AECEnv(turn-based) andParallelEnv(simultaneous-action) APIs- Compatible with RLlib, Stable-Baselines3 (via SuperSuit wrappers), and CleanRL
- Parallel environment vectorization for high-throughput training
- Standardized agent observation and action spaces across all environments
Quick Start
pip install pettingzoo[classic]
from pettingzoo.classic import chess_v6
env = chess_v6.env(render_mode="human")
env.reset(seed=42)
for agent in env.agent_iter():
observation, reward, termination, truncation, info = env.last()
if termination or truncation:
action = None
else:
action = env.action_space(agent).sample()
env.step(action)
env.close()
npx ai-supply add pettingzoo-multiagent-rl
Curated mirror of the open-source PettingZoo (MIT). Get it from the source.