Log inStart free
LESSON 18.08 · 5 STAGES · 2 CONTROLS · 2 CHECKSPRO · PREVIEW

Domain randomization

Train a maze agent under random drift, then test it on a drifting robot.


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

Go Pro · $8.25/mo
EXPLAINER · 18.08 · DRIFT BAYREAL DRIFT 0.6 · SIM DRIFT 0
01
Stage 1 of 5 · Sim and real
The simulator moves the agent where it picks. On the real robot, a move turns right with chance 0.6.
Explain it simply

The teal dot in the middle is the agent, in a test maze. The blue arrow is the move it picks. The red arrow is where that move goes if it turns to the right. A worn wheel on a real robot can do this, and the simulator never does. This chance is the drift.

A 7 by 7 test maze with the agent at the centre. A blue arrow shows the picked move, and a red arrow shows the move turned right, with chance 0.6.

the agentdrift, training rangegoal, picked move, scorelava, turned moveagent trained without drift
picked right · 0.4turned down · 0.600.20.40.60.8drift d: the chance a move turns rightsimulatorreal 0.6sim and real · test maze 11drift dstart in the centre · goal SE · 40 moves at mostpicked: 1 − d = 0.4 · turned right: d = 0.6picked right · 0.4turned down · 0.600.20.40.60.8drift d: the chance a move turns rightsimulatorreal 0.6sim and real · test maze 11drift dstart in the centre · goal SE · 40 moves at mostpicked: 1 − d = 0.4 · turned right: d = 0.6
Toy: 45 training and 10 test mazes, 7 × 7, exact scores
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
P(turn right)=dP(\text{turn right}) = \sy{d}{param}{d}
dsim=0,  dreal=0.6d_{\text{sim}} = 0,\; d_{\text{real}} = 0.6

The drift d is the chance that a move turns right.

Common mix-ups

MYTHA wider randomization range costs nothing.

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

Predict, then reveal
2 CHECKS · PRO
Q01The real drift is 0.8. Does the range 0 to 0.8 beat the agent trained without drift?

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

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 2 live controls
  • 2 mix-up cards and 2 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.