# Experimental biology protocol 2

Eight simulator mechanisms are implemented in the isolated, browser-executable TypeScript engine at `/laboratory`. Cloudflare serves the application as static assets. There is no new container, recurring experimental compute, or canonical-world migration. Experiments run only while the visitor has the laboratory open and running.

This is a separate model, not a retrofit or continuation of the Rust live world. Its grid, genome, energy parameters and tick scale differ. Comparisons belong within this protocol. Existing Rust research runs and their results retain their original protocol and remain available.

## Mechanisms and measurements

| Capability | Implemented mechanism | Direct measurement / control |
| --- | --- | --- |
| Geography | Finite 24×24 habitat with central barrier; inherited controllers move organisms; tunable crossing probability and scheduled secondary contact. Barriers also block cross-boundary sensing and mating. | Blocked movement, successful crossings and blocked mating. Turning barriers off removes the boundary; permeability allows organisms to migrate before mating. |
| Resource specialisation | Two spatially structured foods with opposite inherited diet affinities. Assimilation is `0.35 + 0.6 × affinity²`; generalists trade peak assimilation for breadth. Every treatment receives four raw energy units per cell per tick. | Intake by food type, rejected excess input and assimilation losses. Uniform-food control changes distribution and assimilation rules, not total external input; it is not a pure spatial-shuffling control. |
| Sensing | Inherited range 1–5 cells, period 1–4 ticks and precision 2–16 levels. Food gradients, neighbour direction and local signals feed the controller. | Range maintenance costs `ceil(range²/8)` each tick and sampling costs `ceil(levels/8)` on sample ticks. Off removes costs while retaining the information, for an energy-cost control. |
| Signalling | Controller chooses signal production. Field decays by 0.6 per tick and attenuates by `1/(1+distance)` at the receiver. No semantic meaning is assigned. | Receiver input and subsequent controller action, positive receptions and production expenditure. Mute removes production, reception and their costs; this alone is not a cost-matched information experiment. |
| Helping | Optional controller action donates at most 12 energy to a reachable neighbour, retaining an actor reserve of 60. Recipient receives floor(80%); the remainder is lost. | Actor expenditure, recipient gain, explicit transfer loss. No fitness bonus. Recipient selection is encounter-order based, not recognition of kin. |
| Mate choice | Inherited displayed trait, preferred display and preference strength. Both parents must accept. Acceptance is `1 − strength × abs(preferred − displayed)`. Display costs ceil(3×display) each tick. | Preference rejections separate from encounter, barrier and compatibility rejection; off removes preferences and display cost. No prescribed sexes. |
| Memory / structure | Recurrent neural controller, 8 inputs, 6 actions, 1–8 hidden nodes. Recombination and point mutation affect weights. Structural mutation adds or removes a node; deletion aligns its output weights. State persists between ticks and in checkpoints. | Node additions/deletions, expressed node count and explicit computation/memory energy cost. Off makes the same architecture reactive and disables structural mutation. No claim of intelligence or unbounded genome growth. |
| Reproductive compatibility | Threshold on mean absolute inherited allelic distance (traits and aligned neural genes), weighted 90%, plus node-count distance weighted 10%. Range is 0–1. Catalogue names never determine compatibility. | Actual successful founding-lineage crosses, cross-lineage offspring and later reproductions involving those offspring. Candidate catalogue partitions are connected components of potential compatibility every 50 ticks, separately from geographic opportunity. |

Point mutation probability is the configured rate multiplied by the parental mean inherited mutability plus 0.5, capped at 1. Structural mutation uses the configured rate. Offspring receive two actual parent IDs and an explicit cross-lineage marker. Founding-lineage attribution is inherited from one randomly chosen parent; the gene-flow matrix is a bounded coarse measure, not complete admixture inference. It does not implement postzygotic hybrid breakdown; measured hybrid fertility means actual later reproduction, not a separate fitted fertility penalty.

Predatory energy transfer is also present as a costly controller action with imperfect transfer and inherited defence. This experimental implementation is not the live predation rule. All transfers, feeding, reproduction, deaths, storage overflow and costs participate in an exact integer energy budget. Controller evaluations use rounded floating-point activations; exact continuation is tested in the deployed JavaScript engine family, not claimed bit-identical across all future JS runtimes.

## Budgets and recovery

Maximum 256 living organisms, 10,000 ticks, 8 controller nodes, 4,096 archived catalogue records, 201 sampled history rows and 16 MiB checkpoint import. Reproduction refused at capacity is counted. Complexity is deliberately bounded; complexity-ceiling sensitivity remains research work. Empty populations stay extinct until the user explicitly starts a new experiment.

All state, including PRNG, controller memory, two-parent IDs, energy ledger and measurements, is saved in a checksum envelope. The validator rejects incompatible protocol IDs, corrupt bytes, invalid dimensions/references and inconsistent demographic or energy accounting. SHA-256 detects corruption; it is not a signature authenticating user-created experiments. The browser stores recovery every 50 ticks and when the population becomes extinct. Storage may be unavailable or evicted: errors pause execution and portable export/import is available. Closing a tab loses at most the work since its last successful save, not the entire Genesis. An invalid recovery file never triggers silent reseeding.

The laboratory has no API access to canonical genomes, R2 or recovery credentials. Downloaded checkpoints contain only the user's synthetic experiment. Aggregate reports omit genomes. No local daemon or Docker service is required.

## Verification and scientific limits

`npm run test:experimental` directly tests movement barriers and contact, resource trade-offs and equal inputs, sensory costs, causal signal reception, conserved helping, preference effects, recurrent state, inherited structural growth/deletion, genotype compatibility, hybrid reproduction, deterministic reruns, checkpoint corruption/recovery and hard limits.

`npm run experimental:verify` runs 27 bounded scenarios: three matched seeds with all capabilities enabled and eight separate ablations, each for 1,000 ticks. It checks exact continuation after restoring at tick 500 and energy conservation. `/research/experimental-validation.json` contains aggregate histories, counters, source hashes, runtime and checkpoint sizes. Extinctions remain in the report. This is an engineering validation batch, not a demonstration that the proposed evolutionary phenomena have emerged.

Still separate research tasks: cost-matched signal interventions, cooperation invasion assays, reciprocal habitat fitness tests, secondary-contact reproductive-isolation studies, ancestral time-shift competitions, held-out memory performance and replicated complexity trajectories. Installing mechanisms is not equivalent to completing those experiments or answering the research programme.


## Extinction diagnostic (observer schema 1)

The laboratory now records energy-exhaustion versus age-limit deaths, final energy debits, food remaining at death, and 50-tick population/energy/mating intervals with an exact final-extinction interval. It retains the latest 100 death records and 201 intervals; cumulative death counts cover the whole observed period. Nothing changes the genome, RNG, movement, energy, mating or death rules.

Organism-turn counters measure low energy (below the 300-unit mating threshold), no local raw food, no assimilable food within sensory range and the barrier, stationary movement and outer-edge occupancy. Food access is measured after movement and before feeding; it describes availability, not a guarantee that the controller could locate and consume it. Mating requests without neighbours, insufficient parental energy, age rejection and other invalid pairings are counted separately. Existing barrier, genetic-compatibility and preference rejection counters remain available.

A final debit is an execution-level observation, not the sole cause of extinction. A zero-energy organism can receive food later in its turn; the earlier debit is cleared when energy is recovered. Only organisms actually removed at the end of a tick generate death records. Death classification prioritises energy exhaustion when both zero energy and the age limit apply. Operating-cost totals include basal, sensing, controller, signal and display expenditure plus helping, predation and reproductive losses; they exclude age-death energy removal and storage overflow. Habitat input is kept separate from energy actually assimilated by organisms.

Old protocol-2 checkpoints are accepted unchanged. When advanced, observation begins at the restored tick and earlier death counts are explicitly marked unobserved. No historical causes are fabricated. The optional observer state has its own version and is validated during recovery. All 27 pre-diagnostic biological state hashes match after instrumentation; recovery tests cover both old checkpoints and the new observer state. The public validation report now includes these diagnostics and a separate biological-state hash.

## Lineage survival comparison (observer schema 1)

The isolated laboratory records a bounded history for each founding tag, including extinct tags. Tags are inherited from one randomly chosen parent and are not monophyletic clades, genetic admixture estimates or species. All tags originate at tick zero with census one. Live-world taxonomy and biology are unchanged.

Windows are the first 2,000 or 5,000 ticks, or the same durations preceding the first observed population peak or onset of sustained decline. Decline requires three successive 50-tick decreases, a loss of at least 20%, and census at least five at onset. These retrospective anchors are distinct from the fixed survival horizon (2,000, 5,000 or 10,000 ticks). A peak can change with longer observation. An analysis window ending after the outcome horizon is not eligible for matching.

Survival is observed presence at the selected horizon; extinction must have been observed by it. Unfinished outcomes are censored; unrecoverable historical outcomes are unknown. Incomplete windows, short-lived tags and absent decline anchors remain visible. Only complete windows with known outcomes and positive exposure enter matched comparisons. Extinct tags' post-extinction zero census is retained through the horizon; their rates use actual organism-turn exposure rather than padding the denominator with empty time. Users can continue observation to the horizon without reseeding.

Matching is exact on lineage age at the window start and starting census. Food, costs, transfers, predation and reproductive participation are recorded directly by tag, with operating balance and successful parent credits normalised by organism-turn exposure. Reproductive energy allocation is shown separately from operating balance. Both parents receive a credit for a successful birth. Within-world median differences are descriptive associations; tags share ancestry, so no confidence interval or independent-replicate claim is made from them. No percentage uplift is invented when net balances are negative or denominators are unsuitable.

Fragility includes juvenile/mature age structure, mean age, energy/age eligibility, availability of compatible local mates across all tags, within-tag genetic compatibility, exact tick exposure below census five and two, and harmonic census while present. These are declared descriptive thresholds, not proven minimum viable populations. Effective breeder participation in each 50-tick interval is squared total parental credits divided by the sum of squared credits per individual. It is not a genetic effective-population-size estimate. Sex ratio is inapplicable. Preference rejection is measured independently of potential mate availability.

Environmental mismatch has an explicit helper definition: absolute deviation from an inherited preference divided by inherited tolerance; missing/non-finite inputs or non-positive tolerances return unavailable. This experimental model has no temperature/moisture preference or tolerance loci, so actual mismatch remains unsupported. No fabricated environmental exposures are supplied.

Recovery accepts earlier checkpoints without lineage observations and begins coverage at resume; earlier pressures are never reconstructed. Each of at most 64 tags retains at most 201 sample rows through the 10,000-tick budget; parental participation counters reset each sample. New observation state is validated on restore. Existing 27 biological hashes remain unchanged. The additional six-world validation runs three paired seeds with barriers present/absent to 5,000 ticks, restores each at tick 2,500, and publishes separate aligned comparisons at `/research/lineage-validation.json`. This is engineering validation and descriptive exploration, not a causal survival study.

### Ranked pressure differences

The lineage report ranks absolute survivor-minus-extinct differences between
per-tag medians, separately for energy per organism-turn, mating-obstacle events
per 1,000 organism-turns, and percentage points of time present below the two
small-population cutoffs. Matching and completeness rules remain unchanged.
The report includes component medians, signed differences, group sizes and ties;
zero separation and missing evidence receive no rank. Exports include these
rankings, computed from existing observation records without changing biology.

These are descriptive differences, not significance, causal importance, or a
cross-unit composite score. More attempts can produce more mating obstacles;
component medians need not sum to median net balance. Early deaths shorten
exposure even within aligned windows. Environmental mismatch remains unsupported;
endpoint demographic zeros are not ranked as explanations for extinction.

### Graphical lineage comparisons

Paired median charts share a zero-based scale within each pressure group.
Expanding a pressure shows one selectable point per eligible tag on a separately
labelled scale that includes every individual value. Selection is linked to the
population timeline and tabular detail. Population lines connect recorded 50-tick
samples; shaded windows follow the selected tag and the dashed line marks the
chosen survival horizon. Colours describe outcome at that horizon, not necessarily
current status. Exact values remain available in expandable tables and JSON.

### Browser recovery storage

Complete checkpoints now commit atomically to IndexedDB instead of localStorage.
On first load without an IndexedDB record, the legacy checkpoint is read and
validated, then saved to the new store; the legacy copy is retained. The new
record takes precedence on subsequent loads. Corrupt records do not silently
fall back to an older world or start a new genesis. Writes serialize hashing and
commit to prevent older saves overwriting newer ones. Failed transactions retain
the last committed checkpoint and expose a retry action. Imports are usable in
memory even if saving fails. Paused states are saved as well as 50-tick boundaries.
Private browser storage remains session-scoped; portable export is still needed
before closing the private session. No experimental checkpoints leave the device.
