# Show HN: I made a fly drive a car

> Source: <https://siddaarth.com/fly-by-wire/>
> Published: 2026-09-22 14:32:03+00:00

## Meet Fly-By-Wire

Despite having a brain barely one millimeter across, fruit flies perform astonishing feats of real-time navigation. They avoid predators in milliseconds, stabilize themselves in flight, and continuously transform visual information into precise movement.

            In 2024, the FlyWire project reconstructed the first complete connectome
            of an adult fruit fly: a map of every neuron and synaptic connection in
            its brain
            [(Dorkenwald et al., 2024)](https://doi.org/10.1038/s41586-024-07558-y).
            For the first time, we can study not just what the fly does,
            but how its neural circuitry is wired to do it.
          

A fruit fly and a 2-ton autonomous vehicle seem radically different. But fundamentally, they solve the same problem: translating sensory data into physical movement.

Evolution spent hundreds of millions of years refining a navigation system that fits inside a brain smaller than a grain of sand. Why are we spending billions of dollars training massive models to rediscover the same capability?

*Fly-By-Wire* explores whether the fruit fly’s neural
            circuitry can control an autonomous vehicle.
          

Put simply: What if we let a fly drive a car?

## Inside the Fly

To find out, I first had to start inside the fly.

            Fruit flies can learn, form memories, court, fight, and navigate their
            world using a brain of roughly 100,000 neurons
            [(Dorkenwald et al., 2024)](https://doi.org/10.1038/s41586-024-07558-y).
            But I wasn’t trying
            to recreate the entire brain. I wanted to isolate the small subset of
            neurons that interpret visual information and convert it into movement.
          

To do this, I started from neurons associated with steering (descending motor neurons) and traced the circuit backward until I reached the visual system. At each step, I kept only the strongest connections, stripping away thousands of weaker links until I found a compact steering-related pathway.

            That left me with two key pieces of the fly’s circuitry: **connectivity**
            and **geometry**. The connections tell us which neurons communicate with one
            another and how strongly; the geometry tells us where those visual neurons
            are positioned within the brain.
          

To activate this circuit with a camera and observe its performance behind the wheel, I needed a way to translate the outside world into the fly’s visual space.

After filtering, I had 1,122 neurons from one visual circuit. Instead of retracing the connectome once more to reconstruct the opposite pathway, I digitally mirrored those neurons, giving me 2,244 neurons in total. Because the two populations occupy the same physical space, the resulting map appears much denser.

But there was another challenge. These neurons exist in 3D, while the simulated car only sees the world through a 2D camera. To bridge that gap, I had to intentionally throw away information.

Enter the artificial retina. It converts frames into grayscale, projects the neurons’ 3D positions onto a 30×30 2D grid. This process reduces the entire visual system to just 900 possible locations with multiple neurons corresponding to each pixel.

## Behind the Wheel

Next, I needed to turn vision into movement. Different groups of neurons contribute to different behaviors, and together their activity determines the vehicle’s actions. For steering, I isolated two descending motor neurons associated with left and right movement; each of these neurons received input from a different set of upstream neurons. Some neurons are more important than others, so each connection is weighted by the number of synapses connecting it to the downstream motor neuron.

For every camera frame, I read the brightness value of each corresponding retinal pixel and multiply it by its synaptic weight:

$$R_t = \sum_{j \in P_R} b_j w_j$$

$$L_t = \sum_{k \in P_L} b_k w_k$$

where $b$ is the pixel brightness and $w$ is the synaptic weight derived from the engineered connectome.

The difference between these competing signals determines the direction of the car. If the rightward signal dominates, the vehicle steers right. If the leftward signal dominates, it steers left.

I applied the same principle to the rest of the controls. For braking, I extracted upstream pathways associated with DNg03 neurons, and for throttle, I extracted DNg01/02 neurons. This allowed me to turn weighted visual inputs from the fly-derived circuit into brake and throttle signals.

The result is an elegant closed-loop that runs dozens of times every second to drive the simulated car.

I filtered a portion of a fly’s brain, built it an artificial retina, and let it take the wheel. Can it drive?

## See It Drive

See the world through a fly’s eyes. Click the ⛶ icon in the bottom right to expand the view.

## What's Next?

Remarkably, the fly-derived circuit can control a simulated Mercedes-Benz through straight-line cruising, turning, obstacle avoidance, and rapid braking in a simple environment.

Though if we look closer, things get a little more absurd.

### Tiny Brain, Big Math

The artificial retina maps thousands of fly neurons to just 900 possible pixels. For perspective, a modern 1080p image contains over 2 million pixels. That’s more than 2,000 times more information completely thrown away before driving.

And the amount of the circuit that actually controls steering is even smaller. It consists of just two neurons, one for left, one for right. Higher-level neurons connect to these two neurons through only six total synapses. What’s left is an extremely light circuit, smaller than some of our smallest neural networks.

This also translates directly into performance. In fact, the entire driving loop from perception to action only takes 1,555 floating-point operations (FLOPs) per frame to run. At the 30fps frame rate used to run this experiment, that works out to roughly 0.047 MFLOPs.

            For perspective, the iPhone 17 sitting in people’s pockets is
            capable of 2 TFLOPs, or two trillion floating-point operations per
            second
            [(Apple, 2025)](https://www.apple.com/newsroom/2025/09/apple-debuts-iphone-17/).
            This makes it 42.5 million times more powerful than my entire driving
            system.
          

### Current Constraints

But that’s not to say that I didn’t need to do a little bug-fixing.

After all, I was taking a biological brain, compressing its visual input into 2D, and then asking its motor neurons to control a car. The resulting steering signals were extremely noisy and far too weak to move the vehicle.

            To fix the noise problem, I recorded dash-view footage of a car
            driving straight (shoutout to
            [slowroads.io](https://slowroads.io))
            and suppressed the neurons that were still outputting steering values
            during that footage. The car kept drifting right anyway, so I added a
            0.54% left bias to balance it out. Finally, I boosted certain neurons
            by 20× so the small outputs of a fly circuit could actually nudge
            the car meaningfully.
          

Even with calibration, some tasks reminded me I was working with a circuit that came from a fly. During rapid-braking demos, it tried to evade any obstacle in its path almost like it was “panicking,” steering itself off the road entirely rather than simply braking.

The fly does have a braking pathway, so why didn’t it work? The problem was that the fly’s braking neuron barely received any input from the low-resolution retina, so it almost never fired. To get braking, I engineered a simple looming detector around the connectome. It watches the center of the retina (10×10 patch) and applies the brakes once about 8% of it is blocked, suppressing the steering so the car stops instead of dodging its way off the road.

Funnily enough, even a fly might laugh at how simple this all is. I had to work around plenty of limitations, skip biologically accurate spiking models, and engineer a custom braking trigger. But the basic idea worked: a part of a fly’s brain turned pixels into steering, throttle, and braking, and drove a car.

So, where do we go from here?

### The Road Ahead

Fly-By-Wire opens the door for us to ask a much bigger question: how much of a mind belongs to the body it grew up in?

If we can extract a circuit from a fly and watch it control a simulated car it never evolved for, perhaps intelligence isn’t entirely contained within the brain itself. Perhaps it’s the result of friction between three competing forces: a brain, a body, and sensory experience within the physical world.

But there’s still a long way to go to prove the relationship between geometry and intelligence. Fly-By-Wire only explored a small fragment of one biological system, applied it to a simplified environment, and still had to adapt the circuit, albeit lightly, to function there.

Next, I hope to scale Fly-By-Wire in two key ways.

**Scale the driving itself:** larger connectomes, more faithful neuronal
            simulations, and increasingly complex environments. If a fly’s
            circuit can control a simulated car through basic maneuvers, what
            behaviors would arise from a mouse connectome (predicted to arrive in
            the 2030s)? What about an eventual human connectome?
          

**Move beyond individual biological circuits.** An interesting direction
            is to see if we can extract the overall function of a given brain
            without copying individual neurons. In that vein, I’m working
            on methods to use the geometry of biological brains as direct
            supervision to train artificial neural networks instead of text.
          

My aim is to keep isolating biology from the world it evolved for, and to use it to build neural networks grounded in biological first principles. Hopefully they keep churning out connectome maps so I can give more brains driver’s ed.

## Take It For a Spin

It’s all on GitHub. Come say hi.

[GitHub Methods and supporting code](https://github.com/siddaarthrms/Fly-By-Wire)

[Media kit Figures and stills for editors](https://siddaarth.com/media/fly-by-wire)

[Contact Research, speaking, and press](https://siddaarth.com/contact)

## When the Next One Drops

No roadmap here. I build when something catches my attention, which means these go out rarely and without warning. Drop your email if you want to be the first one to hear about the next writeup, repo, or weird new project.

## References

1. 
              Dorkenwald, S., et al. (2024). Neuronal wiring diagram of an adult brain.
              *Nature, 634* , 124–138.[https://doi.org/10.1038/s41586-024-07558-y](https://doi.org/10.1038/s41586-024-07558-y)
2. 
              Apple. (2025, September 9). Apple debuts iPhone 17.
              [https://www.apple.com/newsroom/2025/09/apple-debuts-iphone-17/](https://www.apple.com/newsroom/2025/09/apple-debuts-iphone-17/)
