Files
Gymnasium/docs/index.md

77 lines
1.4 KiB
Markdown
Raw Normal View History

2022-09-13 20:27:34 +01:00
---
hide-toc: true
firstpage:
lastpage:
---
## Gymnasium is a standard API for reinforcement learning, and a diverse collection of reference environments
```{figure} _static/videos/box2d/lunar_lander_continuous.gif
:alt: Lunar Lander
:width: 500
```
**Gymnasium is a maintained fork of OpenAIs Gym library. The Gymnasium interface is simple, pythonic, and capable of representing general RL problems:**
2022-09-13 20:27:34 +01:00
```{code-block} python
2022-09-19 21:14:09 +01:00
import gymnasium as gym
env = gym.make("LunarLander-v2", render_mode="human")
2022-09-13 20:27:34 +01:00
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()
```
```{toctree}
:hidden:
:caption: Introduction
content/basic_usage
```
```{toctree}
:hidden:
:caption: API
api/core
api/spaces
api/wrappers
api/vector
api/utils
```
```{toctree}
: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
```
```{toctree}
:hidden:
:caption: Tutorials
content/environment_creation
content/vectorising
```
```{toctree}
:hidden:
:caption: Development
Github <https://github.com/Farama-Foundation/Gymnasium>
2022-09-13 20:27:34 +01:00
Donate <https://farama.org/donations>
```