Implementation

To implement n-step DQN, only a few changes in the buffer are required. When sampling from the buffer, the n-step reward, the n-step next state, and the n-step done flag have to be returned. We will not provide the implementation here as it is quite simple but you can look at it in the code provided in this book's GitHub repository. The code to support n-step return is in the MultiStepExperienceBuffer class.

..................Content has been hidden....................

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