Gridworld environment for reinforcement learning from Sutton & Barto (2017). Grid of shape 4x12 with a goal state in the bottom right of the grid. Episodes start in the lower left state. Possible actions include going left, right, up and down. Some states in the lower part of the grid are a cliff, so taking a step into this cliff will yield a high negative reward of - 100 and move the agent back to the starting state. Elsewise rewards are - 1, for the goal state 0.
This is the gridworld (goal state denoted G, cliff states denoted C, start state denoted S):
Take action in environment. Returns a list with
done flag of the environment and returns an initial state.
Useful when starting a new episode.
Visualizes the environment (if there is a visualization function).
Sutton and Barto (Book draft 2017): Reinforcement Learning: An Introduction Example 6.6
env = makeEnvironment("cliff.walking")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.