Gym: States in FrozenLake-v0

Created on 21 May 2018  路  2Comments  路  Source: openai/gym

Hi,

I'm learning how Reinforcement Learning works, and I have a question about this environment.
There are 16 states, a state for each cell of the 4x4 grid.
But, what are the correspondences?
I mean, the state 0 is the grid(0,0)?
The state 1 is the grid(0,1)? or is it the grid(1,0)??
How can I find which state describes which cell?

Thank you!

Most helpful comment

Emvironment state :
" 0 , 1 , 2 , 3 ",
" 4 , 5 , 6 , 7 ",
" 8 , 9 ,10,11",
"12,13,14,15",
corresponding to
"SFFF",
"FHFH",
"FFFH",
"HFFG"
Action "0, 1, 2, 3" is "left, down, right, up".
If state is "0" and action is "3"(right) , next state will be "1" .
Because default setting of environment is "slippery", agent won't move in the direction it intend.
You can observe the state by setting [ "is_slippery" : False ] before you create environment.
Tutorial is here : https://github.com/openai/gym/issues/565

All 2 comments

Emvironment state :
" 0 , 1 , 2 , 3 ",
" 4 , 5 , 6 , 7 ",
" 8 , 9 ,10,11",
"12,13,14,15",
corresponding to
"SFFF",
"FHFH",
"FFFH",
"HFFG"
Action "0, 1, 2, 3" is "left, down, right, up".
If state is "0" and action is "3"(right) , next state will be "1" .
Because default setting of environment is "slippery", agent won't move in the direction it intend.
You can observe the state by setting [ "is_slippery" : False ] before you create environment.
Tutorial is here : https://github.com/openai/gym/issues/565

Hey! Many thanks Wei!
Now I know why it doesn't move as intended to! All makes sense because of the "is_slippery" flag.
Thank you again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhan0903 picture zhan0903  路  4Comments

Spiral-Galaxy picture Spiral-Galaxy  路  3Comments

pickittwice picture pickittwice  路  4Comments

RuofanKong picture RuofanKong  路  3Comments

cpatyn picture cpatyn  路  4Comments