Projects Fruit Fly Dispatcher 1 / 15 The write-up
FlyWire v783 · OR-Tools CP-SAT · 55 stores · one truck · one week

Fruit Fly Dispatcher

Can a fruit fly's brain, wired neuron by neuron from the FlyWire connectome, route fresh-food deliveries as well as Google's OR-Tools? And which matters more for logistics: the brain that decides, or what it knows?

The setup

One truck, 55 stores, a week of fresh food

Every run faces the same customers and is scored the same way. What changes is the brain making the decisions and how much it knows.

The business

Four brains

    Four levels of knowledge

      Finding 1

      Layout
      Profit for the week, every brain at every level
      Darker = more profit on this layout. Click a cell to watch that week below.
      What knowing is worth vs what deciding is worth
      ¥ per week, on each layout

      Finding 2

      Share of demand served as stores spread out
      OR-Tools at each level of knowledge · distance to the nearest store (log scale)
      Deliveries per store per day
      OR-Tools with company data

      Finding 3

      Finding 4

      Finding 5

      Profit per day as position drift grows
      Learning fly, at-the-cliff layout · km of position error after 1 km driven
      Profit per day as plumes carry further
      Learning fly, at-the-cliff layout · how far downwind a store can be smelled (km)

      What it means

      Lessons for a real delivery network

      Read the fly as any decision-maker with limited information: a driver, a store manager, a simple dispatch rule.

      Watch a week

      Replay any run

      Layout
      Knowledge
      1× = one simulated hour per second
      Mon 12:30

      Why this move?

      Shelves through the week

      Each row is a store, nearest the DC at the top. Red is an empty shelf: customers leave without buying.

      Full Low Empty
      Inside the fly

      Memory against smell, in the real circuit

      A is where the fly remembers a store. B is a whiff: odor switches on hΔC cells that read the wind, and they write an upwind goal into the same goal cells, through their FlyWire synapses. Drag either around the compass; pull it toward the center to weaken it.

      Steering command at every heading
      Dots: headings where the fly settles (turning stops and pushes back)
      Method

      How it was built and checked

      What the wiring had to get right

      Every direction the fly's circuit uses was derived from FlyWire wiring alone, then checked against something independent. None of the published numbers were fed in.

      What is assumed
        Sources and credit

        FlyWire whole-brain connectome v783, FlyWire Consortium, Princeton University (CC-BY 4.0): Dorkenwald et al. 2024; Schlegel et al. 2024; Matsliah et al. 2024; Eckstein, Bates et al. 2024; Buhmann et al. 2021; Heinrich et al. 2018; Berg et al. 2025. Steering model form: Mussells Pires et al. 2024; Westeinde et al. 2024; Hulse et al. 2021. FC2 normalization: arXiv 2607.18969. Odor and wind: Matheson et al. 2022 (Nat. Commun.) and its 2024 addendum; Currier et al. 2020 (eLife); hΔ persistence, Nat. Commun. 2026. Plume behavior: Álvarez-Salvado et al. 2018 (eLife); van Breugel & Dickinson 2014; Celani, Villermaux & Vergassola 2014. Path integration and local search: Kim & Dickinson 2017; Behbahani et al. 2021. Store economics from the 7-Eleven Japan case (Pearson, 2026). Simulation: flyroute, OR-Tools CP-SAT.