Gymnasium  by Farama-Foundation

Python API standard for single-agent reinforcement learning environments

Created 3 years ago
10,154 stars

Top 5.0% on SourcePulse

GitHubView on GitHub
Project Summary

Gymnasium provides a standardized API for single-agent reinforcement learning environments, serving as a successor to OpenAI's Gym. It offers a comprehensive suite of reference environments and utilities, enabling consistent development and comparison of RL algorithms for researchers and practitioners.

How It Works

Gymnasium models environments as Python classes, abstracting the interaction loop into simple reset() and step() methods. This design promotes interoperability between diverse RL algorithms and environments, facilitating reproducible research and easier algorithm benchmarking. The library enforces strict environment versioning (e.g., "-v0") to ensure reproducibility.

Quick Start & Requirements

  • Install base library: pip install gymnasium
  • Install environment dependencies: pip install "gymnasium[atari]" or pip install "gymnasium[all]"
  • Supported Python versions: 3.8-3.12 on Linux and macOS. Windows support is accepted via PRs but not officially tested.
  • Documentation: https://gymnasium.farama.org/
  • Discord: https://discord.gg/bnJ6kubTg6

Highlighted Details

  • Includes diverse environment families: Classic Control, Box2D, Toy Text, MuJoCo, and Atari.
  • Strict environment versioning for reproducibility.
  • Integrates with related libraries like CleanRL and PettingZoo.
  • Offers a citation for academic use.

Maintenance & Community

Maintained by the Farama Foundation, the project actively coordinates development on Discord. Financial contributions are welcomed to support ongoing development.

Licensing & Compatibility

The library is released under the Apache 2.0 license, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

While Gymnasium supports Linux and macOS, official support for Windows is limited to PR acceptance. Some environment dependencies may be challenging to install on certain systems.

Health Check
Last Commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
12
Issues (30d)
8
Star History
238 stars in the last 30 days

Explore Similar Projects

Starred by Edward Sun Edward Sun(Research Scientist at Meta Superintelligence Lab), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
1 more.

swe-rl by facebookresearch

0.2%
596
RL for software evolution
Created 6 months ago
Updated 6 months ago
Starred by Hanlin Tang Hanlin Tang(CTO Neural Networks at Databricks; Cofounder of MosaicML), Amanpreet Singh Amanpreet Singh(Cofounder of Contextual AI), and
2 more.

coach by IntelLabs

0%
2k
Reinforcement learning framework for experimentation (discontinued)
Created 8 years ago
Updated 2 years ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Evan Hubinger Evan Hubinger(Head of Alignment Stress-Testing at Anthropic), and
3 more.

retro by openai

0.1%
4k
RL environment for classic video games
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.