Log inStart free
LESSON 15.C1 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

An MDP on one gridworld, end to end

Follow one gridworld from its rules to its best moves.


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.C1 · MDP BAY16 cells · 4 moves · slip 0.2 · γ 0.9
01
Stage 1 of 6 · The MDP
The MDP: 16 cells, 4 moves, goal +1, pit −1, three start cells. On ice, a move slides to each side with chance 0.1.
Explain it simply

Each square is a cell, a state the agent can be in. The ochre arrows are the policy, the move it picks in each cell. From cell 10, the thin lines show where down can land, even in the pit. The labels on cells 0, 1 and 4 are the start chances.

A 4 by 4 grid. The goal is cell 15 and the pit is cell 11. Ice covers cells 5, 6, 9, 10 and 14. Down from cell 10 lands in cells 14, 11 and 9 with chances 0.8, 0.1 and 0.1.

cells, episodespolicy, chances, γgoal, returns, valuespit, negative valuesice tile, a slide
0ρ₀ 0.51ρ₀ 0.25234ρ₀ 0.25567891011pit −112131415goal +10.80.10.1S16 cells (states)Aup, right, down, leftPice: 0.8 as asked, 0.1 each sideRgoal +1, pit −1, else 0ρ₀cell 0: 0.5, cells 1 and 4: 0.25γ0.9 per move of delaythe gridworldMDP components · 15.070ρ₀ 0.51ρ₀ 0.25234ρ₀ 0.25567891011pit −112131415goal +10.80.10.1S16 cells (states)Aup, right, down, leftPice: 0.8 as asked, 0.1 each sideRgoal +1, pit −1, else 0ρ₀cell 0: 0.5, cells 1 and 4: 0.25γ0.9 per move of delaythe gridworldMDP components · 15.07
Toy: the 15.C1 gridworld, 16 cells, 100 seeded episodes
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
M=(S, A, P, R, ρ0, γ)\mathcal{M} = (\sy{S}{data}{\mathcal{S}},\, \mathcal{A},\, \sy{P}{param}{P},\, \sy{R}{out}{R},\, \sy{rho}{param}{\rho_0},\, \sy{g}{param}{\gamma})
P(⋅∣10,↓): 14 (0.8), 11 (0.1), 9 (0.1)P(\cdot \mid 10, \downarrow):\ 14 \,(0.8),\ 11 \,(0.1),\ 9 \,(0.1)

States, moves, kernel, rewards, start chances and a discount make the problem.

Common mix-ups

MYTHOne episode's return is the value of its start cell.

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

Predict, then reveal
3 CHECKS · PRO
Q01If the slip chance is 0, do the best moves differ from the example policy?

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.