Skip to Main Content
Advanced Deep Learning with Keras
book

Advanced Deep Learning with Keras

by Rowel Atienza, Neeraj Verma, Valerio Maggio
October 2018
Intermediate to advanced content levelIntermediate to advanced
368 pages
9h 20m
English
Packt Publishing
Content preview from Advanced Deep Learning with Keras

DQN on Keras

To illustrate DQN, the CartPole-v0 environment of the OpenAI Gym is used. CartPole-v0 is a pole balancing problem. The goal is to keep the pole from falling over. The environment is 2D. The action space is made of two discrete actions (left and right movements). However, the state space is continuous and is made of four variables:

  1. Linear position
  2. Linear velocity
  3. Angle of rotation
  4. Angular velocity

The CartPole-v0 is shown in Figure 9.6.1.

Initially, the pole is upright. A reward of +1 is provided for every timestep that the pole remains upright. The episode ends when the pole exceeds 15 degrees from the vertical or 2.4 units from the center. The CartPole-v0 problem is considered solved if the average reward is 195.0 in 100 consecutive trials: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Neural Networks with Keras

Hands-On Neural Networks with Keras

Niloy Purkait
Deep Learning with Keras

Deep Learning with Keras

Antonio Gulli, Sujit Pal
Keras Deep Learning Cookbook

Keras Deep Learning Cookbook

Rajdeep Dua, Sujit Pal, Manpreet Singh Ghotra

Publisher Resources

ISBN: 9781788629416Supplemental Content