
When changes are made to environments that might impact learning results, the number is increased by one to prevent potential confusion. All environments end in a suffix like "_v0". Gym keeps strict versioning for reproducibility reasons. PettingZoo is like Gym, but for environments with multiple agents.RLlib is a learning library that allows for distributed training and inferencing and supports an extraordinarily large number of features throughout the reinforcement learning space.Tianshou is a learning library that's geared towards very experienced users and is design to allow for ease in complex algorithm modifications.It is designed to cater to newer people in the field and provides very good reference implementations. CleanRL is a learning library based on the Gym API.Please note that this is an incomplete list, and just includes libraries that the maintainers most commonly point newcommers to when asked for recommendations. Observation, reward, terminated, truncated, info = env. Creating environment instances and interacting with them is very simple- here's an example using the "CartPole-v1" environment: The Gym API's API models environments as simple Python env classes.

We will accept PRs related to Windows, but do not officially support it.

We support Python 3.7, 3.8, 3.9 and 3.10 on Linux and macOS. You can install these dependencies for one family like pip install gym or use pip install gym to install all dependencies. 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). To install the base Gym library, use pip install gym. Gym also has a discord server for development purposes that you can join here: Installation Gym documentation website is at, and you can propose fixes and changes to it here. Since its release, Gym's API has become the field standard for doing this. Gym 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.

If you'd like to read more about the story behind this switch, please check out this blog post. Please switch over to Gymnasium as soon as you're able to do so. Important Notice The team that has been maintaining Gym since 2021 has moved all future development to Gymnasium, a drop in replacement for Gym (import gymnasium as gym), and Gym will not be receiving any future updates.
