Hands-on Deep Reinforcement Learning, published by Packt
Python
3,110
1,189 commits
updated Mar 2, 2026
The future of AI is unfolding. Don’t fall behind.
Stay ahead with DataPro, the free weekly newsletter for data scientists, AI/ML researchers, and data engineers.
From trending tools like PyTorch, scikit-learn, XGBoost, and BentoML to hands-on insights on database optimization and real-world ML workflows, you’ll get what matters, fast.
Stay sharp with DataPro. Join 115K+ data professionals who never miss a beat.
Business runs on data. Make sure yours tells the right story.
BIPro is your free weekly newsletter for BI professionals, analysts, and data leaders.
Get practical tips on dashboarding, data visualization, and analytics strategy with tools like Power BI, Tableau, Looker, SQL, and dbt.
Get smarter with BIPro. Trusted by 35K+ BI professionals, see what you’re missing.
Code samples for Deep Reinforcement Learning Hands-On book
This repository is being maintained by book author Max Lapan. I'm trying to keep all the examples working under the latest versions of PyTorch and gym, which is not always simple, as software evolves. For example, OpenAI Universe, extensively being used in chapter 13, was discontinued by OpenAI. List of current requirements is present in requirements.txt file.
Examples require python 3.6.
And, of course, bugs in examples are inevitable, so, exact code might differ from code present in the book text.
Too keep track of major code change, I'm using tags and branches, for example:
For the FrozenLake environment, both observation and action spaces are of the Box class
should be
For the FrozenLake environment, both observation and action spaces are of the Discrete class
This is the code repository for Deep Reinforcement Learning Hands-On, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
Recent developments in reinforcement learning (RL), combined with deep learning (DL), have seen unprecedented progress made towards training agents to solve complex problems in a human-like way. Google’s use of algorithms to play and defeat the well-known Atari arcade games has propelled the field to prominence, and researchers are generating new ideas at a rapid pace.
Deep Reinforcement Learning Hands-On is a comprehensive guide to the very latest DL tools and their limitations. You will evaluate methods including Cross-entropy and policy gradients, before applying them to real-world environments. Take on both the Atari set of virtual games and family favorites such as Connect4. The book provides an introduction to the basics of RL, giving you the know-how to code intelligent learning agents to take on a formidable array of practical tasks. Discover how to implement Q-learning on ‘grid world’ environments, teach your agent to buy and trade stocks, and find out how natural language models are driving the boom in chatbots.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
7,553 followers · starred Dec 2018
659 followers · starred Sep 2020
1,045 followers · starred Jun 2021
189 followers · starred Aug 2018
Hands-on Deep Reinforcement Learning, published by Packt
Python
3,110
1,189 commits
updated Mar 2, 2026
The future of AI is unfolding. Don’t fall behind.
Stay ahead with DataPro, the free weekly newsletter for data scientists, AI/ML researchers, and data engineers.
From trending tools like PyTorch, scikit-learn, XGBoost, and BentoML to hands-on insights on database optimization and real-world ML workflows, you’ll get what matters, fast.
Stay sharp with DataPro. Join 115K+ data professionals who never miss a beat.
Business runs on data. Make sure yours tells the right story.
BIPro is your free weekly newsletter for BI professionals, analysts, and data leaders.
Get practical tips on dashboarding, data visualization, and analytics strategy with tools like Power BI, Tableau, Looker, SQL, and dbt.
Get smarter with BIPro. Trusted by 35K+ BI professionals, see what you’re missing.
Code samples for Deep Reinforcement Learning Hands-On book
This repository is being maintained by book author Max Lapan. I'm trying to keep all the examples working under the latest versions of PyTorch and gym, which is not always simple, as software evolves. For example, OpenAI Universe, extensively being used in chapter 13, was discontinued by OpenAI. List of current requirements is present in requirements.txt file.
Examples require python 3.6.
And, of course, bugs in examples are inevitable, so, exact code might differ from code present in the book text.
Too keep track of major code change, I'm using tags and branches, for example:
For the FrozenLake environment, both observation and action spaces are of the Box class
should be
For the FrozenLake environment, both observation and action spaces are of the Discrete class
This is the code repository for Deep Reinforcement Learning Hands-On, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
Recent developments in reinforcement learning (RL), combined with deep learning (DL), have seen unprecedented progress made towards training agents to solve complex problems in a human-like way. Google’s use of algorithms to play and defeat the well-known Atari arcade games has propelled the field to prominence, and researchers are generating new ideas at a rapid pace.
Deep Reinforcement Learning Hands-On is a comprehensive guide to the very latest DL tools and their limitations. You will evaluate methods including Cross-entropy and policy gradients, before applying them to real-world environments. Take on both the Atari set of virtual games and family favorites such as Connect4. The book provides an introduction to the basics of RL, giving you the know-how to code intelligent learning agents to take on a formidable array of practical tasks. Discover how to implement Q-learning on ‘grid world’ environments, teach your agent to buy and trade stocks, and find out how natural language models are driving the boom in chatbots.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
7,553 followers · starred Dec 2018
659 followers · starred Sep 2020
1,045 followers · starred Jun 2021
189 followers · starred Aug 2018