Log inStart free
LESSON 16.C2 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Building one environment end to end

One warehouse task becomes a tested environment, one layer at a time.


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.C2 · WAREHOUSE BAYSTEP 6 PICK · ACCEPTED
01
Stage 1 of 6 · State and rules
Step 6 picks item b: every precondition passes, so the canonical state changes. All 5 invariants hold (16.01).
Explain it simply

You see one robot on a small warehouse floor. Before each action, the environment checks its rules, like a guard at a door. If every check passes, the state changes. If one fails, only the clock moves, and the strip below shows each step.

A 6 by 4 warehouse floor and a strip of 20 steps. Step 6, pick, is accepted. Every step keeps all 5 invariants.

robot, state, observationbattery, clockreward, passed checksrejected, failed, leakedlatent stock, parked cart, mask 0
012345P6A78910C111213141516171819B20cart212223RabState and rules16.01cell19carrieda, bbattery18 of 24stockA 1 · B 0 · C 2packednoneclock t6 of 30step 6: pick✓ clock✓ battery✓ shelf✓ stock✓ handsinvariants 5 of 5acceptedactioninvariantst 151015202530↓a→↓↓b↑→→↑↑→→P↓←c↑→Pthe warehousethe episode: 20 steps012345P6A78910C111213141516171819B20cart212223RabState and rules16.01cell19carrieda, bbattery18 of 24stockA 1 · B 0 · C 2packednoneclock t6 of 30step 6: pick✓ clock✓ battery✓ shelf✓ stock✓ handsinvariants 5 of 5acceptedactioninvariantst 151015202530↓a→↓↓b↑→→↑↑→→P↓←c↑→Pthe warehousethe episode: 20 steps
Toy: the 16.C2 warehouse; a scripted route, not a learned policy
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
st+1=step(st,at)\sy{s}{data}{s_{t+1}} = \mathrm{step}(\sy{s}{data}{s_t}, \sy{a}{data}{a_t})
s6: stockB 0, carried 2, battery 18, t 6s_{6}:\ \text{stock}_{B}\ 0,\ \text{carried}\ 2,\ \text{battery}\ 18,\ t\ 6

The next state follows from the state and the action.

Common mix-ups

MYTHIf an episode runs clean, the environment has no bug.

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

Predict, then reveal
3 CHECKS · PRO
Q01With the slow robot and no planted bug, does the episode end terminated or 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.