Book Image

Deep Reinforcement Learning Hands-On

By : Maxim Lapan
Book Image

Deep Reinforcement Learning Hands-On

By: Maxim Lapan

Overview of this book

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.
Table of Contents (23 chapters)
Deep Reinforcement Learning Hands-On
Contributors
Preface
Other Books You May Enjoy
Index

Simple clicking approach


As the first demo, let's implement a simple Asynchronous Advantage Actor-Critic (A3C) agent, which decides where it should click on given the image observation. This approach can solve only a small subset of the full MiniWoB suite and we'll discuss restrictions of this approach later. For now, it will allow us to get a better understanding of the problem.

As with the previous chapter, due to size of the code, I won't put a complete source code here. We'll focus on the most important functions and give the rest as an overview. The complete source code is available in the GitHub repository https://github.com/PacktPublishing/Deep-Reinforcement-Learning-Hands-On.

Grid actions

When we talked about OpenAI Universe's architecture and organization, it was mentioned that the richness and flexibility of the action space creates lots of challenges for the RL agent. MiniWoB's active area inside the browser is just 160x210 (exactly the same dimension that the Atari emulator has...