Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
PyTorch 1.x Reinforcement Learning Cookbook

You're reading from  PyTorch 1.x Reinforcement Learning Cookbook

Product type Book
Published in Oct 2019
Publisher Packt
ISBN-13 9781838551964
Pages 340 pages
Edition 1st Edition
Languages
Author (1):
Yuxi (Hayden) Liu Yuxi (Hayden) Liu
Profile icon Yuxi (Hayden) Liu

Table of Contents (11) Chapters

Preface Getting Started with Reinforcement Learning and PyTorch Markov Decision Processes and Dynamic Programming Monte Carlo Methods for Making Numerical Estimations Temporal Difference and Q-Learning Solving Multi-armed Bandit Problems Scaling Up Learning with Function Approximation Deep Q-Networks in Action Implementing Policy Gradients and Policy Optimization Capstone Project – Playing Flappy Bird with DQN Other Books You May Enjoy

Setting up the continuous Mountain Car environment

So far, the environments we have worked on have discrete action values, such as 0 or 1, representing up or down, left or right. In this recipe, we will experience a Mountain Car environment with continuous actions.

Continuous Mountain Car (https://github.com/openai/gym/wiki/MountainCarContinuous-v0) is a Mountain Car environment with continuous actions whose value is from -1 to 1. As shown in the following screenshot, its goal is to get the car to the top of the hill on the right-hand side:

In a one-dimensional track, the car is positioned between -1.2 (leftmost) and 0.6 (rightmost), and the goal (yellow flag) is located at 0.5. The engine of the car is not strong enough to drive it to the top in a single pass, so it has to drive back and forth to build up momentum. Hence, the action is a float that represents the force of pushing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}