LESSON 16.21 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
The Gymnasium contract
One warehouse env runs the whole Gymnasium contract, from reset to close.
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/moEXPLAINER · 16.21 · RL BAYACTIONS 7 · OBSERVATION FIELDS 6
01
Stage 1 of 6 · The contract
The env class declares its action space and its observation space. Its metadata lists the render modes.
Explain it simply
Before any step, the class says what goes in and what comes out. The action space is seven numbers, zero to six, one for each chip. The observation space is a dictionary of six fields, each with its own range. The shelf stock is not in it, so the agent never sees it.
Left: the warehouse floor and 7 action chips. Right: the metadata and 6 observation fields with their spaces.
robot, observationspaces, time budget, truncatedactions, reward, terminatedrejected actionparked cart
Toy: the 16.C2 warehouse as a Gymnasium env; one episode from reset with seed 42
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each action is one of 7 numbers, and each observation is a dict.
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.