Book description
Implement reinforcement learning techniques and algorithms with the help of realworld examples and recipes
Key Features
 Use PyTorch 1.x to design and build selflearning artificial intelligence (AI) models
 Implement RL algorithms to solve control and optimization challenges faced by data scientists today
 Apply modern RL libraries to simulate a controlled environment for your projects
Book Description
Reinforcement learning (RL) is a branch of machine learning that has gained popularity in recent times. It allows you to train AI models that learn from their own actions and optimize their behavior. PyTorch has also emerged as the preferred tool for training RL models because of its efficiency and ease of use.
With this book, you'll explore the important RL concepts and the implementation of algorithms in PyTorch 1.x. The recipes in the book, along with realworld examples, will help you master various RL techniques, such as dynamic programming, Monte Carlo simulations, temporal difference, and Qlearning. You'll also gain insights into industryspecific applications of these techniques. Later chapters will guide you through solving problems such as the multiarmed bandit problem and the cartpole problem using the multiarmed bandit algorithm and function approximation. You'll also learn how to use Deep QNetworks to complete Atari games, along with how to effectively implement policy gradients. Finally, you'll discover how RL techniques are applied to Blackjack, Gridworld environments, internet advertising, and the Flappy Bird game.
By the end of this book, you'll have developed the skills you need to implement popular RL algorithms and use RL techniques to solve realworld problems.
What you will learn
 Use Qlearning and the stateactionrewardstateaction (SARSA) algorithm to solve various Gridworld problems
 Develop a multiarmed bandit algorithm to optimize display advertising
 Scale up learning and control processes using Deep QNetworks
 Simulate Markov Decision Processes, OpenAI Gym environments, and other common control problems
 Select and build RL models, evaluate their performance, and optimize and deploy them
 Use policy gradient methods to solve continuous RL problems
Who this book is for
Machine learning engineers, data scientists and AI researchers looking for quick solutions to different reinforcement learning problems will find this book useful. Although prior knowledge of machine learning concepts is required, experience with PyTorch will be useful but not necessary.
Table of contents
 Title Page
 Copyright and Credits
 About Packt
 Contributors
 Preface
 Getting Started with Reinforcement Learning and PyTorch
 Markov Decision Processes and Dynamic Programming

Monte Carlo Methods for Making Numerical Estimations
 Calculating Pi using the Monte Carlo method
 Performing Monte Carlo policy evaluation
 Playing Blackjack with Monte Carlo prediction
 Performing onpolicy Monte Carlo control
 Developing MC control with epsilongreedy policy
 Performing offpolicy Monte Carlo control
 Developing MC control with weighted importance sampling
 Temporal Difference and QLearning

Solving Multiarmed Bandit Problems
 Creating a multiarmed bandit environment
 Solving multiarmed bandit problems with the epsilongreedy policy
 Solving multiarmed bandit problems with the softmax exploration
 Solving multiarmed bandit problems with the upper confidence bound algorithm
 Solving internet advertising problems with a multiarmed bandit
 Solving multiarmed bandit problems with the Thompson sampling algorithm
 Solving internet advertising problems with contextual bandits

Scaling Up Learning with Function Approximation
 Setting up the Mountain Car environment playground
 Estimating Qfunctions with gradient descent approximation
 Developing Qlearning with linear function approximation
 Developing SARSA with linear function approximation
 Incorporating batching using experience replay
 Developing Qlearning with neural network function approximation
 Solving the CartPole problem with function approximation
 Deep QNetworks in Action

Implementing Policy Gradients and Policy Optimization
 Implementing the REINFORCE algorithm
 Developing the REINFORCE algorithm with baseline
 Implementing the actorcritic algorithm
 Solving Cliff Walking with the actorcritic algorithm
 Setting up the continuous Mountain Car environment
 Solving the continuous Mountain Car environment with the advantage actorcritic network
 Playing CartPole through the crossentropy method
 Capstone Project – Playing Flappy Bird with DQN
 Other Books You May Enjoy
Product information
 Title: PyTorch 1.x Reinforcement Learning Cookbook
 Author(s):
 Release date: October 2019
 Publisher(s): Packt Publishing
 ISBN: 9781838551964
You might also like
book
Python Reinforcement Learning Projects
Deploy autonomous agents in business systems using powerful Python libraries and sophisticated reinforcement learning models Key …
book
HandsOn Reinforcement Learning for Games
Explore reinforcement learning (RL) techniques to build cuttingedge games using Python libraries such as PyTorch, OpenAI …
book
Data Science from Scratch, 2nd Edition
To really learn data science, you should not only master the tools—data science libraries, frameworks, modules, …
book
Learning Go
Go is rapidly becoming the preferred language for building web services. There are plenty of tutorials …