Tic-tac-toe vs. a fruit fly
0You
0Draws
0Fly

The fly is asleep.

Waking it downloads about 225 MB. After that, every move runs on your GPU.

Brain activity asleep

Nothing has run yet.

Where it wanted to go

Brightness and traces show how far each neuron's rate moved from its value with no board input. Each block in a trace is one fly move: orange is update step 1, green is steps 2 to 4. Rows are scaled to their own peak; the number is the latest value. Neurons sit at their cell body position seen from above. Sensory neurons have their cell bodies outside the scanned tissue, so they're drawn at the average position of the neurons they connect to.

How it works

The opponent is the MaleCNS connectome: 166,700 neurons from a male fruit fly's brain and nerve cord, plus the 25.6 million connections between them. Nothing was added to that wiring. Each neuron got three trainable numbers (how strongly it listens to its inputs, a resting offset, and how quickly it changes), and those were trained on tic-tac-toe positions labeled by a perfect solver.

For each move, the board is pushed into the fly's sensory neurons through a fixed random mapping. Activity spreads through the graph for four update steps, and 2,048 neurons are read out as scores for the nine squares. So it doesn't look at the board, and it isn't a living fly. It's a simple rate model that happens to run on real wiring.

There are two kinds of runs. Research runs train on 80% of positions and get scored on positions they never saw; they pick a best move about 92% of the time, up from 63% before training. The fly you're playing was trained on every position and chosen by exact game results. It never loses to a perfect player, whether it goes first or second.

Does the real wiring matter?

I shuffled who connects to whom, keeping each neuron's number of inputs and outputs, and trained that graph the same way. With two training recipes and three runs each, the real wiring averaged 92.3% and 92.0% on unseen positions, and the shuffled one 84.7% and 85.2%. The real wiring won every run.

Why does it open in different places?

Every opening is a draw with perfect play, so the network never learned much preference beyond the center. The page samples the first move from its scores, softened a bit: about 42% center, 8 to 13% per corner, 3 to 5% per edge. Later, if two squares score within 15% of each other, either one can be picked. Checked over every possible game, neither change lets anyone beat it.

Where does the signal go?

Not very deep. Outside the sensory neurons, the strongest response is in antennal lobe projection neurons, one synapse in. Most of the neurons the move is read from are early visual relay cells (L1, L2 and L3). That's because they sit right next to the input, not because the fly sees anything. The mushroom body and central complex hardly move at all.

GroupNeuronsResponseRead out
Sensory (input)17,9370.5640
Antennal lobe projection6860.087130
Nerve cord15,0450.0245187
Optic lobe99,1690.01471,755
Descending1,3160.01151
Kenyon cells4,0640.01120
Mushroom body output970.00070
Central complex2,9500.00010

Response is how far a neuron's rate moves from its no-input value after the fourth step, averaged over every board and every neuron in the group.