In reinforcement learning nobody labels the right answer. An agent acts, the world responds with a new situation and a number called a reward, and the agent adjusts so that, over time, it collects as much reward as it can. These two labs show the core ideas: balancing exploring against exploiting, and learning the long-run value of actions from experience.
Five slot machines each pay a coin with a different hidden probability. Every pull either exploits (plays the machine that looks best so far) or explores (tries another to learn more). A purely greedy player can lock onto a mediocre machine forever; a little randomness, controlled by ε (epsilon), keeps it learning. Pull the levers yourself, or let the ε-greedy agent play.
The orange bar is the agent's estimate: the average payout it has seen from that machine. With "Reveal" on, the black tick marks the true probability. Estimates from few pulls are noisy, which is exactly why exploring is necessary.
Each line is the share of pulls that chose the best machine, averaged over many fresh sets of machines.
The robot starts at S and wants the +10 goal while avoiding −10 pits. Each move costs 0.1. It keeps a table Q(s,a): its estimate of the total future reward for each move from each square. After every step it nudges that estimate toward what actually happened, the reward it got plus the discounted value of where it landed. Repeat over many episodes and good values spread backward from the goal, one square at a time.
Your moves update Q too: you are the policy, and the table still learns from what happens. Click any square to inspect it. Arrow keys work when the grid is focused.