Resetting The Game

One can reset the game with,

state = env.reset() # reset the game
print('State of the Cart-Pole after reset', state)
print('Shape of state of the Cart-Pole after reset', state.shape)

The above snippet will reset the game and also return you the state (x, x_dot, theta, theta_dot) of the Cart-Pole after the reset, which will be an array of shape (4,)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.134.17