Multi-Armed Bandit Algorithms
Choose repeatedly among options with unknown payoffs, balancing trying and exploiting.
The idea
Like a row of slot machines: each pull of an arm gives a random reward from an unknown distribution. You want to maximise total reward, which means exploring enough to find the best arm but exploiting it as soon as you can. Regret measures how much reward you lose compared with always pulling the best arm.
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- estimated value
- true value (dashed)
- arm just pulled
Pull 1: Exploit: pick the arm that looks best so far. Got reward 0.51.
- pulls:
- 1
- regret:
- 0.84
Bars are what the agent believes; dashed lines are the truth it is trying to discover.
Step by step
- 1Keep an estimate (and uncertainty) for every arm.
- 2Choose an arm with a strategy: ε-greedy, UCB or Thompson sampling.
- 3Observe the reward.
- 4Update that arm's estimate.
Where it is used
Website optimisation, clinical trials, content recommendation.
Watch out for
Assumes the arms' payoffs do not change over time and that each choice does not alter the future state.