O'Reilly logo

Hands-On Q-Learning with Python by Nazia Habib

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing CartPole-v1

Your task in the CartPole environment is simple: move a cart back and forth along a wire so that a pole pivoting on the cart balances upright. In control theory, this is called the inverted pendulum problem, and it is one of several classic control theory problems implemented as reinforcement learning environments in OpenAI Gym.

Here's an illustration of the Gym implementation of the task:

The inverted pendulum as defined in control theory is an underactuated system, meaning it has more degrees of freedom than actuated (controllable) types of movement.

In other words, the position of the cart can be directly controlled, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required