mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 06:07:08 +00:00
1.6 KiB
1.6 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, and has a compatibility wrapper for old Gym environments:
import gymnasium as gym
env = gym.make("LunarLander-v2", render_mode="human")
observation, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample() # this is where you would insert your policy
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close()
:hidden:
:caption: Introduction
content/basic_usage
content/gym_compatibility
content/migration-guide
:hidden:
:caption: API
api/env
api/registry
api/spaces
api/wrappers
api/vector
api/utils
api/experimental
:hidden:
:caption: Environments
environments/classic_control
environments/box2d
environments/toy_text
environments/mujoco
environments/atari
environments/third_party_environments
:hidden:
:glob:
:caption: Tutorials
tutorials/**/index
:hidden:
:caption: Development
Github <https://github.com/Farama-Foundation/Gymnasium>
release_notes/index
Contribute to the Docs <https://github.com/Farama-Foundation/Gymnasium/blob/main/docs/README.md>