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

Termination vs truncation

Watch two kinds of episode end change the learning targets of a robot.


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 · 16.18 · WAREHOUSE BAY60 STEPS · 1 TERMINATED · 1 TRUNCATED
01
Stage 1 of 6 · Two ends
Episode 1 packs the order: a termination. Episode 2 hits the 30-tick limit first: a truncation.
Explain it simply

The robot runs the same route again and again. When it packs the whole order, the task is over, and that's a termination. When the clock hits 30 ticks first, the episode is cut short, and that's a truncation. The faint cells are ticks where the robot waited.

A strip of 60 steps in 3 episodes. Terminated: 1. Truncated: 1.

observationstime limit and truncationrewards, termination, values, targets and advantageswrong targetsreset obs and the other value line
01234P6A78910C111213141516171819B20cart212223step 25 · carries nothing · packed 3Rstep 25 · episode 1 · action pack · reward 1obs before the stepcell 5 · carries cpacked 2 · t 24final obs (in info)cell 5 · carries nothingpacked 3 · t 25terminated = Truetruncated = Falset 0t 10t 20t 0t 10t 20t 0+1episode 1 · terminatedepisode 2 · truncatedepisode 3the floorthe end stepthe rollout buffer, 60 stepsepisodeterminatedtruncated01234P6A78910C111213141516171819B20cart212223step 25 · carries nothing · packed 3Rstep 25 · episode 1 · action pack · reward 1obs before the stepcell 5 · carries cpacked 2 · t 24final obs (in info)cell 5 · carries nothingpacked 3 · t 25terminated = Truetruncated = Falset 0t 10t 20t 0t 10t 20t 0+1episode 1 · terminatedepisode 2 · truncatedepisode 3the floorthe end stepthe rollout buffer, 60 stepsepisodeterminatedtruncated
Toy: the 16.C2 warehouse, one robot on a 20-action route, a 60-step buffer
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
done=terminated∨truncated\sy{d}{ink}{\text{done}} = \sy{m}{out}{\text{terminated}} \lor \sy{u}{param}{\text{truncated}}
step 25: terminated=True, truncated=False\text{step } 25:\ \text{terminated} = \text{True},\ \text{truncated} = \text{False}

An episode ends when either flag is true.

Common mix-ups

MYTHA time-out ends the task, so the target is the reward.

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

Predict, then reveal
3 CHECKS · PRO
Q01At a wait chance of 0%, does any episode end truncated?

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.