Files
Gymnasium/docs/index.md

2.3 KiB
Raw Blame History

hide-toc, firstpage, lastpage
hide-toc firstpage lastpage
true

Gymnasium is a standard API for reinforcement learning, and a diverse collection of reference environments.

Note: The video includes clips with trained agents from Stable Baselines3. (Link)

Gymnasium is a maintained fork of OpenAIs Gym library. It provides a user-friendly, pythonic interface for creating and interacting with reinforcement learning environments. With Gymnasium, you can access a diverse collection of environments, as well as represent your own custom RL environments. If you require an environment that is only available in the old Gym, you can use the compatibility wrapper.

Here is a minimal code example to run an environment:

import gymnasium as gym

env = gym.make("CartPole-v1", render_mode="human")
observation, info = env.reset(seed=42) # get the first observation

for step in range(1000):
	# here you can use your policy to get an action based on the observation
	action = env.action_space.sample()

	# execute the action in the environment
	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
Comet Tutorial <https://www.comet.com/docs/v2/integrations/ml-frameworks/gymnasium/?utm_source=gymnasium&utm_medium=partner&utm_campaign=partner_gymnasium_2023&utm_content=docs_gymnasium>
:hidden:
:caption: Development

Github <https://github.com/Farama-Foundation/Gymnasium>
gymnasium_release_notes/index
gym_release_notes/index
Contribute to the Docs <https://github.com/Farama-Foundation/Gymnasium/blob/main/docs/README.md>