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

Recurrent policies and sequence replay

See a recurrent policy carry a cue, then learn from replayed sequences.


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 · 17.16 · MEMORY BAYMEMORYLESS · π(LEFT) 0.50 AT BOTH
01
Stage 1 of 6 · No memory
Both junctions show the same corridor observation. A memoryless policy gives π(left) 0.50 at both.
Explain it simply

The cue at the start says which way to turn. By the junction, the agent sees only the corridor. The two junctions look the same, so a policy without memory can only guess. It turns the right way half the time.

Two episodes of 5 steps. Cue left at step 0, cue right at step 5. Both junctions give π(left) 0.50.

The weights are set by hand, not trained.
observations, hidden staterecurrent weightπ(left)Δh, gradientburn-in
observationπ(left)episode 1 · cue leftepisode 2 · cue rightt 0t 1t 2t 3t 4t 5t 6t 7t 8t 9donedone←→0.500.50memoryless policyπ(left | o₄) = π(left | o₉) = 0.50observationπ(left)episode 1 · cue leftepisode 2 · cue rightt 0t 1t 2t 3t 4t 5t 6t 7t 8t 9donedone←→0.500.50memoryless policyπ(left | o₄) = π(left | o₉) = 0.50
Toy: 2 episodes of 5 steps, a 1-unit recurrent policy
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
π(left∣o4)=π(left∣o9)\sy{pi}{out}{\pi}(\text{left} \mid \sy{x}{data}{o_4}) = \sy{pi}{out}{\pi}(\text{left} \mid \sy{x}{data}{o_9})
π(left∣o4)=π(left∣o9)=0.50\pi(\text{left} \mid o_4) = \pi(\text{left} \mid o_9) = 0.50

The same observation gives the same action probabilities.

Common mix-ups

MYTHBurn-in recovers what a zero start state lost.

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

Predict, then reveal
3 CHECKS · PRO
Q01If the reset is off, which way does the agent turn at junction 9?

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.