Book Image

Deep Reinforcement Learning with Python - Second Edition

By : Sudharsan Ravichandiran
Book Image

Deep Reinforcement Learning with Python - Second Edition

By: Sudharsan Ravichandiran

Overview of this book

With significant enhancements in the quality and quantity of algorithms in recent years, this second edition of Hands-On Reinforcement Learning with Python has been revamped into an example-rich guide to learning state-of-the-art reinforcement learning (RL) and deep RL algorithms with TensorFlow 2 and the OpenAI Gym toolkit. In addition to exploring RL basics and foundational concepts such as Bellman equation, Markov decision processes, and dynamic programming algorithms, this second edition dives deep into the full spectrum of value-based, policy-based, and actor-critic RL methods. It explores state-of-the-art algorithms such as DQN, TRPO, PPO and ACKTR, DDPG, TD3, and SAC in depth, demystifying the underlying math and demonstrating implementations through simple code examples. The book has several new chapters dedicated to new RL techniques, including distributional RL, imitation learning, inverse RL, and meta RL. You will learn to leverage stable baselines, an improvement of OpenAI’s baseline library, to effortlessly implement popular RL algorithms. The book concludes with an overview of promising approaches such as meta-learning and imagination augmented agents in research. By the end, you will become skilled in effectively employing RL and deep RL in your real-world projects.
Table of Contents (22 chapters)
Other Books You May Enjoy

The double DQN

We have learned that in DQN, the target value is computed as:

One of the problems with a DQN is that it tends to overestimate the Q value of the next state-action pair in the target:

This overestimation is due to the presence of the max operator. Let's see how this overestimation happens with an example. Suppose we are in a state and we have three actions a1, a2, and a3. Assume a3 is the optimal action in the state . When we estimate the Q values of all the actions in state , the estimated Q value will have some noise and differ from the actual value. Say, due to the noise, action a2 will get a higher Q value than the optimal action a3.

We know that the target value is computed as:

Now, if we select the best action as the one that has the maximum value then we will end up selecting the action a2 instead of optimal action a3, as shown here:

So, how can we get rid of this overestimation? We can get rid of this overestimation...