October 2018
Intermediate to advanced
472 pages
10h 57m
English
You can reset the game with the following code:
state = env.reset() # reset the gameprint('State of the Cart-Pole after reset', state)print('Shape of state of the Cart-Pole after reset', state.shape)
The preceding snippet will reset the game and also return you the state (x, x_dot, theta, theta_dot) of the CartPole after the reset, which will be an array of the shape of (4,).
Read now
Unlock full access