mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 14:10:30 +00:00
1.4 KiB
1.4 KiB
hide-toc, firstpage, lastpage
hide-toc | firstpage | lastpage |
---|---|---|
true |
Gymnasium is a standard API for reinforcement learning, and a diverse collection of reference environments
:alt: Lunar Lander
:width: 500
Gymnasium is a maintained fork of OpenAI’s Gym library. The Gymnasium interface is simple, pythonic, and capable of representing general RL problems:
import gymnasium as gym
env = gym.make("LunarLander-v2", render_mode="human")
observation, info = env.reset(seed=42)
for _ in range(1000):
action = policy(observation) # User-defined policy function
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close()
:hidden:
:caption: Introduction
content/basic_usage
:hidden:
:caption: API
api/core
api/spaces
api/wrappers
api/vector
api/utils
:hidden:
:caption: Environments
environments/atari/index
environments/mujoco/index
environments/toy_text/index
environments/classic_control/index
environments/box2d/index
environments/third_party_environments/index
:hidden:
:caption: Tutorials
content/environment_creation
content/vectorising
:hidden:
:caption: Development
Github <https://github.com/Farama-Foundation/Gymnasium>
Donate <https://farama.org/donations>