Log inStart free
LESSON 17.19 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Debugging an RL run: the failure taxonomy

Watch a broken RL run pass through five checks until one names its failure.


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

Go Pro · $8.25/mo
EXPLAINER · 17.19 · DEBUG BAYRETURN 0.10 · HEALTHY 1.00
01
Stage 1 of 5 · The run
This run ends at a return of 0.10, against 1.00 for the healthy run. The curve shows a problem, not its cause.
Explain it simply

The agent starts at S, goal A or B pays 1 point, and the exit pays only 0.1. The solid line shows this run's return, the points it gets per episode. The dashed line shows a healthy run. A curve tells you that a run fails, but not why.

A 6 by 4 grid with a start, two goals and an exit, and a learning curve. This run ends at a return of 0.10.

agent and actionsgoals, return, passesfailed checks
the run01234567891011121314151617181920212223SstartA+1B+1exit+0.1S start · A, B goals · exitQ-learning · seed 1 · 200 episodesreturn per episode0.00.51.0episode (of 200)return, mean of 50a goal pays 1healthy run 1.00this run 0.10the run01234567891011121314151617181920212223SstartA+1B+1exit+0.1S start · A, B goals · exitQ-learning · seed 1 · 200 episodesreturn per episode0.00.51.0episode (of 200)return, mean of 50a goal pays 1healthy run 1.00this run 0.10
Toy: a 6 × 4 grid, tabular Q-learning or SARSA, 200 seeded episodes
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
G=∑trt\sy{G}{out}{G} = \sum_{t} \sy{r}{data}{r_t}
Gˉrun=0.10, Gˉhealthy=1.00\bar G_{\text{run}} = 0.10,\ \bar G_{\text{healthy}} = 1.00

The return adds the rewards of one episode.

Common mix-ups

MYTHA better algorithm will fix a failing run.

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

Predict, then reveal
3 CHECKS · PRO
Q01With the implementation fault, which check fails first?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 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.