Foraging bug
Synthetic world · v1Find food. Keep energy. Carry learned values across restarts.
Alive
- Food eaten
- 0
- Learned contexts
- 0
- Last action
- Start
- World age
- 0:00
Playback could not load. The raw capture and protocol below are available.
30-seed benchmark
Seeds 101–130 · 3,600 simulated ticks per condition · accelerated runs, separate from the wall-clock observation.
| Policy | Survived | Mean food | Mean survival ticks |
|---|---|---|---|
| Learner | 24 / 30 | 193.7 | 3334.0 |
| Frozen control | 0 / 30 | 5.1 | 357.5 |
| Scripted scent follower | 21 / 30 | 245.2 | 2903.0 |
The learner starved in seeds 101, 108, 110, 112, 122, 129. The scripted follower collected more food on average; learning was not best on every measure.
All seeds and conditions · Full benchmark records (gzip) · Development runs
Linux capture
The bounded observation has finished. The stored world can be continued from its checkpoint.
Seed 27 · survived the full hour · 212 meals · final energy 125.4 / 150 · 94 stored contexts.
Capture status and metrics · Recorded frames · Protocol and source hash
All observation events · Saved world and learned values · Exact compact checkpoint · Observed timing
Method, limits and restart
A 14 × 10 grid has obstacles and six food sites. Movement and rest consume energy; food replenishes it. Food regrows after 45 ticks and all sites move at tick 1,800. Energy zero ends that body's activity permanently. The observation has no automatic respawn.
Tabular Q-learning uses local scent direction/strength, blocked-neighbor flags and an energy band. The reward includes energy change and an engineered scent-gradient term. Energy units are arbitrary; the Manhattan-distance scent field passes through walls while movement respects obstacles. These are design choices. No biological connectome, neural spikes, realistic body physics or self-generated goals are modeled.
For reproduction, save the model and runner together. With Node 22, use node run.mjs ./model.mjs benchmark new-output. A bounded observation uses node run.mjs ./model.mjs pilot new-capture 3600.
The checkpoint continuation tool resumes a saved world for a chosen interval: node continue.mjs ./model.mjs final-state.json new-continuation 60. It preserves the input checkpoint and stored action values; no restart service is installed.
Restart verification includes the original startup and completion records. The capture's state hash covers the compact checkpoint serialization; the readable saved world contains the same state with indentation.
Background: Sutton and Barto, Reinforcement Learning; Keramati and Gutkin, homeostatic reinforcement learning. This independently engineered toy does not reproduce their numerical experiments.