Log inStart free
LESSON 15.13 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Upper confidence bounds (UCB)

Watch UCB add a bonus for doubt and pull the arm with the highest bound.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 15.13 · BANDIT BAYFIRST 5 PULLS: ARMS 3, 4, 5, 1, 2
01
Stage 1 of 5 · Try each once
An arm with no pulls has an infinite upper confidence bound. So UCB first pulls each arm once.
Explain it simply

Before its first pull, an arm could be anything, so UCB counts it as the best possible. So the first 5 pulls try each arm once. A filled square paid 1, an empty one paid 0. Arms 3, 4 and 5 paid 1, so their averages start at 1.

The first 5 pulls try each arm once: arms 3, 4, 5, 1, 2. Rewards: 1, 1, 1, 0, 0.

hidden chanceaverage Q and bound Ubonuspullregret
00.51arm 1arm 2arm 3arm 4arm 5010pull t →0.2arm 1Q 0.00n 1pull 40.5arm 2Q 0.00n 1pull 50.7arm 3Q 1.00n 1pull 10.4arm 4Q 1.00n 1pull 20.6arm 5Q 1.00n 1pull 3armspulls00.51arm 1arm 2arm 3arm 4arm 5010pull t →0.2arm 1Q 0.00n 1pull 40.5arm 2Q 0.00n 1pull 50.7arm 3Q 1.00n 1pull 10.4arm 4Q 1.00n 1pull 20.6arm 5Q 1.00n 1pull 3armspulls
Toy: 5 arms, 1,000 pulls, 3 seeded runs
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Ua=∞while na=0\sy{u}{out}{U_a} = \infty \quad \text{while } \sy{n}{data}{n_a} = 0
pulls 1 to 5: arms 3,4,5,1,2 ⇒ Q=(0,0,1,1,1)\text{pulls 1 to 5: arms } 3, 4, 5, 1, 2 \ \Rightarrow \ Q = (0, 0, 1, 1, 1)

An arm with no pulls has an infinite bound, so it goes first.

Common mix-ups

MYTHUCB explores by pulling random arms.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With c = 0, does UCB always end up on arm 3?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.