The OpenAI Gym API and Gymnasium
The Python library called Gym was developed by OpenAI (www.openai.com). The first version was released in 2017 and since then, lots of environments were developed or adopted to this original API, which became a de facto standard for RL.
In 2021, the team that developed OpenAI Gym moved the development to Gymnasium (github.com/Farama-Foundation/Gymnasium) – the fork of the original Gym library. Gymnasium provides the same API and is supposed to be a “drop-in replacement” for Gym (you can write import gymnasium as gym and most likely your code will work).
Examples in this book are using Gymnasium, but in the text, I’ll use ”Gym” for brevity. In rare cases when the difference does matter, I’ll use ”Gymnasium.”
The main goal of Gym is to provide a rich collection of environments for RL experiments using a unified interface. So, it is...