Commit 3d23258e authored by Jonas Boysen's avatar Jonas Boysen
Browse files

add intro ipynbs

parent b11958d7
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
%% Cell type:code id: tags:

``` python
import gymnasium as gym
import matplotlib.pyplot as plt
from IPython.display import clear_output

env = gym.make("CliffWalking-v0", render_mode="rgb_array")
env.action_space.seed(42)

observation, info = env.reset(seed=42)

for _ in range(100):
    observation, reward, terminated, truncated, info = env.step(env.action_space.sample())

    if terminated:
        observation, info = env.reset(return_info=True)

    clear_output(wait=True)
    plt.imshow(env.render())
    plt.show()
```
+0 −0

File added.

Preview size limit exceeded, changes collapsed.