Skip to content

Commit

Permalink
chore: update gym example in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sash-a authored Nov 21, 2024
1 parent 33d13bd commit cfc1902
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/guides/wrappers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ next_timestep = dm_env.step(action)
...
```

## Jumanji To Gym
We can also convert our Jumanji environments to a [Gym](https://github.com/openai/gym) environment!
Below is an example of how to convert a Jumanji environment into a Gym environment.
## Jumanji To Gymnasium
We can also convert our Jumanji environments to a [Gymnasium](https://github.com/Farama-Foundation/Gymnasium) environment!
Below is an example of how to convert a Jumanji environment into a Gymnasium environment.

```python
import jumanji.wrappers

env = jumanji.make("Snake-6x6-v0")
gym_env = jumanji.wrappers.JumanjiToGymWrapper(env)

obs = gym_env.reset()
obs, info = gym_env.reset()
action = gym_env.action_space.sample()
observation, reward, done, extra = gym_env.step(action)
observation, reward, term, trunc, info = gym_env.step(action)
...
```

Expand Down

0 comments on commit cfc1902

Please sign in to comment.