liveBook · Manning

CartPole

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

CartPole is a control-task environment in which an agent moves a cart left or right to keep a pole upright.

CartPole is a reinforcement-learning control environment where an agent moves a cart left or right to keep a pole upright. Its observation has four values: cart position, cart velocity, pole angle, and pole angular velocity. The agent receives +1 for each surviving time step; an episode ends when the pole tilts beyond ±12 degrees, the cart moves beyond ±2.4 units, or the time limit is reached. section 12.3

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Defines observations, actions, rewards, and termination, then works through neural-network training, reward tracking, and evaluation.
Examples
Uses CartPole-v1 training scripts, actor and critic classes, episode-reward plots, and Stable-Baselines3 A2C and PPO runs.
What you can do after
Apply it via PyTorch or Stable-Baselines3 to train, evaluate, and render agents that balance the pole.
How it connects
Connects CartPole to reinforcement learning, actor-critic methods, A2C, PPO, neural networks, and policy evaluation.

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.