October 2019
Intermediate to advanced
366 pages
12h 4m
English
The core of the algorithm, namely the computational graph and the training (and evaluation) loop, is implemented in the DQN function, which takes the name of the environment and all the other hyperparameters as arguments:
def DQN(env_name, hidden_sizes=[32], lr=1e-2, num_epochs=2000, buffer_size=100000, discount=0.99, update_target_net=1000, batch_size=64, update_freq=4, frames_num=2, min_buffer_size=5000, test_frequency=20, start_explor=1, end_explor=0.1, explor_steps=100000): env = make_env(env_name, frames_num=frames_num, skip_frames=True, noop_num=20) env_test = make_env(env_name, frames_num=frames_num, skip_frames=True, noop_num=20) env_test = gym.wrappers.Monitor(env_test, "VIDEOS/TEST_VIDEOS ...
Read now
Unlock full access