October 2019
Intermediate to advanced
340 pages
8h 39m
English
Let's simulate the Cliff Walking environment by performing the following steps:
>>> import gym>>> env = gym.make("CliffWalking-v0")>>> n_state = env.observation_space.n>>> print(n_state)48>>> n_action = env.action_space.n>>> print(n_action)4
>>> env.reset() 0
The agent starts with state 36 as the bottom-left tile.
>>> env.render()
>>> new_state, reward, is_done, info = env.step(2)>>> env.render() o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o x C C C C C C C C C C T
The ...
Read now
Unlock full access