PettingZoo  by Farama-Foundation

Python library for multi-agent reinforcement learning environments

Created 5 years ago
3,115 stars

Top 15.4% on SourcePulse

GitHubView on GitHub
Project Summary

PettingZoo provides a standardized API for multi-agent reinforcement learning (MARL) environments, serving as a crucial tool for researchers and practitioners in the field. It offers a diverse collection of reference environments and utilities, simplifying the development and benchmarking of MARL algorithms.

How It Works

PettingZoo models environments as Agent Environment Cycle (AEC) games, enabling a unified API across various multi-agent scenarios and minimizing common bugs. This approach allows for flexible interaction, supporting both sequential and simultaneous action spaces, and closely mirrors the popular Gymnasium API for ease of use.

Quick Start & Requirements

  • Install with pip install pettingzoo.
  • Install specific environment dependencies with pip install 'pettingzoo[atari]' or all with pip install 'pettingzoo[all]'.
  • Supported on Python 3.9-3.12 on Linux and macOS.
  • May require manual installation of cmake, swig, or zlib1g-dev on some Linux distributions.
  • Official documentation: https://pettingzoo.farama.org/

Highlighted Details

  • Includes diverse environment families: Atari, Butterfly, Classic, MPE, and SISL.
  • Integrates with popular MARL training libraries like CleanRL, Tianshou, and AgileRL.
  • Offers a Parallel API for environments where agents act simultaneously.
  • Features SuperSuit, a companion library for common RL wrappers.
  • Employs strict environment versioning for reproducibility.

Maintenance & Community

Licensing & Compatibility

  • Licensed under the Apache 2.0 License.
  • Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

  • Official support is limited to Linux and macOS; Windows support is community-contributed.
  • Some environment dependencies may require manual system-level installations.
Health Check
Last Commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
2
Star History
38 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.