I connected a fruit fly connectome to tic-tac-toe (with a minimax safety net)
Description and use
Using a real fruit fly neural circuit to play tic‑tac‑toe with a minimax safety net.
Problem
How to use a real fruit fly neural circuit to play tic‑tac‑toe and evaluate its performance with a minimax safety net.
Outcome
The fly circuit alone can lose tic‑tac‑toe; with a minimax safety net it can win or draw, demonstrating a hybrid biological‑algorithmic agent.
Workflow
- Select neuron groups that send motor commands and their central brain inputs.
- Use connectome data (synapse counts, neurotransmitter predictions) to build a weighted directed graph.
- Map each of the 9 tic‑tac‑toe squares to a group of output neurons and each board state to a group of input neurons.
- Simulate signal flow through the graph to compute activity levels for each square.
- Identify the square with the strongest activity as the fly’s preferred move.
- Run minimax to list optimal moves; let the fly pick among them (or play alone if minimax disabled).
- Play from the terminal using the provided CLI.
- Evaluate outcomes (win, draw, loss).
Evidence
Scientists have mapped the whole nervous system of a fruit fly: every neuron and every connection, in a public database called a connectome.
Python, neuprint-python, networkx and pandas do the work.
Mostly **minimax**. The fly circuit has no look-ahead, so on its own it walks into forks and forgets to block.
The neurons and the connections between them come straight from the male fly connectome data.
The simulation. It is a simple signal-flow calculation. There are no spikes and no real timing, so it is not how a living neuron behaves.
- Record date: 2026-10-02T16:41:02.561Z