Learning bug — experiment journal
Research record
- Question
- Can a synthetic learner maintain energy by foraging, adapt after food relocation, and retain its action values across process restarts?
- Evidence
- Exact sources and hashes, a one-hour Linux capture, every event, saved state, all 30 benchmark seeds, retained development failures and a separate process-restart check.
- Experiment
- Seed 27, zero-initialized values, one wall second per tick for 3600 ticks. Food sites move at tick 1800. Independent accelerated benchmark: seeds 101–130, learner/frozen/scripted policies. Original two-choice experiment is retained below.
- Results
- The primary creature survived the full observation, ate 212 times, and ended with 94 learned contexts. Benchmark survival: learner 24/30, frozen 0/30, scripted 21/30. The scripted policy collected more food on average. Restart continuation matched the uninterrupted state exactly. V2 on 2026-10-28: learner, frozen, site-memory-off and rule policies all survived 20/20 held-out worlds; no survival advantage established. Representative seed 27: food 93, water 82, shelter sleep 780 ticks.
- Limitations
- Engineered tabular Q-learning, local scent shaping and arbitrary energy units; no biological connectome, spikes, realistic body or self-generated goals. Six learner benchmark seeds starved. The one-hour observation itself was not interrupted; restart was tested separately.
- Reproduction
- Download model.mjs, run.mjs and continue.mjs. Use the linked protocol, full events, all benchmark trajectories and source hashes. Accelerated benchmark time is distinct from the one-hour wall-clock capture. V2 Node 22.23.4 Linux runs and full traces/checkpoints/source hashes are published under /research/needs-bug-v02/.
Sources
- Exact synthetic model source
- Exact foraging world model
- Sutton and Barto: Reinforcement Learning, second edition
- Keramati and Gutkin (2014): homeostatic reinforcement learning
Run evidence
- Protocol, environment, source hashes and all seed results
- Full paired trial records
- Standalone reproduction runner
- One-hour capture and metrics
- Full observation events
- Saved world and learned values
- All benchmark seeds and conditions
- Every benchmark trajectory (gzip)
- Restart verification
- Source hashes
- Three-needs benchmark and checkpoint verification
Scope correction · 2026-10-28
This journal uses a separate Q-learning controller. It does not satisfy the requirement that the fly neural circuit alone generate behavioral output. These experiments are preserved as supporting demos; current work is the full-circuit feedback test.
Foraging world · First choice experiment
2026-10-28 · Food, water and rest
Open the three-needs recording →
Task: Let engineered needs compete. The creature chooses food, water, shelter sleep or exploration, remembers observed resource sites, and uses a scripted route planner on known terrain. Resource discovery is limited to a three-cell Manhattan radius. This is a new synthetic model, separate from both the original foraging world and the biological fly circuit.
Executed: Linux, Node 22.23.4, 3,600 accelerated ticks per world. Representative seed 27 survived, consumed food 93 times and water 82 times, slept in a shelter for 780 ticks and updated 31 learned goal contexts. A separate split/restart matched the entire uninterrupted world state. These are virtual ticks, not another real-time hour.
| Policy | Survived | Mean food | Mean water | Mean shelter sleep |
|---|---|---|---|---|
| Learner | 20 / 20 | 109.2 | 86.8 | 858.4 ticks |
| Learning off | 20 / 20 | 102.2 | 76.6 | 439.3 ticks |
| Site memory off | 20 / 20 | 64.3 | 48.4 | 815.1 ticks |
| Scripted priorities | 20 / 20 | 60.6 | 52.7 | 262.4 ticks |
Interpretation: Every condition survived. This world is too forgiving to establish a survival benefit from learning. Site-memory removal reduced resource visits in these matched worlds; it retains Q values and exploration visit ages, so it does not test removal of all memory. More consumption or sleep is not automatically greater task performance. The representative run recorded zero ticks with two severe deficits under the declared conflict threshold; competing needs exist, but a strong scarcity trade-off has not been demonstrated.
Controls: Seeds 101–120, four policies, zero initial Q values in each world. Development seeds 1–5 were diagnostic only; no tuned parameters or learned values were transferred. All 80 evaluation trials and full traces are included, including any failures (none in this batch). The learned choices are four high-level goals; navigation, exploration and physiology are hand-designed. There are no spikes, biological neurons, emotions, self-created needs, day/night or predators.
Next — not run: A preregistered scarcity test that forces a food/water/rest trade-off. Keep these easy-world results as the baseline instead of retroactively strengthening their claims.
Evidence: All trials, parameters and source hash, full traces, development, saved world, model, runner. Reproduce with Node 22.23.4 using node run.mjs NEW_OUTPUT_DIRECTORY beside the model. Existing v1 observations and checkpoints are preserved.
Task
Build a synthetic creature that finds food, maintains energy and retains learned action values across restarts. Both experiments are separate from the fly-brain circuit study.
2026-10-27 · Foraging and persistence
Replay the Linux observation · Full capture
Changed: Added a 14 × 10 world, obstacles, six food sites, energy costs and persistent action values. The learner senses local scent and blocked directions plus an energy band. A hand-designed scent-gradient term supplements the energy reward. It receives no map or food coordinates as policy inputs.
Clock: One actual hour on Linux, seed 27, zero initial values, one tick per wall second. Recorded elapsed time: 3600.006 seconds. Food sites moved at tick 1,800. Starvation never triggers an automatic respawn.
Observed: The creature survived the full observation. It ate 212 times, ended with 125.4 energy units and 94 learned contexts. Food collected before/after relocation: 115 / 97. The first meal after relocation took 2 ticks.
Memory: A separate process resumed a 120-tick checkpoint for two real seconds. Its entire 122-tick world matched an uninterrupted reference, and the input checkpoint remained unchanged. The primary hour was not restarted. Evidence.
Comparison: The following runs are accelerated simulations of 3,600 ticks each, separate from the wall-clock observation. Every policy starts in the same terrain and planned food sites for each seed; sensory experience diverges with actions and consumption.
| Policy | Survived | Mean food |
|---|---|---|
| Learner | 24 / 30 | 193.7 |
| Frozen values | 0 / 30 | 5.1 |
| Scripted scent follower | 21 / 30 | 245.2 |
Exceptions: Learner seeds 101, 108, 110, 112, 122 and 129 starved. Five of those deaths occurred after relocation; timing alone does not identify the cause. The scripted follower ate more on average. No failed seed was excluded. Five development worlds, including one learner death, are retained separately.
Limit: This independently engineered toy uses arbitrary energy units, local cue-to-action values and a Manhattan-distance scent field. It does not reproduce biological memory, the cited papers’ numerical experiments, or the earlier MN9 circuit. Background references explain the broader learning ideas; they do not validate this implementation.
Continue: The saved world can be resumed for a bounded interval with the continuation tool. The completed observation stopped at its declared limit. No permanent service or automatic publication schedule was installed.
2026-10-27 · Baseline executed
Changed: Added reward-driven value updates. Reward A, switch to B, disconnect the learned readout, then reconnect it without retraining.
Conditions: Both agents receive the same offered cues, side layout and random choice draw on each trial. Only the learner updates its chosen value. Seeds 1–30; 260 paired trials per seed. Each checkpoint then uses 1,000 fresh assessment choices per agent with learning disabled.
| Checkpoint | Frozen control | Learner |
|---|---|---|
| Before learning | 50.4% | 50.4% |
| Learn A | 50.4% | 94.9% |
| Switch to B | 49.6% | 94.2% |
| Disconnect memory | 49.6% | 49.6% |
| Reconnect memory | 49.6% | 94.2% |
Result: All 30 seeds met the checks defined in the runner before its first run: at least 25 percentage points of acquisition/reversal advantage and disconnection drop; exact assessment restoration; unchanged stored values through disconnection/restoration; frozen control values. No exception seed. This is a code-defined check, not an independently preregistered study.
Limit: The disconnected readout forces unbiased choice by design. Reconnection reuses preserved values and matched assessment draws, so exact recovery checks implementation. It does not demonstrate biological memory, realistic movement, or learning in the earlier MN9 circuit.
Next · Not run
Investigate the six starvation failures, especially behavior after food relocation. Probabilistic rewards and unrewarded probes remain not run. A biological spiking memory circuit and any connection to the earlier fly-brain model remain unimplemented.
Reproduce
Run ID: learning-bug-v01-20261027. Linux x64, Node v22.23.4. Model SHA-256: cb226b497a49ed78979e0327ebe66bebeae2d1edbeafb6ad2d3fba19e19ce183.
Download the model and runner into one folder, then run node benchmark.mjs results. No packages or backend are required. Compare hashes and all seed results with the summary; execution timestamps will differ. Full trial records include offered inputs, draws, choices, rewards and before/after values.
Update record
-
2026-10-28: Removed external-policy demos from the current task list and linked the stricter neural-control experiment. Prior results remain unchanged.
-
2026-10-28: Executed and replay-verified the separate three-needs Linux model and 80 matched evaluation trials; published all controls and the absence of a demonstrated survival benefit. Prior observations remain preserved.
-
2026-10-27: Initial synthetic experiment executed on Linux and recorded across all 30 seeds. Next experiments remain not run.
-
2026-10-27: Added the completed one-hour Linux foraging capture, all 30 benchmark seeds, failures, checkpoint evidence and a replay. The original choice experiment remains intact.