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
Other Books You May Enjoy

Chapter 3. Deep Learning with PyTorch

In the previous chapter, we became familiar with open source libraries, which provided us with a collection of RL environments. However, recent developments in RL, especially its combination with deep learning (DL), now make it possible to solve much more complex and challenging problems than before. This is partly due to the development of DL methods and tools.

This chapter is dedicated to one such tool, which makes it possible to implement complex DL models in just a bunch of lines of Python code. The chapter doesn't pretend to be a complete DL manual, as the field is very wide and dynamic. The goal is to make you familiar with the PyTorch library specifics and implementation details, assuming that you're already familiar with DL fundamentals.

Compatibility note: All of the examples in this chapter were updated for the latest PyTorch 0.4.0, which has a number of changes compared with the previous 0.3.1 release. If you're using the old PyTorch, consider...