GFly Learning Lab
Jiahe Tian, HiOS Labs Inc., ipo@stanford.edu

This artifact contains executed computational experiments. It is not an animal
experiment, an intact fly simulation, or a new reinforcement learning method.

OPEN THE DEMO
From the artifact root:
  python3 -m http.server 8769 --bind 127.0.0.1 --directory dist
Open http://127.0.0.1:8769/ in a browser. Training runs in a Web Worker.
The model and included data require no API keys or machine learning runtime.
The interactive page, PDF paper and accessible HTML paper use the same results.
The public API example is at dist/api.html.

SOFTWARE CHECKS
With Node 20 or later (measured on Node v26.0.0):
  node experiments/check.mjs
  node experiments/check_digits.mjs
  node experiments/custom_task.mjs
The last command is an API demonstration, not an additional test result.

REPEAT THE EXPERIMENTS
Keep the shipped records. The runners intentionally refuse to overwrite them.
Rename results/runs.jsonl to results/reference-runs.jsonl, then run:
  node experiments/run.mjs
Rename results/digit-runs.jsonl to results/reference-digit-runs.jsonl, then run:
  node experiments/run_digits.mjs
The source files, circuit bytes and task settings must remain unchanged.
Compare all outcome fields, learning histories and checkpointSha256 fields
against the reference files. Wall times and environment timestamps vary.
The synthetic protocol uses 20 seeds, three tasks and six conditions (360 runs).
The independent handwriting followup uses 10 seeds, three pairs and six
conditions (180 runs). All configurations are retained, including failures.
Pilot seeds 9001 and 9002 are separate from the reported study seeds.

ANALYSIS AND PAPER
Use Python 3.12 or later. Install versions in requirements.txt in a virtual env.
  python experiments/analyze.py
  python experiments/analyze_digits.py
  python experiments/make_visuals.py
  python experiments/make_paper.py
The analyses verify hashes from the frozen protocols before producing results.
The visual generator independently checks paired means and records all displayed
seed differences and example selection rules in checks/visuals/figure-provenance.json.
It uses completed run records and performs no new training.
The paper builder writes paper/main.tex and dist/paper.html from one content
definition, and copies the figures into both publication directories.
Compile paper/main.tex with pdfLaTeX twice, from the paper directory.
Copy paper/main.pdf to dist/GFly-learning-paper.pdf after compilation.
No shell escape is needed. The manuscript uses standard article packages.

BROWSER CHECKS
The recorded checks used Playwright, Chromium 147.0.7727.15 and WebKit 26.4.
Install Playwright with its Chromium and WebKit browsers, start the local server
above, then run:
  python experiments/browser_check.py
  python experiments/browser_digits.py
These are headless desktop tests, not measurements on a phone. Tests compare
same engine continuation exactly and cross engine gains within 1e-10.
Observed differences are stored in checks/browser-checks.json.
Browser load timings use localhost and do not estimate internet latency.

REBUILD SOURCE DATA (OPTIONAL)
The derived data needed to reproduce every training run is already included.
To audit extraction, download the two exact filenames and verify their hashes
from results/circuit-provenance.json. Their official base URL is:
https://storage.googleapis.com/flyem-male-cns/v1.0/connectome-data/flat-connectome/
  python experiments/build_circuit.py --source /path/to/downloaded/files
To rebuild the handwriting artifact from the official UCI archive:
  python experiments/build_digits.py
Provenance records include source and output hashes. Keep the official training
and test partitions. Do not combine them into a new random split.

INTERPRETATION
Only the two selected edge classes are retained. Neuron responses, the pixel
interface, artificial action groups and learning rule are engineered choices.
Gains are shared across existing connections from each KC to an action group.
The model does not learn each synapse independently and contains no recurrent
memory. Similar performance with rewiring prevents a claim that intact anatomy
caused the task success. A successful API demonstration or regression check is
not an additional independent learning experiment.

DATA AND CODE
See ATTRIBUTION.txt for the two data sources and their CC BY 4.0 terms.
Original code in this artifact is offered under LICENSE (MIT).
The existing GFly game application is separate from the evaluated learning lab.
