protocol
The experiments from `experiments.guide` as records anything can run, and the verdict a run computes from its own numbers.
protocol
The experiments from experiments.guide as records anything can run, and the
verdict a run computes from its own numbers.
Protocol.all() is the five. Protocol.variants(proto) turns one into its
runnable forms, one per variant. Protocol.run(brainComp, proto, onDone)
starts a run and Protocol.tick(run) advances it, once a frame, until it
reports itself done. Nothing in here spawns a task, so a run cannot outlive
whoever is ticking it.
local Protocol = require("~.protocol")
local comp = entity.find("Brain").component.get("FruitFlyBrain")
local form = Protocol.variants(Protocol.byId("taste"))[1]
local run = Protocol.run(comp, form)
-- from update(dt), every frame:
if Protocol.tick(run) then
print(run.verdict)
-- MN9 peaked 130 Hz at 2497 ms, held 112 Hz; Kenyon_Cell 0.023 Hz;
-- network mean 1.30 Hz, 1.30 over baseline (confined)
end
A run starts from rest: it clears every drive and resets every membrane, so
the state the network was left in cannot reach its numbers. It then records
Protocol.BASELINE_MS of the network before its first drive: the fly is alive
while a protocol runs and what it drives through its own sensory neurons is
part of the network's rate, and the readouts need about a second of the
network's own clock before they report the reset network rather than the one
before it. The verdict's spread word is computed
on the rate the drive ADDED to that baseline, so an experiment reads the same
whether the fly is standing still or seeing the arena wall loom. A protocol's
durationMs is the length of its drive phase; the lead-in is on top of it,
and a peak's time is reported from the moment the drive started. It applies its own
gain and minimum synapse count for the length of the run and puts the previous
values back. It silences what it ablates and restores it. It stops its own
drives by driving them at 0 Hz, so no other drive is touched.
Readouts are watched under the names the guide uses (MN9, Kenyon_Cell, DNp01, LPLC2, LC4), so a bench watching the same cell types under the same name shares the group rather than spending a second readout slot on each neuron.
FruitFlyExperiments is the panel that runs these, and FirstRun is the card
that walks a newcomer to the first result. Both require this module, and the
Protocol.ui table is how they talk to each other.
Scoped to this part · feeds back into the world's score.