Loading the game Environment

Just like we loaded the game in the DQN segment, we load the game into the workspace and set seed for reproducibility. 

env = gym.make('CartPole-v1')

# set seed
seed_val = 456
env.seed(seed_val)
np.random.seed(seed_val)

states = env.observation_space.shape[0]
actions = env.action_space.n
..................Content has been hidden....................

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