# Dose-aware decisions and Foundation Trials PreyLab's grazer controller combines **local, currently detected** chemical readings with sensed food, nearby threats, contact, hunger and its own toxin burden. A chemical receptor supplies an activation, adapted response and signed inherited response. It does not supply an emitter position or a future dose forecast. A zero or absent receptor contributes no direction, while physical toxin exposure can still enter the cell and clear through the unchanged toxicology model. ## Decision rule `dose-decisions.js` sums the XY bearings of all fresh detected organic and alarm readings, each weighted by its signed response and local activation. A repellent contribution scales with `avoidGain = clamp(0.6 + 1.4 × burden − 0.15 × appetite, 0.4, 2)`, where `burden = clamp(0.35 × maximum normalized internal dose + 0.65 × maximum physiological impairment, 0, 1)`. Attraction does not receive that multiplier. Sensed edible food contributes its own bearing at `1.2 + 0.3 × appetite`; other local steering contributes 0.35. The sum sets an intended heading only when it is nonzero. Threat, wall and body contact retain their safety overrides. Hunger can therefore compete with avoidance, and opposing cues can cancel. The coefficients are bounded controller choices, not calibrated biological predictions. Strong poison can impair sensing or locomotion, so higher burden never guarantees a successful retreat. The selected cell's Strict Perception drawer shows food weight, chemical weight, burden, avoid gain, signed receptor contributions and the intended bearing. These are the controller's local values. They do not expose packet source identities, hidden locations or a path to the producer. The Ecology chemical inspector can separately show observer provenance. Ordinary toxin dose, clearance, stacking, resistance and death remain governed by `toxicology.js`; this decision rule does not grant toxin immunity. ## Run the trials At the top of PreyLab, choose a Foundation Trial and read its disclosure. **Create Trial Dish** first saves the current dish through the normal archive path; a failed save leaves it and the preview intact. The new trial opens paused so you can inspect its finite starting conditions. Press Run to advance normal physics and metabolism. Creating a trial never silently modifies the current dish. Variants are separate dishes; no background trial or scripted outcome runs. | Trial | Prepared setup and observation | | --- | --- | | Opposite Compound Responses | Existing compound-opposites preset; equal receivers with positive, negative and neutral signed organic responses. Compare their local readings and headings. | | Independent Emitter and Receiver | Same ordinary preset; compare a producer without useful reception with receivers that detect without producing. Check actual release expense. | | Inherited Release Regulation | Existing six-cell release-regulation preset; compare program, apparatus capacity, trigger and pulse timing. | | Exposure, Hunger and Resistance | Five grazers near a paid Glasscoat toxin source. Two resistance levels, hungry/satiated state and one receptor-absent control are disclosed. Vulnerable/resistant cells start with 0.035/0.009 prepared internal irritant dose, representing prior unequal uptake; this is an explicit initial condition, not an observed trial result. Later exposure and clearance use ordinary rules. | | Competing Chemical Gradients | An edible algal source, a separate alarm source and a receiver with positive organic and negative alarm response. Inspect both contributions and food weight as real packets move. | | Finite Food and Recycling | Finite alga, grazer, crawler and corpse. Choose dark or lit in separate dishes. Automatic feeding is off; compare accounting and detritus. | | Mutation Chance and Step | Eighteen common starting algae; choose default, zero chance or larger maximum step. The ordinary 128-cell cap, resource budget and division rules apply. Short runs can produce no mutation. | | Reserves Through Darkness | Low, medium and high reserve-investment algae share the same dark recovery environment. Compare stores and descendants through at least one 240-second cycle. | All trial builders use a 200× dish, a 128 living-cell cap, no automatic nutrient/current pulses, no artificial support quota, no forced lifespan and zero mutation except the explicit mutation trial. They use finite initial stores and normal simulated steps. The preview lists live counts, actual aggregate stores, lighting, toggles and any special prepared dose before replacement. `foundationTrial` version 1 in run metadata identifies the setup; it is not a result label. Do not infer universal behavior from a single free-running encounter or one seed. Chemical tracks can dissipate or cross, and the controller has only local measurements. ## Source and evidence Implementation: `dose-decisions.js`, `grazer.js`, `population.js`, `foundation-trials.js`, `presets.js`, `preylab.js`, `index.cfm`, `preylab.css` and the dish validator. No gene, genome or population schema revision was required; a bounded optional diagnostic is validated on load. Focused tests live in `test/preylab-dose-decisions.test.mjs` and `test/preylab-foundation-trials.test.mjs`. `scripts/verify-preylab-f10-local.mjs` exercises real Lucee/MySQL save, reload, revision and continued accounting. This is a fictional model with qualitative controller coefficients and no claim of biological calibration.