DOCUMENTATION / VERSION 0.1
Understand the room.
A guide to observation, the neural models, and the limits of the experiment.
User guide
Observe
Open the observation page after starting npm start. The fly connectome runs on the shared server; wait for the neural status to show online. Select Fly or Worm to inspect that subject. The camera's Follow subject view moves close enough to see the tiny body; Orbit returns to the room overview. Drag to orbit, scroll to zoom, and use arrow keys or +/− for keyboard camera control.
The default room uses one scene unit per 0.25 m. Representative body lengths are 3 mm (fly) and 1 mm (worm). Location labels and selection rings are interface aids, not anatomical features. Movement and receptor ranges are still model parameters, not calibrated real-world physiology.
The sensory system cards group chemical, visual, mechanical, climate, and internal-state inputs. Select a card to filter the table; All systems restores every channel. Cards show the strongest current channel.
Read the panels
- Sensory telemetry: normalized 0–100 signals, model input pathways, a 120-second chart and peaks. A peak time is elapsed observation time; the world clock, event timestamps, and highlights use GMT.
- Neural observatory: click a pixel or enter an index. Worm names also work. Bright pixels fired in the last model tick. Read per-neuron metadata and follow outgoing connections. Raster positions are group-sorted indices, not anatomical coordinates.
- Event terminal: recorded causes and responses, filterable by source.
- World events: active visitors and environmental events. The 1,000 scenarios are parameter combinations, not 1,000 distinct biological situations.
- Survival records: live and completed individuals ranked by computed observation time. Death creates a fresh individual after three observed seconds. Operator resets are marked separately; closing a viewer does not end an individual.
Operate
Open /operator directly. The observation page does not expose operator controls. Sign in as operator using the generated password in outputs/operator-login.txt. Select a target before placing food or applying touch. Configure the room, light override, temperature, humidity, trails, or visual magnification; introduce a visitor; pause/resume; or reset the habitat. Commands reach connected observation pages on the same site within about one second.
Predators are non-lethal roaming visitors. They cause sensory cues and escape responses without attacking, injecting pain, or reducing health. Only one may be present. Random visits have a 10-minute cooldown and a 5% selection probability when eligible. Operators can deliberately introduce a visitor when the room is empty of predators.
Time and records
GMT runs at real-world speed: 24 hours is 24 hours. Pausing the organisms does not pause GMT. Suspended or closed-page time is not simulated or added to survival. Life records persist on the shared server; the top 100 are shown. Export downloads the shared observation. Clearing browser storage does not remove the shared records.
Synapse population and signal overlays
Default bodies use 4× visual magnification for readability, retaining their relative proportions. In the operator page, Add fly or Add worm starts an independent controller (maximum 3 flies, 4 worms). Additional fly brains run in isolated hidden frames with their own workers. Detailed neuron/sensor inspectors remain attached to the original fly and worm; the population roster lists additional individuals. Reset retires extra individuals and returns to the base pair.
The chart supports all signals on one normalized 0–100 plot. Check or uncheck individual channels; Select all and Clear signals provide quick controls. Colors and dash styles distinguish lines. Smooth curves are for rendering only; raw samples, peaks and exports remain unchanged.
Model and research boundaries
What comes from data
FlyBrain contributes its FlyWire-derived binary containing 139,255 neurons and 2,698,236 aggregated weighted connections. The worker uses a leaky integrate-and-fire approximation. Neuron IDs are joined from upstream CSV data and reordered exactly as the worker's stable group sort; 64-bit root IDs are kept as strings. The brain dataset does not supply a complete ventral nerve cord and body.
WormBrain supplies weighted connections for 300 neural nodes and 96 muscle-output nodes. The expected CANL and CANR nodes are not present in the imported weights. The local port uses threshold propagation and a locomotion adapter; it is not a biophysical recreation of every cell.
What this project adds
The room, 3D bodies, chemical gradients, daylight, weather, visitors, normalized sensor channels, energy, health, movement targets, avoidance steering, and plain-language descriptions are programmed models. Mating readiness is an energy/fatigue heuristic; mating, reproduction, endocrine biology, and subjective desire are not simulated. Some sensory groups in the supplied fly metadata have no cells and are disclosed in telemetry.
The simulation combines neural outputs with hand-written steering rules. A fly escaping a visitor does not by itself demonstrate that the real connectome generated that behavior. A highlight such as “detected motion from the worm” labels a modeled motion cue for the observer; it does not mean species recognition or consciousness.
Scale assumptions
Representative default body lengths: fly 3 mm and worm 1 mm. Scene conversion: 0.25 m per unit. The room is therefore 10 × 7.5 × 3.75 m at 1× room scale. Source meshes are scaled to those approximate longitudinal lengths. Other props, collisions, gas fields, speeds, and distances are educational abstractions; adjusting render size does not validate the physical environment.
Reference context: Australian Museum, vinegar fly and Society for Developmental Biology, adult C. elegans. Size varies with species, sex, and life stage.
Is it useful?
It supports education, software testing, inspecting graph activity, and exploring the consequences of explicit model assumptions. There is no defensible overall percentage of biological accuracy.
Before drawing scientific conclusions, add seeded repeatable trials, fixed stimulus protocols, neural-only versus rule-based controls, ablations, sensitivity analysis, and comparisons with published behavioral measurements. Track versioned parameters and uncertainty. Current survival rankings measure this simulation's rules and runtime, not actual insect fitness or expected lifespan.
Side-by-side neural views
The fly view uses all 139,255 reference positions from the pinned FlyBrain coordinates.csv.gz, matched by root ID to the worker index. These are reference points, not reconstructed cell morphology. WormBrain has no anatomical positions: its 300 neural and 96 muscle nodes use a schematic ring with the actual supplied connections. Mint shows model firing, gold shows direct sensory drive, and blue shows membrane potential. The primary pair is displayed. Worm firing now accumulates across every internal propagation pass in an observation tick. Source weights and thresholds remain unchanged. Default visual enlargement is 24× (operator range 1–60×); physical sensor ranges do not scale.
Worm display uses a 1.5× visibility boost relative to the shared magnification. Its brighter trail follows its actual recorded path at floor level. The worm network has larger nodes and retains real firing flashes for 600 ms so spikes between display frames remain visible; this does not change neural dynamics.
Shared server architecture
The Cloudflare Worker runs the full source-derived FlyBrain and WormBrain engines. The fly's immutable group-sorted topology is prepared once from the pinned source binary. Model weights and dynamics are preserved.
D1 stores one global world row. An expiring lease admits one writer across isolates; commits require the same lease token, preventing stale writers from overwriting newer state. The world, compressed neural checkpoint, monotonic revision and operator-command cursor commit together. Viewer requests only fetch or advance this authoritative row; there is no browser physics loop or client state-upload endpoint.
Clients poll about once per second and display the same positions, events, individuals, neural activity and life records. Fly voltages are quantized only in the public display packet; full float32 state remains in the server checkpoint. Displayed fly firing is the union across the latest server update to avoid missing spikes between network frames. Single-neuron probes read the server checkpoint.
Operator authentication remains session-based with rate limits, same-origin checks, protected commands and logout. Additional individuals have independent neural states. Commands apply exactly once per committed world cursor.
This hosting deployment advances on observation requests. Closing every viewer leaves a durable checkpoint. It does not perform unattended 24/7 computation or credit uncomputed time. An always-running compute host is required for that additional behavior.
Tests: npm test; npm run build; node tests/worker.mjs; node tests/shared.mjs.
Source credits
FlyBrain by snedea; WormBrain by leparlon. Upstream license notices are retained with the site assets.