Log inGet started
World

Fruit Fly

Branchmain
Branchesmain
Commit83f1b94a81

README.md

FruitFlyExperiments

The experiments panel: the five experiments from experiments.guide as one press each, with a verdict line computed from the run's own numbers and a compare overlay against the run before.

local panel = entity.spawn("Experiments")
panel.component.add("FruitFlyExperiments", { brain = brainEnt, fly = flyEnt })

brain is the entity carrying the FruitFlyBrain. fly is the embodied fly the looming protocol is recorded against.

Pick a protocol, press RUN. Every run clears the drives, resets every membrane, records Protocol.BASELINE_MS of the network before its first drive starts, applies its own gain and ablations, samples every readout on the network's own clock, and puts everything back. A protocol with variants runs them in order: gain recovery is three runs, looming and ablation are two each.

COMPARE lays the run before the newest one over the same plot, dimmed, and prints its verdict under the new one.

Controls

ActionKeyboardGamepadTouch
Show or hidePSelectThe "Experiments" button, bottom right
Next protocolNRight stick pressTap the protocol
Previous protocolBNone: the list wrapsTap the protocol
RunRRight triggerRUN
CompareCLeft triggerCOMPARE

The five protocols are the panel's focus ring, and the focused one carries a 2 px accent border. Moving the focus is choosing the protocol, so a pad reaches every protocol without an activate button. A text field holding the caret owns the keyboard, so a selection typed at the bench does not run a protocol on its way in.

The panel lays out from ui.screenSize() every render: the right 40 percent of the screen, from 7 percent down, clear of the bench's left column. The window can be dragged and resized from there.

From code

comp:start(id) runs a protocol by id (taste, auditory, gain, looming, ablation) exactly as RUN does, and comp:runs() is the session's runs, each carrying its label, its verdict, its samples and the statistics the verdict was computed from. The protocols themselves and the machinery that runs them are in protocol.module, which has no UI in it.