It is time to combine all the techniques we have discussed into a comprehensive implementation that makes use of all of those techniques to get maximum performance. We will use the environment.atari module that we created in the previous section with several useful Gym environment wrappers. Let's look at the code outline to understand the code's structure:
You will notice that some sections of the code are removed for brevity and replaced with..., signifying that the code in that section has been folded/hidden. You can find the latest version of the complete code in this book's code repository at ch6/deep_Q_Learner.py.
#!/usr/bin/env python#!/usr/bin/env pythonimport gymimport torchimport random ...
Get Hands-On Intelligent Agents with OpenAI Gym now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.