Log inStart free
LESSON 15.24 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Importance sampling for off-policy learning

Watch episodes from one policy estimate the value of another.


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

Go Pro · $8.25/mo
EXPLAINER · 15.24 · OFF-POLICY BAYπ(R) 0.7 · b(R) 0.5 · vπ 0.93
01
Stage 1 of 6 · Two policies
The behavior policy b steps right with chance 0.5 and plays every episode. The target policy π steps right with 0.7.
Explain it simply

You see a short corridor from A to E, and every episode starts at C. The right end pays 1 and the left end pays 0. Policy b steps right with chance 0.5, and it does all the playing. Policy pi steps right with chance 0.7, and you want its value without ever running it.

A corridor of 5 states, A to E. The left end pays 0 and the right end pays 1. Policy b steps right with chance 0.5. Policy π steps right with chance 0.7.

policy b, its episodespolicy π, ratios ρestimates, π's valueplain meanwalk ends; π's value line
0ABCDE1startG 0G 1b← 0.50.5 →π← 0.30.7 →two policies0ABCDE1startG 0G 1b← 0.50.5 →π← 0.30.7 →two policies
Toy: a 5-state random walk, 10 episodes a batch
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
vπ(C)=Eπ[ G ]\sy{vpi}{out}{v_\pi(C)} = \mathbb{E}_{\sy{pi}{param}{\pi}}[\,\sy{g}{data}{G}\,]
π(R)=0.7, b(R)=0.5, vπ(C)=0.927\pi(R) = 0.7,\ b(R) = 0.5,\ v_\pi(C) = 0.927

The value of π is its mean return from C.

Common mix-ups

MYTHThe mean return of b's episodes estimates π's value.

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

Predict, then reveal
3 CHECKS · PRO
Q01With b(right) at 0.5, if π also steps right with 0.5, what happens to every ratio ρ?

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 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.