Browser RL Showcase

DQN agent training on CartPole-v1, in your browser. Powered by TensorFlow.js.

Controls

Live

Episode
0
Step
0
Last reward
0
Episode length
0
Buffer
0 / 10000
Epsilon
1.000
Loss
Mean Q

Training curves

CartPole live

The pole's tip color shifts from blue (stable) to red (falling). Action is rendered briefly as a small arrow on the cart.

About

DQN (Deep Q-Network) trains a small MLP to estimate Q-values for CartPole's 4D state. The agent's goal is to maximize the cumulative reward by keeping the pole balanced. The target network stabilizes training, and ε-greedy exploration gradually shifts toward greedy exploitation.

See src/algorithms/dqn-agent.ts for the agent, src/envs/cartpole.ts for the environment, and src/ui/app.ts for this UI's entry point.