Live RL Agent — Watch It Learn

A REINFORCE policy-gradient agent learns to balance a pole on a cart in real time. No pre-training, no download. Press Run and watch.

0
Episode
0
Best steps
0
Avg (last 10)
0
Current steps

How it works: The environment is CartPole — a cart on a track with a pole attached by a hinge. The goal is to keep the pole upright by pushing left or right. The agent is a two-layer neural network (4→32→2, tanh activations). At each step, it samples an action from a softmax policy, observes the next state, and updates weights via REINFORCE (policy gradient) at the end of each episode. No external libraries.