Experiments · E32

Can the fly decide for itself how long to keep searching before moving on?

Yes. A stop-when-returns-fall rule matched the hand-set schedule (−470.6 against −471.6 meV/atom) with a tighter spread, though a minimum still binds.

In the log: The fly decides how long to forage, from the returns

recordedDate 2026-09-12, as written in the loggenerator · fly brain0 predictions · 1 result paragraphEXPERIMENTS.md lines 1572–1621
exp E32 diagram
What E32 did and how it came out, drawn from this record and the files it names (book/assets/diagrams/exp/E32.svg).

Results

EXPERIMENTS.md · line 1603

Result, 60 evaluations, 10 seeds:

The full record

EXPERIMENTS.md · lines 1572–1621

E32 — The fly decides how long to forage, from the returns

Date 2026-09-12 · Question (operator) Why is the number of proposals per round something the experimenter sets? · Provenance forager/forage.py, forager/mushroom.py, …/{forage_wide,forage_mvt}.py

First, the evidence that the number mattered. Raising proposals per round from about 600 to about 3,900 - free, since screening costs no evaluations - made the search worse:

proposals per round best found beat the 4,000-draw sweep
~600 -471.6 +/- 7.6 4 of 10
~3,900 -468.4 +/- 7.5 1 of 10

Made to keep walking after the returns have gone, the swarm piles against whatever its judgement most likes, and a judgement that is merely good becomes one over-trusted. Searching harder against an imperfect score is not searching better.

The rule. A forager leaves a patch when the rate it is still gaining falls to the average rate the environment has been paying - Charnov's marginal value theorem (1976) - which makes the decision one about reward rather than a schedule, and needs no fitted constant.

The units, which the first attempt got wrong. Compared directly, the fly stopped at the earliest permitted step on every round of every seed - the signature of comparing two different things. Its score is a weighted sum of output-neuron activity, of order 0.005; the reference rate is in standardised reward, of order 0.1. The exchange rate was already being kept, for the prediction error in learn(), and converting with it makes the comparison one between two quantities of the same kind.

Result, 60 evaluations, 10 seeds:

best found beat the sweep
25 steps, set by hand -471.6 +/- 7.6 4 of 10
decided from the returns -470.6 +/- 4.8 1 of 10
Latin hypercube, same budget -456.8 +/- 6.6 0 of 10

The means are indistinguishable and the spread is noticeably tighter, for one fewer number chosen by the experimenter. The difference in how often it beats the sweep is 4 of 10 against 1 of 10, which at this sample size is not significant (Fisher exact p ~ 0.30) and is not claimed either way.

Caveat, and it is the interesting one. Of 45 rounds the fly chose the minimum 10 steps in 24 of them, with a tail out to 23. The minimum is 2 x window and window is still a number someone picked, so the floor binds about half the time: the rule has removed the schedule but not every constant behind it. The right next question is whether the fly should also decide how much of its budget to spend in a round, rather than the budget being divided evenly in advance.

Built with PRISMWebsite and visualizations made using Claude