θ = 0.0° x = 0.00 m action: —
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

CartPole REINFORCE: Policy Gradient with Baseline

This simulator trains a real reinforcement-learning agent live, in the browser, on the classic cart-pole balancing task. A linear softmax policy network picks left/right pushes, and after every episode its weights are updated with the true REINFORCE Monte-Carlo policy-gradient rule — ∇log π(a|s) times the episode's discounted return, optionally minus a baseline to reduce variance. Watch the pole go from falling in a few steps to balancing for hundreds, while the learning-curve graph and live stats track episode length, running average, and the best run so far.