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

Occupancy measures and reachability

Watch a policy decide which cells an agent can reach and where it stays.


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.11 · GRIDWORLDPOLICY DIRECT · SLIP 0.1
01
Stage 1 of 6 · The chain
A fixed policy turns the gridworld into a Markov chain. Each arrow is one move with its probability.
Explain it simply

Each cell picks one move from the policy: the ochre arrow. On a slippery floor, the agent slides sideways with chance 0.1: the grey arrows. Once the policy is fixed, no choice is left. What remains is a chain of chances, like a board game with dice.

A 4 by 4 grid. The start is bottom left, the goal top right, the pit at row 3, column 3. The direct policy moves with slip 0.1.

policy move, closed loop, weightsslip movereachableprobability, goal, positive sharepit, leak, negative share
the chain P_πone row11223344goalpitstartfrom (4, 1): one row of P_πup → (3, 1)0.05stay0.05right → (4, 2)0.90all of P_π: 16 rows (from) × 16 columns (to)row (4, 1), sums to 1from (4, 1): 0.05 + 0.05 + 0.90 = 1the chain P_πone row11223344goalpitstartfrom (4, 1): one row of P_πup → (3, 1)0.05stay0.05right → (4, 2)0.90all of P_π: 16 rows (from) × 16 columns (to)row (4, 1), sums to 1from (4, 1): 0.05 + 0.05 + 0.90 = 1
Toy: a 4 × 4 gridworld with one goal, one pit and slippery moves
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Pπ(s′∣s)=∑aπ(a∣s) P(s′∣s,a)\sy{P}{param}{P_\pi}(s' \mid s) = \sum_a \sy{pi}{param}{\pi(a \mid s)}\, P(s' \mid s, a)
∑s′Pπ(s′∣(4,1))=0.05+0.05+0.90=1\textstyle\sum_{s'} P_\pi(s' \mid (4, 1)) = 0.05 + 0.05 + 0.90 = 1

Each row of the chain mixes the moves the policy picks.

Common mix-ups

MYTHIf the agent runs long enough, it visits every cell.

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

Predict, then reveal
3 CHECKS · PRO
Q01At slip chance 0, how many cells can the direct policy reach?

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.