INTRODUCTION

Welcome to the chapter on Reinforcement Learning. In the previous chapters till now, you have worked on solving supervised learning problems. In this chapter, we will learn to build and train a Deep Reinforcement Learning model capable of playing games. 

Reinforcement learning is often a new paradigm for deep learning engineers and this is why we're using the framework of a game for this training.  The business use cases that we should be looking out for are typified by process optimization.  Reinforcement learning is great for gaming, but also applicable in use cases ranging from drone control and navigation to optimizing file downloads over mobile networks .  

We will do this with something called Deep Q Learning and Deep Sarsa Learning. The idea is that we will build a deep learning model also called an agent in reinforcement learning terms, that interacts with the game environment and learns how to play the game while maximizing rewards after several attempts at playing. 

Figure 15.1: Reinforcement Learning Illustration

For the purpose of this chapter, we will be using the Cart-Pole game from Open Gym AI. 

What we'll learn in this chapter is:

  1. How to interact with Gym toolkit
  2. What is Q learning and SARSA Learning
  3.  Code the RL model and define hyperparameters
  4. Build and understand the training loop
  5. Test the model

It would be better if you implement the code snippets as you go along this chapter either in a jupyter notebook or any source code editor.  This will make it easier for you to follow along as well as understand what each part of the code does.

All the python files and the jupyter notebooks for this chapter can be found here https://github.com/PacktPublishing/Python-Deep-Learning-Projects/tree/master/Chapter%2015

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

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