gymnasium
An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
Science Score: 46.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
32 of 538 committers (5.9%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
Basic Info
- Host: GitHub
- Owner: Farama-Foundation
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://gymnasium.farama.org
- Size: 340 MB
Statistics
- Stars: 9,988
- Watchers: 60
- Forks: 1,098
- Open Issues: 78
- Releases: 16
Topics
Metadata Files
README.md
Gymnasium is an open source Python library for developing and comparing reinforcement learning algorithms by providing a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API. This is a fork of OpenAI's Gym library by its maintainers (OpenAI handed over maintenance a few years ago to an outside team), and is where future maintenance will occur going forward.
The documentation website is at gymnasium.farama.org, and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6
Environments
Gymnasium includes the following families of environments along with a wide variety of third-party environments
* Classic Control - These are classic reinforcement learning based on real-world problems and physics.
* Box2D - These environments all involve toy games based around physics control, using box2d based physics and PyGame-based rendering
* Toy Text - These environments are designed to be extremely simple, with small discrete state and action spaces, and hence easy to learn. As a result, they are suitable for debugging implementations of reinforcement learning algorithms.
* MuJoCo - A physics engine based environments with multi-joint control which are more complex than the Box2D environments.
* Atari - Emulator of Atari 2600 ROMs simulated that have a high range of complexity for agents to learn.
* Third-party - A number of environments have been created that are compatible with the Gymnasium API. Be aware of the version that the software was created for and use the apply_env_compatibility in gymnasium.make if necessary.
Installation
To install the base Gymnasium library, use pip install gymnasium
This does not include dependencies for all families of environments (there's a massive number, and some can be problematic to install on certain systems). You can install these dependencies for one family like pip install "gymnasium[atari]" or use pip install "gymnasium[all]" to install all dependencies.
We support and test for Python 3.10, 3.11, 3.12 and 3.13 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.
API
The Gymnasium API models environments as simple Python env classes. Creating environment instances and interacting with them is very simple- here's an example using the "CartPole-v1" environment:
```python import gymnasium as gym env = gym.make("CartPole-v1")
observation, info = env.reset(seed=42) for _ in range(1000): action = env.action_space.sample() observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close() ```
Notable Related Libraries
Please note that this is an incomplete list, and just includes libraries that the maintainers most commonly point newcomers to when asked for recommendations.
- CleanRL is a learning library based on the Gymnasium API. It is designed to cater to newer people in the field and provides very good reference implementations.
- PettingZoo is a multi-agent version of Gymnasium with a number of implemented environments, i.e. multi-agent Atari environments.
- The Farama Foundation also has a collection of many other environments that are maintained by the same team as Gymnasium and use the Gymnasium API.
Environment Versioning
Gymnasium keeps strict versioning for reproducibility reasons. All environments end in a suffix like "-v0". When changes are made to environments that might impact learning results, the number is increased by one to prevent potential confusion. These were inherited from Gym.
Support Gymnasium's Development
If you are financially able to do so and would like to support the development of Gymnasium, please join others in the community in donating to us.
Citation
You can cite Gymnasium using our related paper (https://arxiv.org/abs/2407.17032) as:
@article{towers2024gymnasium,
title={Gymnasium: A Standard Interface for Reinforcement Learning Environments},
author={Towers, Mark and Kwiatkowski, Ariel and Terry, Jordan and Balis, John U and De Cola, Gianluca and Deleu, Tristan and Goul{\~a}o, Manuel and Kallinteris, Andreas and Krimmel, Markus and KG, Arjun and others},
journal={arXiv preprint arXiv:2407.17032},
year={2024}
}
Owner
- Name: Farama Foundation
- Login: Farama-Foundation
- Kind: organization
- Email: contact@farama.org
- Website: farama.org
- Twitter: FaramaFound
- Repositories: 49
- Profile: https://github.com/Farama-Foundation
The Farama foundation is a nonprofit organization working to develop and maintain open source reinforcement learning tools.
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Mark Towers | m****s@g****m | 257 |
| Greg Brockman | g****b@g****m | 198 |
| J K Terry | j****y@g****m | 132 |
| Jie Tang | j****g@o****m | 121 |
| Kallinteris Andreas | 3****s | 111 |
| Peter Zhokhov | p****z@o****m | 102 |
| Jonas Schneider | m****l@j****m | 62 |
| Ariel Kwiatkowski | a****i@g****m | 59 |
| Xingdong Zuo | z****g | 52 |
| John Schulman | j****u@o****m | 46 |
| Trevor Blackwell | t****b@t****g | 44 |
| Christopher Hesse | c****e | 39 |
| Manuel Goulão | m****o@g****m | 35 |
| Omar Younis | 4****k | 31 |
| Markus Krimmel | m****l@g****m | 27 |
| Tom Brown | n****n@g****m | 25 |
| Rafael Cosman | r****n@a****u | 25 |
| Tristan Deleu | t****u | 24 |
| Jet | 3****s | 24 |
| Philip Paquette | p****e@g****m | 18 |
| Iaroslav Shcherbatyi | i****s@g****m | 18 |
| Jesse Farebrother | j****o@g****m | 17 |
| Elijah K | i****v@g****m | 15 |
| Szymon Sidor | s****n@o****m | 14 |
| Gianluca De Cola | 4****a | 14 |
| Costa Huang | c****g@o****m | 14 |
| InstanceLabs | i****1 | 14 |
| Elliot Tower | 3****r | 14 |
| trigaten | s****5@h****m | 13 |
| Oleg Klimov | o****h@g****m | 13 |
| and 508 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 412
- Total pull requests: 713
- Average time to close issues: about 2 months
- Average time to close pull requests: 10 days
- Total issue authors: 282
- Total pull request authors: 174
- Average comments per issue: 3.41
- Average comments per pull request: 1.38
- Merged pull requests: 547
- Bot issues: 0
- Bot pull requests: 12
Past Year
- Issues: 95
- Pull requests: 215
- Average time to close issues: 7 days
- Average time to close pull requests: 10 days
- Issue authors: 82
- Pull request authors: 81
- Average comments per issue: 2.16
- Average comments per pull request: 1.52
- Merged pull requests: 162
- Bot issues: 0
- Bot pull requests: 8
Top Authors
Issue Authors
- Kallinteris-Andreas (23)
- pseudo-rnd-thoughts (14)
- TimSchneider42 (6)
- RedTachyon (6)
- PBerit (5)
- sparisi (5)
- RogerJL (5)
- jamartinh (5)
- sven1977 (4)
- ArshiaIlaty (4)
- vmoens (4)
- Omer1Yuval1 (4)
- zichunxx (3)
- jjshoots (3)
- qgallouedec (3)
Pull Request Authors
- pseudo-rnd-thoughts (206)
- Kallinteris-Andreas (174)
- RedTachyon (23)
- dependabot[bot] (16)
- TimSchneider42 (14)
- elliottower (13)
- amacati (12)
- traversaro (11)
- RogerJL (11)
- JDRanpariya (11)
- jjshoots (10)
- foreverska (8)
- robertoschiavone (7)
- Jammf (6)
- CloseChoice (6)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 5
-
Total downloads:
- pypi 4,801,276 last-month
- Total docker downloads: 25,798,128
-
Total dependent packages: 317
(may contain duplicates) -
Total dependent repositories: 559
(may contain duplicates) - Total versions: 60
- Total maintainers: 3
pypi.org: gymnasium
A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym).
- Homepage: https://farama.org
- Documentation: https://gymnasium.farama.org
- License: MIT License
-
Latest release: 1.2.0
published 8 months ago
Rankings
proxy.golang.org: github.com/farama-foundation/gymnasium
- Documentation: https://pkg.go.dev/github.com/farama-foundation/gymnasium#section-documentation
- License: mit
-
Latest release: v1.2.0
published 8 months ago
Rankings
proxy.golang.org: github.com/Farama-Foundation/Gymnasium
- Documentation: https://pkg.go.dev/github.com/Farama-Foundation/Gymnasium#section-documentation
- License: mit
-
Latest release: v1.2.0
published 8 months ago
Rankings
proxy.golang.org: github.com/farama-Foundation/gymnasium
- Documentation: https://pkg.go.dev/github.com/farama-Foundation/gymnasium#section-documentation
- License: mit
-
Latest release: v1.2.0
published 8 months ago
Rankings
anaconda.org: gymnasium
Gymnasium is an open source Python library for developing and comparing reinforcement learning algorithms by providing a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API. This is a fork of OpenAI's Gym library by the maintainers (OpenAI handed over maintenance a few years ago to an outside team), and is where future maintenance will occur going forward
- Homepage: https://gymnasium.farama.org/
- License: MIT
-
Latest release: 0.28.1
published almost 3 years ago
Rankings
Dependencies
- furo *
- moviepy *
- myst-parser *
- pygame *
- sphinx *
- sphinx-autobuild *
- sphinx-gallery ==0.14.0
- sphinx_github_changelog *
- cloudpickle >=1.2.0
- farama-notifications >=0.0.1
- importlib-metadata >=4.8.0; python_version < '3.10'
- numpy >=1.21.0
- typing-extensions >=4.3.0
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite