openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.76k stars 8.61k forks source link

Bad rendering in FronzenLake #573

Closed pablocastilla closed 7 years ago

pablocastilla commented 7 years ago

Hi!

If I just move in frozen lake to the right twice I don't see the red square in that position.

Quite strange:

Code: import gym import tensorflow as tf import numpy as np

env = gym.make('FrozenLake-v0')

env.reset() rewards = [] for _ in range(2):
state, reward, done, info = env.step(2) env.render()
rewards.append(reward) if done:
env.reset()

Result:

capture

Thanks

tlbtlbtlb commented 7 years ago

From https://gym.openai.com/envs/FrozenLake-v0:

"However, the ice is slippery, so you won't always move in the direction you intend."

Specifically, it has a 1/3 chance of moving in the direction given and 1/3 each to the orthogonal directions. It never moves in the opposite direction. A tabular Q learning agent should have no problem figuring this out.

pablocastilla commented 7 years ago

Ouch! Sorry!

I will try to program better than I read :)