October 2019
Intermediate to advanced
340 pages
8h 39m
English
Let’s apply experience replay to FA Q-learning using the linear estimator, Estimator, from linear_estimator.py, which we developed in the previous recipe, Estimating Q-functions with gradient descent approximation:
>>> import gym >>> import torch >>> from linear_estimator import Estimator >>> from collections import deque >>> import random >>> env = gym.envs.make("MountainCar-v0")
>>> n_state = env.observation_space.shape[0] ...
Read now
Unlock full access