← index see it in the town → Fruit Fly Connectome as a Drone Controller 2026 – · research · in progress
Can the wiring diagram of a fruit fly's nervous system fly a quadrotor? A simulation study against a tuned PID controller, and against the same wiring shuffled.
Work in progress. Everything below comes from development runs in simulation; no final, pre-registered test has been run yet.
A fruit fly holds itself steady in a gust with a brain smaller than a poppy seed, and that nervous system has now been mapped cell by cell. MaleCNS v1.0, the male fly’s connectome, has 165,122 neurons and about 25.6 million connections between them. DrosoPilot asks whether that wiring diagram can do a flight controller’s job: take what a drone’s gyro feels and set the speeds of its four rotors, 250 times a second.
The drone’s sensors feed the fly’s sensory neurons, its motor neurons are read out as rotor commands, and the network first learns by copying a tuned PID controller, the kind most drones fly with. Everything runs in simulation, and every fly network is flown against the same network with its wiring shuffled.
The questions
Can it fly at all? Can the fly’s connectome control the simulated drone?
Is it any good? Does it match a properly tuned conventional controller on tests fixed in advance?
Does the wiring matter? Does the fly’s own wiring beat the same network shuffled at random, with each neuron keeping its number of connections and their signs?
What does evolution keep? When selection rewires it for a drone’s body, which fly circuits survive?
How it works
DrosoPilot is my own project, started in September 2026. I set the questions and the design, and decided each next step from the results.
The job. The fly’s part is the drone’s innermost loop. A conventional outer loop turns “go there” into “turn this fast about each axis, with this much thrust”; the network turns that command, and the gyro’s reading of how the drone is actually turning, into four rotor speeds. Four kinds of flight test it: hovering, following turn-rate commands, recovering from a bad tilt and flying a path. Mass, wind, motor response and sensor noise change from flight to flight, and the controller is never told them.
The simulator. RotorPy, with the parameters of a palm-sized quadrotor: physics every millisecond, with motor lag and rotor drag, many drones at once on one consumer graphics card. MuJoCo runs the same flights as a second implementation, to cross-check.
The network. Synapse counts set the starting weights and the transmitter sets the sign: GABA, glutamate and histamine inhibit. The first networks used spiking neurons (leaky integrate-and-fire, stepped every 0.2 ms), later ones smooth, continuous neurons. The whole graph fits on a 12 GB card, forward and backward: sparse matrices and a hand-written backward pass mean the 165,122 × 165,122 matrix is never built.
Training. First by copying the PID, then by reinforcement learning; later only the output layer, fitted by ridge regression; most recently an evolution strategy that scores candidates by how well they fly. Structural evolution prunes neurons and removes or adds connections.
Fair comparisons. The baselines are the tuned PID, a model-based controller, a small recurrent network and a plain linear map fitted the same way as the fly network. The shuffled twin keeps every neuron, each one’s numbers of inputs and outputs and the signs it receives; only who connects to whom changes. Training, selection and test flights never overlap.
Fixed in advance. Each stage’s tests, statistics and the wording of its claims are written down before its data exist; the final test plan is sealed with a hash and a timestamp. Negative results stay in the record.
Results so far
Five stages, in the order they ran. Each pad is one simulated flight.
Spiking neurons failed. The first campaign pruned the connectome to about 2,000 neurons, keeping paths from sensory to motor neurons, and evolved it for 13 generations: 52 candidates, each trained by copying the PID and then by reinforcement learning. The finalist failed 107 of 144 test flights; the tuned PID failed 3. In a short separate test a shuffled copy did as badly as the real wiring: 94 and 93 of 96 failed. Four more rounds of training failed every development flight. A diagnosis showed why: the 68 motor neurons carried too little of the correction the drone needed, and refitting the output layer barely helped.
64 simulated drones flying the spiking finalist, beside its brain and nerve cord: they drift away
Continuous neurons fly, and so does a straight line. The same evolved wiring with smooth neurons instead of spikes, and only its output layer fitted to the PID, flew all 128 development flights. Its rate error, how far the drone’s turning was from the command, was 0.106 rad/s against the PID’s 0.104. Its shuffled copy failed one flight. Four more generations of evolution then cut it from 101,859 connections to 85,236, and from 1,987 neurons to 1,835, with no change in performance; 90.6% of the connections left are the fly’s own. But a plain linear map on the same inputs matched the PID too, so this task is too easy to show whether the wiring adds anything.
The same 64 drones flying the continuous-neuron version: they hold their places
The whole nervous system flies. Next came all 165,122 neurons, the wiring fixed, with signals entering where a fly’s would. The gyro feeds about 400 haltere and campaniform afferents, the sensory neurons of the fly’s balance organs; the command feeds the 622 descending neurons that reach wing motor neurons directly; the rotor commands are read from 127 wing, haltere and neck motor neurons. One graphics card steps 512 of these brains at once, about half a second per 4 ms control step: far from real time, fast enough to train. With its output fitted to copy the PID, it flew all 128 development flights at 0.106 rad/s. So did a twin in which 99.97% of the connections come from a different neuron.
Learning from flights. Copying a PID can at best match it, so the last stage stopped copying. An evolution strategy tuned only the interface, a few hundred numbers: input gains and thresholds, global settings such as the neurons’ time constant, and the readout. It scored candidates on a harder task, with fast turn commands, wind, heavier drones, slower motors and faulty sensors. In a test on the 1,835-neuron network, all four arms started as copies of the same PID. After 80 generations the fly’s wiring flew 16% better than its start, its shuffled copy 15%, and the PID, tuned by the same method, 30%.
Where that leaves it. The fly’s wiring can be made to fly a simulated drone. Nothing so far shows it flying better than a shuffled copy of itself, or than a straight line. These runs are on hold for now.
What comes next
A task with room to win: from waypoints to rotors, with disturbances and sensor faults, where a linear map demonstrably can’t keep up with a tuned controller.
Several shuffled twins and several starting seeds instead of one, across a range of network gains, so a difference can’t come from one lucky draw.
The whole brain trained by flight outcome, against a fully tuned PID, on a test fixed before it runs.
A preprint once a stage has a pre-registered result, negative or not.
Before this
DrosoPilot is my third try at this question in September 2026.
FlyFly wired whole fly nervous systems (FlyWire, BANC and MaleCNS) to a drone in the PX4 flight stack, with the drone’s camera and gyro feeding the fly’s sensory neurons. A small 830-neuron route planner from the fly’s central complex made a route that PX4 flew through a block of Chicago’s real buildings. But no version of the full nervous system ever held a stable hover on its own. What I took from it: a wiring diagram with a generic neuron rule isn’t a flight controller by itself.
FlyFly: the male nervous system 30 ms after a flash of red light, each neuron at its cell body. The optic lobes are lit; the nerve cord has barely stirred.
FlyFly: why one version couldn’t learn. Tilted 4° either way, the drone needs opposite corrections; one of the frozen network’s motor neurons gave the same signal for both.
FlySwarm took the practical branch the next day: the fly network chooses each drone’s direction and speed, and PX4 keeps it in the air. It is a platform for a fleet delivering parcels in real New York blocks, under real airspace notices. The conventional planners completed synthetic missions with 32 and 64 drones; the first fly-network policies did not.
FlySwarm’s replay viewer: a conventional planner in Greenpoint, one drone back home, one crashed into a building.
DrosoPilot went back to the strict version: the fly’s wiring itself producing the rotor commands, with a simpler simulator and every claim tested against shuffled wiring.
In the town
A walled garden round a hologram of the fly’s nervous system: 5,000 cell bodies of the whole brain and nerve cord as a faint cloud, the evolved controller’s neurons brighter, its connections teal where they are the fly’s, purple where evolution added them at random, dashed where it cut them. Round it runs a course of eight numbered gates. A PID drone flies a clean lap in front, and 24 fly-drones follow, one generation a round. Each comes out of the fly’s brain in the hologram and flies the lap in a loose swarm. Those that miss a ring break up into light; the ones that make it round fly back into the brain. Each round more of them make it through, never all. It is the goal, not the result.
The garden at night: the hologram, the eight gates and a round under way.
Credits
MaleCNS v1.0 data by the MaleCNS collaboration (FlyEM at HHMI Janelia, the University of Cambridge, the MRC Laboratory of Molecular Biology and Google Research), under CC BY 4.0. The drawings of the nervous system on this page and in the town use its cell-body positions. RotorPy is MIT-licensed. FlySwarm’s buildings are New York City’s open building footprints.
Links