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

Independent seeds for each source of randomness

Watch random draws stay put or shift when one source of randomness changes.


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 · 16.20 · SEED BAYSEED 1906 · GOAL (2, 4) · 9 STEPS
01
Stage 1 of 5 · Four sources
A rollout draws random numbers for 4 sources: task, observation, policy and dynamics. Each source has its own seed.
Explain it simply

Each row of boxes is one source of randomness. The task row picks the goal once, at the reset. Then each step reads the sensor, picks a move and may slip. In the sensor and slip rows, a box under 0.2 means a sensor error or a slip.

Four rows of draws for rollout 0, seed 1906: task, observation, policy and dynamics. The goal is (2, 4). The rollout takes 9 steps.

task goalseedsslip, sensor error, changed drawpath, exploring step
goalstartroot seed 42rollout 0: seed 1906reset123456789101112taskseed 5644observationseed 5509policyseed 6593dynamicsseed 73450.340.750.430.160.180.690.810.030.050.560.870.860.720.950.970.190.240.820.620.380.940.160.120.190.430.550.110.41one rollout, four sourcesdynamics seed = h(1906, dynamics) = 7345a box under 0.2: a slip or a sensor error; a dot: a second policy drawgoalstartroot seed 42rollout 0: seed 1906reset123456789101112taskseed 5644observationseed 5509policyseed 6593dynamicsseed 73450.340.750.430.160.180.690.810.030.050.560.870.860.720.950.970.190.240.820.620.380.940.160.120.190.430.550.110.41one rollout, four sourcesdynamics seed = h(1906, dynamics) = 7345a box under 0.2: a slip or a sensor error; a dot: a second policy draw
Toy: 5 × 5 gridworld, 4 random sources, 12 steps
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
ssrc=h(sk, src)\sy{s}{param}{s_{\text{src}}} = h(\sy{r}{param}{s_k},\ \text{src})
sdyn=h(1906, 4)=7345s_{\text{dyn}} = h(1906,\ 4) = 7345

Each source seed is a hash of the rollout seed and the source.

Common mix-ups

MYTHOne global seed makes run A and run B a fair comparison.

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

Predict, then reveal
3 CHECKS · PRO
Q01With one stream, if run B uses the same ε as run A, how many draws change?

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.