Log inStart free
LESSON 16.30 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Debugging by ablating difficulty

Inspect a failing agent's logs, then remove one challenge at a time.


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

Go Pro · $8.25/mo
EXPLAINER · 16.30 · DEBUG BAY0 OF 4 PROBES FLAGGED · SLIP OFF
01
Stage 1 of 6 · Inspect a step
Each probe sets a state and takes one step. All 4 rows follow the task rules.
Explain it simply

A probe is a test that you run by hand. You put the agent in a chosen cell, pick one move, and read what comes back. Each row shows the observation, the reward and the end of the episode. If a row breaks the rules of the task, the environment has a bug.

A 5 by 5 grid and a table of 4 probe steps. 0 rows show a defect.

agent, observations, visitsactions, goal, successkey, door, slip, gainlava, step cost, a defect
slip 0.2300 training episodesSKDGL1356910111314151618192123241234inspect a step#obsactionnext obsrewardendobs = (column, row, key)1(1, 2, 0)right(1, 2, 0)−0.01nonecell 11, no key → cell 112(1, 2, 1)right(2, 2, 1)−0.01nonecell 11, with key → cell 123(4, 1, 1)up(4, 0, 1)0.99goalcell 9, with key → cell 44(1, 4, 0)right(1, 4, 0)−0.01nonecell 21, no key → cell 21slip 0.2300 training episodesSKDGL1356910111314151618192123241234inspect a step#obsactionnext obsrewardendobs = (column, row, key)1(1, 2, 0)right(1, 2, 0)−0.01nonecell 11, no key → cell 112(1, 2, 1)right(2, 2, 1)−0.01nonecell 11, with key → cell 123(4, 1, 1)up(4, 0, 1)0.99goalcell 9, with key → cell 44(1, 4, 0)right(1, 4, 0)−0.01nonecell 21, no key → cell 21
Toy: a 5 × 5 key-and-door grid, tabular Q-learning, 8 seeded runs of 50 test episodes
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
(o′, r, end)=step(s, a)(\sy{o}{data}{o'},\ \sy{r}{out}{r},\ \text{end}) = \mathrm{step}(s,\ \sy{a}{out}{a})
step(cell 11, right)=((2,2,1), −0.01, none)\mathrm{step}(\text{cell } 11,\ \text{right}) = ((2,2,1),\ -0.01,\ \text{none})

A step maps a state and an action to an observation, reward and end.

Common mix-ups

MYTHA failing agent needs a better learning algorithm.

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

Predict, then reveal
3 CHECKS · PRO
Q01With the blind observation, do 1,000 training episodes fix the agent?

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