EvoLab · World & Environment · v0.9

Light up top, dark below.the stage every rule plays out on.

§2 defines the world the §1 currencies move through — its shape, its light, how nutrients spread, and how time advances. It builds on the locked currency layer and inherits two hard constraints from the §1 pressure-test.

2.1–2.5 — LOCKED §2 — complete · reviewed ✓ builds on §1 — locked

Carried in from §1

Two things the pressure-test already pinned for the world to honour.

O3 · LIGHT COMPETITION ✓
The asymmetry — autotrophs competing for nitrogen but getting light free — is resolved in §2.3 below: light self-shades, so it's a competed, depletable resource like the nutrients.
CONSERVATION · BOUNDARIES ✓
Total C and N must stay flat — which forces closed (no-flux) or periodic boundaries and a conservative diffusion stencil. Resolved in §2.2 below.
2.1

World substrate

● LOCKED

What space is, and how cells sit in it. Everything in §2.2–2.5 is built on this.

Space is a graph — realised as a lattice

Cells float over it — two networks, one space

one X / Y space space-graph · fixed parcels · water (uniform) spring bond (§1) cells · float freely · own size · sample nearby parcels
A static water-scaffold underneath; mobile cells with their own bonds drifting over it.

Uniform now, structured later — same model

uniform = water (a grid) solid later: vary conductance / medium → structure
Same graph, just edited — a uniform field becomes a world with solids and a sediment floor, no rewrite.

Resolution is precision, not structure

Node density (the grid spacing) sets a length scale and some directional artifacts — a real physical parameter, not a neutral display choice. But it's precision, not ecological structure: a million identical water parcels is just precise emptiness, not a structured world. Every discretisation (graph or grid) has this; the only thing without a length scale is a pure formula, which can't remember edits. So resolution is a tuned constant (§6): set fine enough to sit below biological scales, use an isotropic diffusion stencil, and convergence-test (halve the spacing — if behaviour shifts, it was too coarse).

Implementation note (→§4): the lattice is stored grid-fast throughout — structure lives in per-edge conductances and per-node medium, not in the data layout — which is exactly what lets the implicit diffusion solver (§2.4) run.

2.2

Topology & boundaries

● LOCKED

The world's shape and how its edges behave — pinned as invariants so no implementation improvises.

A cylinder — wrap sideways, walls top & bottom

surface · light enters · no-flux wall floor · no-flux wall (→ sediment later) wraps — same place iso-light across width · gradient down depth
Two real boundaries kept (surface, floor); the two fake ones (sides) deleted by wrapping.

Boundary invariants — pinned

Past builds saw edges behave differently every time — the signature of edges hand-coded ad hoc. So the rules are fixed here as invariants, derived from one principle (nothing crosses; wrap = same place), not improvised per build:

The world's width and height (and so how much depth the photic gradient spans) are constants → §6; qualitatively, tall enough that light runs from saturating at the surface to darkness at the floor.

2.3

Photic gradient & light

● LOCKED

Light enters at the surface and descends the space graph, dimming as it goes. This resolves O3 — light becomes a competed, depletable resource.

Three things dim the light

As light descends from the surface, attenuation accumulates from three sources (Beer–Lambert — exponential, the physical law; linear would be unphysical):

Light descends the space graph from the surface, accumulating all three per node. Uniform start → a simple top-down sweep per column. Once structure exists, light follows the graph and respects opaque nodes — so a region tucked under a solid, or with no open path up, goes dark on its own: emergent shadow pockets / refugia, no special-casing.

surface · light enters water · baseline decay biomass · casts shade solid dark pocket
Water dims it, cells shade beneath them, solids cast dark pockets — all from one top-down pass.

Day & night

Surface intensity is a periodic function of the tick clock — bright by day, ~dark at night. Nothing downstream changes: only the value at the top of the column rises and falls, then the same descend-the-graph attenuation runs.

surface light time / ticks → day day night night
The surface brightens and darkens on a daily cycle; depth, biomass and medium still set what reaches each point.

Direction stays vertical. Underwater, almost all light is downwelling regardless of the sun's angle (refraction funnels it toward vertical), so straight-down light is the faithful choice. A moving / angled sun (sweeping shadows) is logged as an optional embellishment for when solid structure exists — not built now.

Light has no memory

Light stays a per-tick derived field: recomputed every tick from the current biomass and the (mostly static) medium — never stored across ticks. So self-shading adds no persistent state; it just lets the recompute read the current biomass. (This is the "computed, not remembered" field from the §2.1 discussion — unlike the nutrient ledger, which persists.)

Constants → §6: surface intensity, water attenuation, biomass attenuation, per-medium opacity.

2.4

Diffusion

● LOCKED

The store was settled in §2.1 (the graph); this fixes how nutrients spread across it, and hands the numbers to §6.

isotropic → round (4-neighbour → diamond, rejected) solid solids block — matter goes around (just like light)
Round plumes, not diamonds; and matter diffuses around solids rather than through them.

Handed to §6: per-element diffusion rates, per-medium conductance, and the initial inventory (total C & N and how they're distributed at the start). The implicit solver removes the old sub-stepping/stability worry.

Extended by §3: the diffusing set grows to four matter species — inorganic C/N and dissolved-organic C/N (DOM) — all conservation-checked together, plus three massless signal channels (markers) that diffuse and decay but sit outside the matter canary. Same solver, more fields (a performance note for §4).

2.5

Time & ticks

● LOCKED

How time advances, and in what order things happen inside one step.

The tick

Asynchronous, reshuffled, seeded

The trade we accepted: update order is an extra (seeded) source of noise. We chose it over synchronous-with-arbitration because it's simpler, conserves for free, and stays fully reproducible — the arbitration logic sync needs wasn't worth its cost here.

Order within a tick

The types of process run in a fixed, conservation-safe sequence, identical every tick — only the per-cell order inside the "act" stage is shuffled. The exact loop is §4's job; 2.5 pins that it's fixed and ends on the canary.

one tick — day = N ticks recomputelight cells actshuffled · live diffuseimplicit births /deaths canaryC/N flat? next tick only this stage is shuffled (seeded, separate stream)
A fixed per-tick sequence ending on the canary; only the order cells act in is shuffled.

Edge cases pinned

§2

Pressure-test & external review

● reviewed

Checked against the established coupled agent–field models, then the seams hardened.

Checked against real models

Fixes folded in

Logged & caveats

G6 · light on an irregular graph
"Descends the graph" is unambiguous on the uniform lattice (top-down per column) but under-defined once structure makes propagation irregular. Fine now; needs a defined downward-propagation rule when structure arrives.

Calibration couplings (→§6): day-length vs reserve capacity vs maintenance must balance so autotrophs survive the night (the intended pressure, but miscalibration = nightly die-off); node spacing must sit below biological scales (convergence-test).

Reproducibility scope: "bit-for-bit" holds within a build / device; across platforms, floating-point and Math differences can diverge.

§2

All locked

2.1World substrategraph space + floating cells — settled aboveLOCKED
2.2Topology & boundariescylinder — wrap sideways, no-flux walls top/bottom; invariants pinnedLOCKED
2.3Photic gradient & lightself-shading: water + biomass + medium; descends the graph; dark pockets emergeLOCKED
2.4Diffusionconservative graph diffusion, isotropic stencil, solids block matter; per-element ratesLOCKED
2.5Time & ticksdiscrete ticks (day = N ticks); async reshuffled+seeded updates; fixed order, ends on canaryLOCKED
Decision log
Space = a lattice with conductances (the "graph", realised)
nodes are parcels at real (x,y) holding nutrients, light and a medium-type; edges carry conductance. Uniform = a grid. Structure (channels, solids, sediment) enters by varying per-edge conductance and per-node medium on the fixed lattice — the finite-volume standard — never as a rewarded niche. Arbitrary irregular topology is held in reserve (unneeded so far, and it would forfeit the fast solver).
Cells are off-lattice; two networks, one space
cells float in continuous 2D with their own size (needed for §1 size + colony morphology); the space-graph is a static scaffold whose values change, while cells + spring-bonds form a separate mobile network. Cells are not nodes.
Resolution = precision, a tuned constant
node density sets a length scale and artifacts but isn't ecological structure; handled by an isotropic stencil + convergence testing (§6), not by changing representation.
Cylinder topology, edge invariants pinned
finite world; vertical no-flux walls (surface/floor — the photic axis, can't wrap); horizontal periodic (deletes the side edges). Edge behaviour is fixed as invariants — wrap applied everywhere, nothing crosses walls, flat-total canary — to end the "edges drift differently every build" problem.
Light self-shades (resolves O3)
light descends the space graph from the surface, dimmed by water + biomass + medium-type; recomputed each tick (no memory). Makes light a competed resource like nutrients, switches on vertical ecology, and yields emergent dark pockets behind structure for free.
Day/night cycle; light stays vertical
surface intensity is periodic over the tick clock (bright day, dark night) — activates the §1 reserve daily (store by day, burn by night), drives diel vertical migration, and pins day-length as a §2.5/§6 constant. Light stays straight-down (downwelling is faithful underwater); a moving/angled sun is logged for later, with structure.
Conservative graph diffusion, isotropic, medium-aware
inorganic C and N spread by edge-flux (conductance × difference) that conserves totals by construction; an isotropic stencil avoids diamond artifacts; per-edge conductance makes solids block matter (like light) and sediment slow it. Per-element rates; rates/conductance/initial inventory → §6.
Async, reshuffled, seeded updates
discrete ticks (day = N ticks); cells act one at a time on live state in a per-tick reshuffled order — conserves naturally, fair on average, fully reproducible under a seeded RNG, with a separate shuffle stream so logic changes stay diagnosable. Fixed per-tick process order ending on the conservation canary; exact loop → §4.
Pressure-tested & reviewed against real models
matches the PhysiCell + BioFVM architecture (off-lattice agents over a finite-volume field; conservative agent↔field exchange); self-shading matches ocean/PBR practice. Folded in five seam fixes (G1 conservative coupling, G2 footprint, G3 implicit operator-split solver, G4 newborn/death ordering, G5 canary tolerance + no-negative + monitor). Logged G6 (light on irregular graphs, with structure) and the cross-platform reproducibility caveat.