Log inStart free
LESSON 15.15 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Contextual bandits

Watch a learner pick a different best article for each time of day.


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

Go Pro · $8.25/mo
EXPLAINER · 15.15 · RL BAY3 TIMES OF DAY · 3 ARTICLES · 300 USERS
01
Stage 1 of 6 · Context first
Each user arrives with a context, the time of day. The best article changes with the context.
Explain it simply

Each row is one time of day, and each column is one article. The tick in each cell shows how often users click it. In the morning news wins, at noon food wins, and at night sport wins. The dots show the first 30 users in the row of their time.

A grid of 3 times of day by 3 articles. Each cell has a true click rate. Morning: news 0.7. Noon: food 0.7. Night: sport 0.6. Dots show the time of day of the first 30 users.

true click rateestimate, best pickmiss, regret, lost clickexplore, delay, window, shiftcell
true click ratesnewssportfoodmorningnoonnight0.70.20.30.30.10.70.20.60.1users 1 to 30, by time of daytrue click ratesnewssportfoodmorningnoonnight0.70.20.30.30.10.70.20.60.1users 1 to 30, by time of day
Toy: 3 times × 3 articles, 300 users, ε = 0.1
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
p(x, a)\sy{p}{data}{p}(\sy{x}{data}{x},\, \sy{a}{out}{a})
p(noon,food)=0.7p(\text{noon}, \text{food}) = 0.7

The click rate depends on the context and the article.

Common mix-ups

MYTHOne good article is enough for every user.

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

Predict, then reveal
3 CHECKS · PRO
Q01If each result arrives 40 steps late, does the regret go up or down?

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

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 2 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.