‹ Field GuideLetter 29 · The firefly that couldn’t turn
Michi flies twice across a calm pond. Pip copies every steering cue. Koko hangs a ribbon on the far post and turns on the wind. Pip drifts right, keeps flying straight and lands one lane away from the ribbon. Which example was missing from flight school?
Eight perfect demonstrations of the same move
Each of the two demonstrations lasts four beats. All eight state–action pairs say “in the center, fly straight.” The apprentice counts labels per lane and chooses the most frequent action. It defaults to straight on an unseen lane. In a tie our trainer prefers straight, then left, then right. On the calm examples the apprentice matches 8/8 actions and completes 2/2 flights.
The four exam winds blow one lane to either side on beat two or three. Pip lands 0/4. The first gust changes the environment relative to the calm lessons. What happens after that gust also depends on the policy. On the same right-gust collection flight, the straight-only learner visits the right lane three times, while Michi visits it once and steers back. An offline action score on the center lane cannot reveal that difference. Ross, Gordon and Bagnell’s DAgger paper · Berkeley’s DART engineering account of distribution shift
Let the apprentice fly while the teacher labels
On the collection tape [right gust, calm, calm, calm], Pip executes S, S, S, S. Michi radios S, L, L, L from the four states Pip actually visits. Her radio can label a mistake without taking the controls. The left-gust tape supplies the mirror-image corrections. Both collection flights miss the landing.
Append these eight expert-labeled states to the original eight. There are ten center examples labeled straight, three right-lane examples labeled left and three left-lane examples labeled right. Refit the table. On the earlier four exam schedules, it now lands 4/4. Those are repeat evaluations on the same schedules. The additional weather report uses four different schedules. A last-beat gust leaves the learned pilot one lane off center in one of them, even though it followed the expert on every observed state.
DAgger aggregates state–label pairs over rounds. Its collection policy can mix teacher and learner actions. The radio desk’s first collection gives the learner every action, equivalent to a teacher mixture weight of zero. Its comparison gives Michi every action. A supervised target still comes from the teacher in either case. These numbers come from the town’s deterministic simulator. Original algorithm · Drew Bagnell’s NYU talk
A lantern can teach second choices
Michi’s left, straight and right logits are [2, 1, 0]. At temperature 1, softmax assigns about [0.6652, 0.2447, 0.0900]. At temperature 2, those probabilities become [0.5065, 0.3072, 0.1863]. Left remains brightest, and the straight-versus-right preference is visible.
Two student lamps present probabilities at the comparison temperature. A gives left a probability of 0.60 and B gives left 0.50. A wins on a single hard-left target. B’s full distribution [0.50, 0.31, 0.19] better matches the warm teacher. The desk measures cross-entropy with natural logarithms. Its training tray starts from equal student logits, computes the student softmax at temperature 2 and applies gradient updates. For soft-only training the gradient here is (student probability − target probability) / 2. The tray uses a learning rate of 1.5 and no T² multiplier. Hinton and coauthors discuss that scaling when combining hard and soft objectives. Policy distillation applies related transfer ideas to action policies. Distilling the Knowledge in a Neural Network · Policy Distillation
Weave a whole ribbon
The teacher gives the complete route LS a mass of 55, LR a mass of 30 and SL a mass of 15. Copying the single top sequence supplies two hard labels. If you keep LS and LR with their original relative weights, the next action after L is S with probability 55/85 and R with probability 30/85. The retained mass is 85/100. Restore SL and the first action is now S in 15/100 of the original mass. A prefix with no retained examples has no learned continuation on this loom. Kim and Rush studied sequence-level distillation for translation. The ribbons are our small agent analogy. Sequence-Level Knowledge Distillation · Authors’ EMNLP presentation
What to keep from a wrong turn
The blue-key pilot calls the locator. The tool replies “east.” A flight to the east dock yields an arrival observation, which makes finishing possible. Remove the locator reply and the upcoming destination now relies on evidence missing from the training context.
A longer successful tape contains a wrong flight west and its failure before the eastward recovery. Plain action cloning with every agent action as a target would also reward copying the wrong turn. In the hangar, keep the west flight and failure observation as context, mask the west action’s supervised loss, and retain scan, east flight and finish as targets. An alternative corrected take replaces the bad action and reruns the environment to collect fresh observations. Move the blue key’s dock to the west and compare two pilots. A memorized east action misses. A pilot reading the locator reaches the new dock and receives a delivery receipt. A real training stack must support the intended loss mask. ReAct paper · Shunyu Yao’s original X thread · Project authors’ engineering explanation
At the willow airshow you can set six gusts, choose the blue ghost’s response in each lane and invite a friend to race. The invitation contains the course and ghost table. The visiting pilot still has to fly it. The replay file records the actual gold moves and the results for both pilots, including a collision or off-center finish. Visit Firefly Flight School · Take the flight instructor course