# First taste — digital fly proof of concept 01

Open https://augmentedthinker.github.io/first-taste/ and press Play. Sugar moves the illustrated mouth; Wires off leaves it still. These are recorded outputs from real local simulations, not a sugar-triggered animation. The page is explicitly labelled recorded playback. Changing its controls does not run a new neural simulation.

## What was actually demonstrated

On September 18, 2026, we ran the complete author-supplied FlyWire v630 network: 127,400 neurons, 14,687,178 directed weighted rows, representing 52,793,639 counted chemical synapses. No rows were pruned or connections retrained. Three seeded trials of one simulated second were run for each of five conditions. The two recorded MN9 outputs drive the same symbolic mouth decoder for every condition.

| Condition | Trial 1729: MN9 1 + 2 | Trial 1730 | Trial 1731 |
| --- | --- | --- | --- |
| Sugar | 79 + 53 = 132 | 70 + 56 = 126 | 68 + 49 = 117 |
| Sugar + bitter | 1 + 11 = 12 | 8 + 13 = 21 | 5 + 12 = 17 |
| Wires off + sugar | 0 | 0 | 0 |
| No sensory drive | 0 | 0 | 0 |
| Bitter alone | 0 | 0 | 0 |

The full model reproduces the expected qualitative sugar response and bitter suppression. Disabling transmission preserves exactly the paired sugar sensory spike trains but removes motor output. This establishes a dependence on network transmission within this model. It does not establish that the precise topology is uniquely necessary; no rewired-network comparison was run.

## Verification against the original

`check_reference.py` runs the authors' unmodified `model.run_trial` with their original full-table loader. For sugar at 100 Hz, seed 1729, and a 0.1 ms timestep, **every spike train matched exactly**: 10,048 spikes, 356 active neurons, zero timing difference. See `results/reference-check.json`.

The optimized loader streams the table in batches; preserves every row, signed weight, delay and source index; and checks every root-ID/index pair against the original neuron list. It imports the original neuron equations, threshold, reset and Poisson-input helper. All selected sugar/bitter/MN9 IDs are extracted from the pinned author notebook with literal parsing, not from our desired visual outcome.

`export_and_verify.py` checks all 15 raw NPZ recordings against exported motor spike arrays, total counts, populations and activity. It verifies the paired sensory spike trains for the disconnected control. It will not publish the browser data unless the unmodified reference comparison passes. `decoder.test.cjs` checks that zero motor spikes cause zero motion, future spikes cannot move the mouth, genuine sugar output moves it only after the first spike, and changing stimulus labels cannot affect the decoded movement.

All five decoder tests passed. Browser checks passed for real-trace motion, no motion with transmission disabled, pause, seeking, trial/condition selection, hidden-page pause, result downloads and Artifacts placement. Desktop/mobile rendering was inspected with no document overflow or page-script errors. These checks describe the original local edition; the public edition is checked separately before publication. Temporary test browsers were closed; final process inspection found no remaining Chromium or experiment runner and no unexpected task-owned CPU activity. The existing Astra chat service remains in place.

An initial reference-check comparison stripped physical units in the wrong order; the unmodified simulation itself succeeded, but that comparison script errored. The corrected standalone check reran the reference and passed. No simulator equations or parameters were changed to address this check error.

## Parameters and limits

- Original source commit: `91bdd1e7dcf193f3e7ca5a8933497fcef63b7960` from https://github.com/philshiu/Drosophila_brain_model.
- Rest/reset −52 mV; threshold −45 mV; membrane time constant 20 ms; synaptic decay 5 ms; refractory time 2.2 ms; transmission delay 1.8 ms; global gain 0.275 mV per signed connectivity unit.
- Exact reference Poisson-input treatment: driven cells have zero refractory time and input amplitude scaled by 250. Sugar and bitter drive are each 100 Hz when selected. Seeds 1729, 1730 and 1731 are set before each trial; network state is restored to rest.
- Timestep explicitly set to 0.1 ms, linear integration, Brian2 Cython backend. No gain search or training occurred.
- The original model's gain was calibrated against feeding output by its authors. This is not a parameter-free consequence of wiring.
- The two output IDs are `720575940660219265` and `720575940645521262`. The interface calls them cells 1 and 2 rather than making a lateralized claim; historical notebook/paper orientation labels require reconciliation.
- Python 3.13.5, Brian2 2.10.1 and the installed dependencies differ from the publication's original environment; versions are locked in `requirements-lock.txt`. Exact same-environment agreement with unmodified source is verified for one trial, not every published result or the historical software stack.
- Three repeats per condition are a first proof of concept, not a reproduction of the full paper's 30-repeat analyses. No new wet-lab validation, hunger, learning, muscle mechanics, actual contact sensing or closed-loop body was implemented.

The decoder receives only motor spike times and playback time. Each past spike contributes an exponential with a 100 ms decay; a fixed saturating conversion maps that sum into a mouth angle. This is a deliberately arbitrary display scale, identical for every condition, and is not measured fly biomechanics. The drop color and description depend on the selected condition; the mouth does not. All UI traces are genuine experiment outputs. Synthetic decoder test fixtures stay inside the test file.

## Measured cost on this Chromebook

The memory-efficient experiment loaded in 6.619 seconds, peaked at 1,246 MiB (about 1.22 GiB), and took 282.018 seconds for all 15 trials including first-use compilation. Later one-second simulations took approximately 9–12 seconds each. The separate unmodified reference check peaked at 2,813 MiB and completed its load/run in 13.236 seconds using the compiled cache. Values are observed for this run, not guaranteed runtime bounds.

Local files and the isolated environment total approximately 514 MiB before small subsequent documentation/screenshots. Nothing runs continuously. The experiment runner exits; the browser requests animation frames only during user-started playback, pauses when hidden, and stops on page exit. No new service, chat-server change, account, GPU or cloud compute was needed.

## Files and reproduction

- `run_experiment.py`: offline full-network runner and raw trace recorder.
- `check_reference.py`: one-seed comparison to unmodified source.
- `export_and_verify.py`: raw-record verification and browser-data export.
- `reference/`: original model, notebook, README and MIT license, unchanged.
- `data/`: original compact connectivity and neuron tables; `manifest.json` holds origin URLs, sizes and SHA-256 hashes.
- `results/`: 15 compressed NPZ spike recordings, `results.json`, validation records and logs. Raw arrays preserve exact numeric root IDs. Browser IDs are strings to avoid JavaScript precision loss.
- `index.html`, `astra-fly.css`, `astra-fly.js`: local viewing page.
- `astra-fly-model.js`: pure motor-spike display decoder.
- `astra-fly-data.js`: generated recorded data, never a hand-authored activity trace.

From the repository root, after installing the environment and fetching data as described in the top-level README:

```bash
artifacts/digital-fly/.venv/bin/python artifacts/digital-fly/run_experiment.py
artifacts/digital-fly/.venv/bin/python artifacts/digital-fly/check_reference.py
artifacts/digital-fly/.venv/bin/python artifacts/digital-fly/export_and_verify.py
node --test artifacts/digital-fly/decoder.test.cjs
```

These explicit commands replace the current result files; preserve them separately before a new experiment if comparison is desired. Run sequentially to avoid overlapping network memory. To recreate the isolated environment, use `python3 -m venv artifacts/digital-fly/.venv` and its `pip install -r artifacts/digital-fly/requirements-lock.txt` on compatible Linux/Python. If restoring the data from scratch, fetch the exact URLs in `data/manifest.json` and verify their SHA-256 hashes; do not silently substitute a later release. No model execution is needed to view the existing page.

## Attribution

Scientific model: Shiu et al., *A Drosophila computational brain model reveals sensorimotor processing*, Nature (2024), https://doi.org/10.1038/s41586-024-07763-9. Original code © Philip Shiu and Nico Spiller, MIT; notice preserved in `reference/LICENSE`.

FlyWire/FAFB data: credit Zheng et al. (2018), Dorkenwald et al. (2024), Schlegel et al. (2024), and neurotransmitter work by Eckstein et al. (2024), as described by the source publication and https://home.flywire.ai/guidelines. FlyWire public-data guidance is CC BY-NC 4.0; an MIT code license does not replace upstream data terms. This is a public, noncommercial educational demonstration. The full connectome is fetched separately from its pinned upstream source; recordings and identifiers are derived from that source. See the top-level CREDITS.md for data terms.

Illustrated fly, interface and symbolic output decoder: Astra for Christopher. The body is original SVG artwork, not anatomical reconstruction. This public edition includes the completed experiment and its reproduction tools.
