Gymnasium
GymCommonThe standard interface library for reinforcement learning environments, and the successor to OpenAI Gym.
Gymnasium is a reinforcement-learning environment library maintained by the Farama Foundation; it grew out of Gym, which OpenAI released in 2016, and which Farama took over and renamed once OpenAI stopped maintaining it. Its most important contribution is a unified interface: env.reset() starts an episode and returns the initial observation, and env.step(action) executes an action and returns the new observation, the reward, terminated (the task ended naturally), truncated (cut off by something like a step limit), and extra info. It ships with classic tasks such as CartPole and MuJoCo continuous-control tasks built in. Most reinforcement-learning algorithm libraries are written against this interface, and many robot simulation environments provide a compatible wrapper, so an algorithm written once can be pointed at a new environment directly.
Exampleenv = gymnasium.make(“HalfCheetah-v5”), then calling env.step() in a loop to collect data, which is handed to Stable-Baselines3’s PPO for training.
- Also called
- OpenAI Gym, gym
- Related
- Environment (Env; reset/step interface) · Reinforcement Learning · Termination vs. Truncation · Stable-Baselines3 · Gym/Gymnasium MuJoCo Tasks · MuJoCo (Multi-Joint dynamics with Contact)
- Sources
- Gymnasium documentation