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

Nonstationary and contextual MDPs

Watch one gridworld change its ice, and a fixed policy fall behind.


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 · 20.13 · CONTEXT BAYICY DAY · SLIP 0.4 · AIMED 0.6
01
Stage 1 of 6 · The context
In a contextual MDP, a context picks the transitions. Here the context is the ice slip chance: 0.4.
Explain it simply

A context is a setting that picks which version of the world you are in, here the kind of day. The cells, the goal and the pit never change. On an icy day, the move down from cell 10 reaches cell 14 with chance 0.6. It slides into the pit with chance 0.2.

The 4 by 4 grid with 5 ice cells. From cell 10, the move down reaches cell 14 with chance 0.6, and each side with chance 0.2.

agent, ice movesslip chancegoal, returns, estimatespit, regretice
01234567891011pit12131415goal0.50.250.250.60.20.2dry dayslip 0aims 1.0slides 0.0icy dayslip 0.4aims 0.6slides 0.4frozen dayslip 0.8aims 0.2slides 0.8one grid, three kinds of dayicy day · slip 0.4P(14 | 10, ↓) = 0.6 · P(pit | 10, ↓) = 0.201234567891011pit12131415goal0.50.250.250.60.20.2dry dayslip 0aims 1.0slides 0.0icy dayslip 0.4aims 0.6slides 0.4frozen dayslip 0.8aims 0.2slides 0.8one grid, three kinds of dayicy day · slip 0.4P(14 | 10, ↓) = 0.6 · P(pit | 10, ↓) = 0.2
Toy: the 15.C1 gridworld, 3 kinds of day, 60 episodes
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Mc=(S,A,Pc,R,γ)\sy{M}{ink}{M_c} = (S, A, \sy{P}{param}{P_c}, R, \gamma)
Pc(14∣10,↓)=1−0.4=0.6, Pc(11∣10,↓)=0.4/2=0.2P_c(14 \mid 10, \downarrow) = 1 - 0.4 = 0.6,\ P_c(11 \mid 10, \downarrow) = 0.4/2 = 0.2

Each context c has its own transition chances; the rest stays fixed.

Common mix-ups

MYTHThe policy for the iciest day is safe on any day.

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

Predict, then reveal
3 CHECKS · PRO
Q01The dry-day policy runs on a frozen day. Is its expected return above or below zero?

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.