This is the code repository for PyTorch 1.x Reinforcement Learning Cookbook, published by Packt.
Over 60 recipes to design, develop, and deploy self-learning AI models using Python
This book presents practical solutions to the most common reinforcement learning problems. The recipes in this book will help you understand the fundamental concepts to develop popular RL algorithms. You will gain practical experience in the RL domain using the modern offerings of the PyTorch 1.x library.
This book covers the following exciting features:
- Use Q-learning and the state–action–reward–state–action (SARSA) algorithm to solve various Gridworld problems
- Develop a multi-armed bandit algorithm to optimize display advertising
- Scale up learning and control processes using Deep Q-Networks
- 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
If you feel this book is for you, get your copy today!
All of the code is organized into folders.
The code will look like the following:
>>> def random_policy():
... action = torch.multinomial(torch.ones(n_action), 1).item()
... return action
Following is what you need for this book: 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.
With the following software and hardware list you can run all code files present in the book (Chapter 1-9).
Chapter | Software required | OS required |
---|---|---|
All | Python 3.7 or higher | Windows, Mac OS X, and Linux (Any) |
All | PyTorch 1.x | Windows, Mac OS X, and Linux (Any) |
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
Yuxi (Hayden) Liu is an experienced data scientist who's focused on developing machine learning and deep learning models and systems. He has worked in a variety of data-driven domains and has applied his expertise in reinforcement learning to computational. He is an education enthusiast and the author of a series of ML books. His first book, Python Machine Learning By Example, was a #1 bestseller on Amazon India in 2017 and 2018. His other books include R Deep Learning Projects and Hands-On Deep Learning Architectures with Python published by Packt. He also published five first-authored IEEE transaction and conference papers during his master's research at the University of Toronto.
Click here if you have any feedback or suggestions.