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

Shields and action filters

Watch a rule keep an agent out of lava while a penalty only prices it.


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 · 18.13 · SAFETY BAY9 LAVA CELLS · STRAIGHT 6 MOVES · AROUND 10
01
Stage 1 of 6 · The rule
A safety specification says: never enter lava. All 9 lava cells are forbidden states.
Explain it simply

You see a small grid. The agent starts at the left edge, and the goal sits at the right edge. The block in the middle is lava, and the rule says never step on it. The straight path takes 6 moves but crosses 3 lava cells, and the way around takes 10.

A 7 by 7 grid with 9 lava cells between the start and the goal. The straight path crosses 3 lava cells; the way around takes 10 moves.

agent, proposed movelava, lava entriesrule, safe movesgoal, plans, sent move
straight: 6 moves, 3 lavaaround: 10 movesstartgoallavanever enter a lava cellforbidden states: the 9 lava cellsa forbidden action: a move that can end in lavastraight path: 6 moves, 3 of them into lavaway around: 10 moves, no lavathe gridthe safety specificationstraight: 6 moves, 3 lavaaround: 10 movesstartgoallavanever enter a lava cellforbidden states: the 9 lava cellsa forbidden action: a move that can end in lavastraight path: 6 moves, 3 of them into lavaway around: 10 moves, no lavathe gridthe safety specification
Toy: a 7 × 7 grid, 9 lava cells, 200 Q-learning episodes
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
∀t: st∉L\forall t:\ \sy{s}{data}{s_t} \notin \sy{lava}{grad}{\mathcal{L}}
∣L∣=9|\mathcal{L}| = 9

At no step does the agent stand on a lava cell.

Common mix-ups

MYTHA big enough penalty keeps the agent out of lava.

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

Predict, then reveal
3 CHECKS · PRO
Q01With slip off, at a lava penalty of 10, does the plan still cross the lava?

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.