Basic DQN
To get started, we will implement the same DQN method as in Chapter 6, but leveraging the high-level primitives described in Chapter 7. This will make our code much more compact, which is good, as non-relevant details won’t distract us from the method’s logic. At the same time, the purpose of this book is not to teach you how to use the existing libraries but rather how to develop intuition about RL methods and, if necessary, implement everything from scratch. From my perspective, this is a much more valuable skill, as libraries come and go, but true understanding of the domain will allow you to quickly make sense of other people’s code and apply it consciously.
In the basic DQN implementation, we have three modules in the Chapter08 folder of the GitHub repository for this book:
-
Chapter08/lib/dqn_model.py: The DQN neural network (NN), which is the same as in Chapter 6, so I won’t repeat it
...