Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Deep Reinforcement Learning Hands-On. - Second Edition

You're reading from  Deep Reinforcement Learning Hands-On. - Second Edition

Product type Book
Published in Jan 2020
Publisher Packt
ISBN-13 9781838826994
Pages 826 pages
Edition 2nd Edition
Languages
Author (1):
Maxim Lapan Maxim Lapan
Profile icon Maxim Lapan

Table of Contents (28) Chapters

Preface What Is Reinforcement Learning? OpenAI Gym Deep Learning with PyTorch The Cross-Entropy Method Tabular Learning and the Bellman Equation Deep Q-Networks Higher-Level RL Libraries DQN Extensions Ways to Speed up RL Stocks Trading Using RL Policy Gradients – an Alternative The Actor-Critic Method Asynchronous Advantage Actor-Critic Training Chatbots with RL The TextWorld Environment Web Navigation Continuous Action Space RL in Robotics Trust Regions – PPO, TRPO, ACKTR, and SAC Black-Box Optimization in RL Advanced Exploration Beyond Model-Free – Imagination AlphaGo Zero RL in Discrete Optimization Multi-agent RL Other Books You May Enjoy
Index

DDPG training and results

To train the policy using our model, we will use deep deterministic policy gradients (DDPGs), which we covered in detail in Chapter 17, Continuous Action Space. I won't spend time here showing the code, which is in Chapter18/train_ddpg.py and Chapter18/lib/ddpg.py. For exploration, the Ornstein-Uhlenbeck process was used in the same way as for the Minitaur model.

The only thing I'd like to emphasize is the size of the model, in which the actor part was intentionally reduced to meet our hardware limitations. The actor has one hidden layer with 20 neurons, giving just two matrices (not counting the bias) of 28×20 and 20×4. The input dimensionality is 28, due to observation stacking, where four past observations are passed to the model. This dimensionality reduction leads to very fast training, which can be done without a GPU involved.

To train the model, you should run the train_ddpg.py program, which accepts the following arguments...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}