A fruit fly’s mushroom body learns to play 2048
Nobody tells this fly the rules. Its moves come from the mushroom body, the part of the brain flies learn smells with, wired cell by cell from the FlyWire connectome. Merging tiles is its sugar; when a move turns out better or worse than expected, dopamine adjusts the synapses that judged it. Press Turbo to let it play a few hundred games and watch panel d.
Before each move the fly smells the board every arrow would make and goes for the one its mushroom body likes most.
The mushroom bodies (gold) among all 138,639 neurons of the FlyWire brain.
Flies learn which smells mean food in their mushroom bodies. A smell switches on a few of the ~50 kinds of projection neurons; each Kenyon cell listens to a handful of them and fires only when enough agree, so every smell gets its own sparse pattern of Kenyon cells. Those cells talk to a few dozen output neurons that push the fly towards a smell or away from it. Dopamine neurons decide which of those synapses to weaken.
Here the smell is a 2048 board. Each cell and tile size has its own projection neuron, and the wiring from there on is the real FlyWire v783 connectome: 27,502 connections onto 5,177 Kenyon cells, 62,261 onto 96 output neurons. Before every move the fly smells the four boards it could make and picks the one it likes most. When the move pays off better than that smell promised, the reward neurons (PAM) fire and weaken the synapses onto avoidance neurons; when it goes worse, the punishment neurons (PPL1) weaken the synapses onto approach neurons. Merging tiles is the sugar. That is all it learns from.
Connectome: Dorkenwald et al. 2024, Schlegel et al. 2024 (CC BY-NC 4.0). Mushroom-body compartments: Aso et al. 2014; Li et al. 2020. Code: MIT.