No teacher gives the right answers. An agent acts, the world responds, and a single number — the reward — says how well it did. Reinforcement learning is the mathematics of turning that number into behaviour. In this module’s 27 interactive demonstrations, the agents learn live in your browser. Play slot machines against Thompson sampling. Raise a landscape of values out of a gridworld. Watch Q-learning and SARSA take different routes past a cliff. See a car learn to climb a mountain and a network learn to balance a pole. Then watch a DQN learn a game from pixels, play Connect Four against tree search, and teach a reward model your own preferences.
See also: Machine Learning for gradient descent and backpropagation, Probability for Markov chains and expectations, and Game Theory for minimax and equilibria.
A row of slot machines with unknown payouts. Play them yourself, then race ε-greedy, UCB and Thompson sampling and watch regret grow like log t.
States, actions, slippery transitions and rewards. Build a world, turn the discount factor and watch the best route change, and see a value as the average of a thousand futures.
Value iteration raises a landscape of values out of the goal. Policy iteration flips arrows until none change, and the Bellman operator squeezes every guess toward one fixed point.
No model, only experience. Monte Carlo against temporal-difference learning, Q-learning against SARSA on the cliff, and eligibility traces that pass credit down a trail.
Too many states for a table. Tile coding generalises between nearby states, a car learns to climb a mountain, and Baird’s counterexample shows learning blow up.
Adjust the policy itself, uphill in expected reward. Noisy REINFORCE estimates and the baseline that tames them, a pole balanced by a network trained in your browser, and trust regions.
A neural network learns a game from pixels while you watch. Experience replay and target networks keep it stable, and Double Q-learning stops it overrating itself.
Learn a model, then plan with it. Dyna-Q finds a shortcut, Monte Carlo tree search plays Connect Four against you, and self-play teaches noughts and crosses from nothing.
Agents optimise exactly what you reward. Watch one exploit a loophole, teach a reward model from your own preferences, and see how a KL leash limits over-optimisation.