Thirty moves, one trophy — the last move grabs all the glory
The simplest accountant: whoever moved last gets the reward. Hidden truth of this game: exactly one move flips the win probability between 10% and 90%; every other move is a meaningless coin flip. Play episodes, watch credit flow (the glow), then reveal which move actually mattered. Try both game types — the naive scheme is right in exactly one of them.
Bottom bars = the learner's estimated importance per move: |avg credit when that move's choice was good − when it was bad|, computed live from the episodes you play.
Spread it backward — the discount dial
Better idea: give EVERY move a slice of the outcome, shrinking as you go back in time — move t gets γT−t × outcome. Same early-decisive game (move 3 rules). Play episodes, then drag γ and watch the importance bars morph live — the stored episodes are re-scored instantly. Can you find a γ that exposes move 3?
Play some episodes first, then sweep γ from 0.5 to 1.0 and watch move 3 sink and surface.
Eligibility traces — breadcrumbs that get paid all at once
Now the real machinery: TD(λ). An agent walks a corridor of 18 states toward a +1 reward. Every state it visits leaves a decaying trace (the white rings); whenever a surprise (TD error) occurs, ALL traced states get updated at once. The gold glow is the learned value V — literally credit as glow intensity. Run one episode with λ=0, then with λ=0.9, and compare how far the credit travels per episode.
Real TD(λ) with α=0.4, γ=0.98 — the values you see are genuinely learned, not staged. Set λ=0 and reset to feel the one-state-per-episode crawl.
Move 3 decided the game. Which accountant finds it?
Head-to-head on identical episodes (early-decisive game, move 3 rules the outcome): last-move credit vs discounted credit (γ=0.85) vs uniform credit (γ=1). All three see exactly the same data. Each panel shows that method's importance estimate per move, scaled to its own maximum — the green dashed line marks the truth. Feed them episodes and watch who converges.
Same episode stream for all three accountants. Verdicts update live.
Spread too thin — when the signal dies on the way back
The failure mode that stalls real RL: sparse reward + long horizon. A wandering agent (75% forward, 25% back) gets +1 only at the far end of the corridor. Fix the training budget at 30 episodes and stretch the corridor. Watch V(start) — the agent's belief that starting is worth anything — die as the distance grows. Then flip on eligibility traces and see how much horizon they buy back.
Every run trains from scratch with TD(λ), α=0.3, γ=0.99 — results vary run to run because the walk is random. That variance is part of the lesson.