Gym: Setting is_slippery=False in FrozenLake-v0

Created on 22 Apr 2017  路  4Comments  路  Source: openai/gym

I want to make FrozenLake-v0 work as deterministic problem, so want to set variable is_slippery=False.
How can I set it to False while initialing the environment?
Reference to code

Most helpful comment

You should register an environment with a different name and the kwargs you want, something like:

from gym.envs.registration import register
register(
    id='FrozenLakeNotSlippery-v0',
    entry_point='gym.envs.toy_text:FrozenLakeEnv',
    kwargs={'map_name' : '4x4', 'is_slippery': False},
    max_episode_steps=100,
    reward_threshold=0.78, # optimum = .8196
)

All 4 comments

You should register an environment with a different name and the kwargs you want, something like:

from gym.envs.registration import register
register(
    id='FrozenLakeNotSlippery-v0',
    entry_point='gym.envs.toy_text:FrozenLakeEnv',
    kwargs={'map_name' : '4x4', 'is_slippery': False},
    max_episode_steps=100,
    reward_threshold=0.78, # optimum = .8196
)

Thanks, that works!

You can simply do,
env = gym.make('FrozenLake-v0', is_slippery=False)

Source

You can simply do,
env = gym.make('FrozenLake-v0', is_slippery=False)

Source

Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cpatyn picture cpatyn  路  4Comments

RuofanKong picture RuofanKong  路  4Comments

Kallin picture Kallin  路  4Comments

Baichenjia picture Baichenjia  路  3Comments

julian-ramos picture julian-ramos  路  4Comments