# Full fly circuit · contact-feeding feedback

This is a minimal neural-circuit-only motor-output experiment, not a learned driver or a simulated whole animal. External code provides local contact encoding and a fixed abstract resource actuator. No Q-learning, route planner, scripted goal priority, LLM, SUMO driver or pretrained body controller chooses actions.

## Recorded execution

- Linux, Python 3.12.3, Brian2 2.10.1, NumPy 2.5.4, Pandas 3.1.0, PyArrow 26.0.0, Cython 3.1.3.
- Original full model: 127,400 neurons, 14,687,178 synapse rows. Source commit `91bdd1e7dcf193f3e7ca5a8933497fcef63b7960`. [Author repository](https://github.com/philshiu/Drosophila_brain_model/tree/91bdd1e7dcf193f3e7ca5a8933497fcef63b7960), [official sugar/MN9 example](https://github.com/philshiu/Drosophila_brain_model/blob/91bdd1e7dcf193f3e7ca5a8933497fcef63b7960/example.ipynb).
- Three seeds 20261041–43 × intact, sensory-block, MN9-incoming-cut, restored = 12 trials, each one simulated second. Fixed candidate pulses per seed, 150Hz per sensory channel at 0.1ms resolution. Actual inputs differ when the environment changes through feedback.
- Every 10ms, MN9 spikes remove one abstract unit each, saturated at zero from 50 units. Subsequent sensory gating depends only on contacted resource availability. Neuronal state is continuous across feedback windows. The 21 sensory IDs come from the pinned notebook, not an invented shortcut to MN9.
- Motor cut: all 229 incoming MN9 synapse rows set to zero. Restore sets those exact weights back before the run. No other weights or source files change.
- Intact MN9 counts 52/50/54; all intact/restored runs consume 50 units, all cuts consume zero. Other neurons continue firing with MN9 input cut. Every restoration matches the full intact spike train and feedback trajectory.
- Elapsed model/result computation 229.45 seconds; max RSS approximately 3.04 GiB, one worker/native thread, nice 15. No GPU or permanent observer.

The resource amount and conversion gain are designed test settings, not measured food volumes or muscle physics. This is not evidence of intelligence, plasticity, search, steering or driving. The original model has fixed weights. No reduced surrogate is substituted.

## Repeat on the existing Linux environment

Download `run.py`, `protocol.json` and `validate.py` into a **new empty run folder**. The runner deliberately refuses existing `results` or `cache` directories. It points `BASE` to the existing verified source/data environment:

```text
/home/hskim/ops/dropkit-fly/runs/2026-10-26/2026-10-26_fly-baseline_v01
```

That folder contains `.venv`, the original `source/` files and `source-manifest.json`. The author snapshot's seven blobs are listed in the downloadable manifest; the runner checks actual Git blob hashes before and after execution. Original data are available from the author links in that manifest; they are not republished here.

```sh
env PYTHONDONTWRITEBYTECODE=1 OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 \
  MKL_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1 nice -n 15 \
  /home/hskim/ops/dropkit-fly/runs/2026-10-26/2026-10-26_fly-baseline_v01/.venv/bin/python \
  run.py > run.log 2>&1

/home/hskim/ops/dropkit-fly/runs/2026-10-26/2026-10-26_fly-baseline_v01/.venv/bin/python \
  validate.py results --receipt independent-validation.json
```

To use another dataset location, change only `BASE` and retain the same original seven files, environment and source manifest; record the changed runner digest as a new version. Do not overwrite the published reference. The [environment lock](requirements.lock.txt) lists the existing environment. Bitwise reproduction on different dependency versions or hardware has not been demonstrated.

`protocol.json` is the preserved preregistration and retains `prepared-not-run`. The actual outcome is explicitly `executionStatus: completed` in `summary.json`; the pre-run record is not retrospectively rewritten.

## Independent checks and raw records

To validate the downloaded public evidence **without rerunning the brain**, download the files listed in `manifest.json` into one directory, then use the locked environment (the checker needs Pandas/PyArrow) from that directory:

```sh
python validate.py . --receipt validation-repeat-v01.json
```

The checker supports both the public flat directory and a fresh simulation's `results/` directory. Choose a new receipt name each time; it refuses to overwrite prior evidence. This command re-counts stored events and does not import Brian2 or execute the neural model.

[Summary](summary.json) includes all 1,200 feedback windows and before/after source checks. [Independent validation](independent-validation.json) re-counts raw MN9 events, applies the declared resource balance and gate, checks known neuron IDs and compares full restore events. It imports no simulator or controller implementation.

- [All raw spike events, gzip JSON](spike-events.json.gz): per-trial `[neuronIndex, flywireIdString, timeStep]`. Each step is 0.1ms. Flywire IDs are strings to preserve 64-bit identity for JavaScript readers.
- [Candidate pulses, gzip JSON](candidate-input.json.gz): per-seed `[timeStep, channel]`, before environmental gating.
- Original Parquet: `<seed>-<condition>-spikes.parquet` for all 12 combinations above; `<seed>-candidate-input.parquet` for all three seeds; [neuron index](neuron-index.parquet). These match original Linux raw-file hashes. Parquet preserves 64-bit integers.
- [Figure](feeding-feedback.png), [runner](run.py), [validator](validate.py), [preserved protocol](protocol.json), [source manifest](source-manifest.json), [file hashes](manifest.json).

[Export and plot source](export.py) converts a fresh raw run into this publication layout; its plotting environment is recorded in [analysis-requirements.lock.txt](analysis-requirements.lock.txt). It expects a raw results directory and its `independent-validation.json`, plus a new output directory. It does not execute the brain.

The public summary is a selected export of the original Linux run summary, retaining all trials/windows. Raw spike JSON is a lossless typed export of the Parquet event rows. The validator checks the original Parquet hashes, source/protocol hashes and all raw-event accounting; the site CI additionally checks every published file against the manifest and matches JSON event accounting. A separate sparse/reduced brain, learned action selector or outside driving policy is not involved. The restoration is a separate run with weights restored before execution, not an in-run recovery process.

Author model copyright Philip Shiu and Nico Spiller, [MIT license](SOURCE-LICENSE.txt). Synthetic raw outputs and the abstract actuator do not validate biological feeding physics. The stricter neural-control requirement excludes the external controllers described in the [Eon embodied integration](https://eon.systems/updates/embodied-brain-emulation).
