"SimulatedCartPole" is a reinforcement learning environment consisting of a weighted pole attached to a hinge on a cart, which moves along a frictionless track. A force can be applied to the cart in the Left or the Right direction at every time step. The goal is for an agent to apply appropriate forces to the cart to prevent the pole from falling over. A reward of +1 is provided at every time step where the pole is upright. The episode is considered ended when the pole is more than 15 degrees from vertical, or the cart moves more than 2.4 units from the center.
"SimulatedCartPole" corresponds to the version of the cart-pole problem described by Barto et al., 1983. It is also identical to the OpenAI Gym implementation "CartPole-v1".
A pole attached to a moving cart via a hinge.
Open the "SimulatedCartPole" environment:
Observe the initial state:
Visualize the environment:
Obtain a random action:
Take the random action:
Taking an action usually modifies the "ObservedState":
Reset the environment to an initial state. The initial "ObservedState" is returned: