Propose open energy, scattered nutrients and photosynthesis (ADR-0136)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m54s
Foundation / server-image (push) Successful in 6s
Foundation / postgres-tools (push) Successful in 6s
Foundation / image (push) Successful in 5s

The maintainer's design after the region 6 playtest: square patches invite camping and
leave dead space, and a closed energy budget fits no planet. Proposed: an audited
region boundary credits captured sunlight and rare infall (totals = opening + inflow);
scattered single-nutrient bubbles and a few puddle pools are fed by contact over a few
ticks, with detritus breaking into bubbles; photosynthesis is a mutation path (genome
schema 4) favoured by stillness; session v11 carries bubbles and pools. Delivery in
three steps: bubbles and contact feeding, infall, photosynthesis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-16 21:53:47 -04:00
co-authored by Claude Opus 5.5
parent a3af969424
commit 7c1c3170ae
3 changed files with 173 additions and 1 deletions
@@ -0,0 +1,171 @@
# ADR-0136: Open energy, scattered nutrients and photosynthesis
## Status
Proposed (2026-10-16) by the maintainer after the region 6 playtest. Design for a new
cellular rules version, delivered in three steps (below), each built and playtested on
its own. It is independent of ADR-0135's rules 7–9; rules numbers are assigned when
each step is built. Every number marked **tunable** is a trial value. Nothing here is
implemented yet.
## Context
Food is a handful of 1 mm square patches (ADR-0120 habitat). Playtests show the loop
this creates: swim to the nearest square, sit on it until it is empty, repeat (M11.9
feedback, question 7). The space between patches holds nothing, so moving is only
travel, never foraging.
The world is also closed: every picojoule and femtogram comes from the opening stock,
and ADR-0024 rules out "a mint/burn API or perpetual light fixture". ADR-0025 already
noted that a finite source "models a prepaid budget, not a star". No planet works that
way. Sunlight arrives continuously, and impacts deliver fresh matter. A closed budget
also leaves no room for a cell that stays still and makes its own energy.
The maintainer's decisions:
- **Inflow:** sunlight every tick, plus rare infall events that deliver nutrients.
Matter otherwise recycles through death.
- **Eating:** by contact. A touched bubble drains over a few ticks while it pulses,
then vanishes.
- **Photosynthesis:** a mutation path, made likelier by staying still (ADR-0135).
- **Patches:** become a few rich pools, drawn as puddles, with bubbles everywhere in
between.
## Decision
### 1. An open region with an audited boundary
A cellular region gains a **boundary account**: cumulative counters of everything that
entered from outside, per channel (energy, C, N, P, other). They live in the owner state,
the checkpoint and the trace, like every other balance. Inflow is never minted silently.
It is credited from the boundary, and the conservation check becomes, per channel:
current total (lives + corpses + motes + pools + nursery + heat)
== opening total + boundary inflow
ADR-0024's ledger is unchanged: the boundary is one more reservoir with an unbounded
(u64-saturating, refused before overflow) opening. Its credits are deterministic
functions of the region configuration, the tick and the region seed, so replay and
recovery reproduce them without storing extra data. An inflow that would overflow a
u64 total is refused and recorded as skipped, never wrapped.
There are exactly two inflows:
- **Sunlight:** energy only, and only as much as photosynthetic cells capture in a
tick. Light that nobody captures is not modelled and never enters the books.
- **Infall:** an event that drops a clump of nutrient bubbles (section 3).
### 2. Pools and bubbles replace square patches
**Pools.** A few large, rich stocks at arbitrary µm positions, each with a radius.
Contact means a cell's footprint overlaps the pool's disc. A pool yields at most
**a quarter** (tunable) of a cell's intake rate per tick. Pools are still worth
finding, but sitting on one is slower than foraging. The client draws a pool as a
puddle: a noise-perturbed outline, seeded by the pool's position, with granules
coloured by remaining nutrient.
**Bubbles (motes).** Small, single-channel nutrient stocks scattered over the whole
region: energy, carbon, nitrogen, phosphorus or other. Each has an id, a µm position,
a channel and an amount. Its radius on screen grows with its amount. A seeded opening
generator spreads them with loose clumps, so no part of the region is empty.
**Opening density:** about one bubble per 0.25 mm² (tunable). A bubble holds about
**4 ticks** (tunable) of a founder's intake on its channel.
**Contact feeding.** Every committed tick, each living cell drains the bubbles and
pools its footprint overlaps, at up to its intake rate per channel. No action or
target is needed. Contention is resolved in a fixed order (cell id, then bubble id),
so the result is deterministic. A bubble being drained pulses; at zero it is removed.
The ADR-0120 intake target becomes unnecessary and is retired in this rules version.
Corpses no longer feed a patch: a corpse's detritus (ADR-0124) **breaks into bubbles**
at its position, one per non-zero channel, which closes the matter cycle.
**Limits:** at most 4,096 bubbles and 32 pools per region (tunable). A credit that
would exceed the bubble limit stays in the boundary and is recorded as skipped.
### 3. Infall
On a seeded schedule, averaging one event every **2 minutes** of simulated time
(tunable), an infall drops a clump of **12–24 bubbles** (tunable) with mixed channels
within a 1 mm disc at a seeded point. Its matter and energy are credited from the
boundary. Infall happens only while the region ticks, so an empty region accumulates
nothing (ADR-0128 offline rule).
### 4. Photosynthesis
A new genome capability, **photosynthesis** (genome schema 4), in a new **producer**
trait family related to stillness and growth (ADR-0135 families). Founders start at
zero. Mutation offers can raise it, and under ADR-0135 still ticks raise its odds.
- **Capture per tick:** irradiance × the cell's cross-section × photosynthesis
efficiency. Irradiance is a region setting, **0.5 pJ per µm² per tick** (tunable).
Capture is full on a tick with no movement and **a quarter** (tunable) while moving.
- **Cost:** photosynthetic organelles add body matter (paid like any mutation,
ADR-0118), raise maintenance and slow movement. A producer cell is a slow cell.
- **Matter is still needed:** light gives energy, never matter. A producer still
collects carbon, nitrogen and phosphorus by contact to grow and bud.
- **Wildlife:** a photosynthetic wildlife cell stays still while its reserve can pay
maintenance from light, and forages otherwise.
### 5. Perception and wire (session v11)
The owner's perception lists the pools and bubbles within the perception radius,
nearest first: up to 32 pools and 512 bubbles (tunable). A bubble entry is 12 bytes:
id (u32), x and y relative to the cell (i16 each, in 2 µm units), channel (u8),
amount (u8, log-scaled, enough to size and fade it) and a "being drained" flag. The
exact amounts the HUD needs (the cell's own reserve and bud cost) keep their v10
fields. v10 clients stay on regions of older rules versions.
### 6. Client
- **Bubbles:** circles coloured by channel (energy gold, carbon umber, nitrogen blue,
phosphorus rose, other grey), sized by amount. They pulse while drained and pop when
gone.
- **Pools:** puddles with granules that fade by channel as they drain.
- **Feed target:** the feed-target UI and its key go. Steering assistance (ADR-0129)
points toward the densest nearby bubbles.
- **Producer cells:** draw green organelles in proportion to their photosynthesis.
## Delivery
1. **Step A — bubbles, pools, contact feeding.** The boundary account (its inflow is
still zero), the motes and pools habitat, contact feeding, detritus to bubbles,
v11 perception, client rendering and the wildlife controller. A new opening profile
is provisioned as a new DEV region.
2. **Step B — infall.** Seeded infall events credited from the boundary.
3. **Step C — photosynthesis.** Genome schema 4, the producer family, sunlight
capture, producer wildlife behaviour and the client's producer look.
Existing regions keep their rules versions and are never migrated in place
(ADR-0119).
## Consequences
- Foraging becomes active: the best food is collected on the move. Pools reward
finding them, not camping on them.
- Energy is no longer a hard cap on a region's life. Matter still is, apart from
infall, so predation, scavenging and recycling stay central.
- Conservation stays exact and auditable: totals equal the opening plus recorded
inflow, and every replay re-derives the same inflow.
- The wire grows (up to about 6 KB per perception at 512 bubbles). That is acceptable
for DEV. Delta encoding is a later optimization.
- A stationary producer lineage becomes possible, which is the plant-like branch
ADR-0135's colonies and coalescence can build on.
## Alternatives considered
- **Keep a closed world and add more patches.** Rejected by the maintainer. It keeps
the camping loop and gives no basis for photosynthesis.
- **Steady nutrient rain.** Rejected in favour of rare infall, so matter stays scarce.
- **Every cell photosynthesizes a little.** Rejected. It removes the cost of idling and
the plant/animal split.
- **Instant absorption on contact.** Rejected in favour of a few-tick drain, so that
contact is visible (pulsing) and passing cells share food.
## Amends
- **ADR-0024:** a cellular region's boundary is an audited inflow reservoir. It is
not a mint and not a perpetual light fixture: sunlight credits only captured energy.
- **ADR-0025:** a region's energy source is no longer only a prepaid budget.
- **ADR-0120:** in the new rules version, square patches and the intake target become
pools, bubbles and contact feeding.
- **ADR-0124:** detritus becomes bubbles.
+1
View File
@@ -38,6 +38,7 @@
- [ADR-0131: Keycloak login and the grant broker](0131-keycloak-login-and-grant-broker.md) - players sign in to Keycloak realm `aeternalis` (PKCE, public client `aevolution-game`); `evo-grant-broker` verifies the RS256 access token, maps it to a game account (schema v39), issues 10-minute grants with increasing serials, and revokes on logout by raising the accepted serial and expiring control.
- [ADR-0132: Cellular balance, rules 6](0132-cellular-balance-rules-6.md) - genome schema 3 (a third of the mutation step) and development version 3 (a third of the construction energy) for founders of rules-6 regions; opening `cellular-v5`, bundle v7, schema v41; existing lineages and history unchanged.
- [ADR-0135: Behaviour-driven evolution and budding colonies](0135-behaviour-driven-evolution-and-colonies.md) - proposed: offers weighted by each life's behaviour and by accept/decline history (never ruled out), per-candidate decline (rules 7); buds that attach to a steered colony or detach as anchored wildlife (rules 8); colony motion and a funded Coalesce transition into M14 multicellularity (rules 9).
- [ADR-0136: Open energy, scattered nutrients and photosynthesis](0136-open-energy-and-scattered-nutrients.md) - proposed: an audited region boundary for sunlight and rare infall; scattered single-nutrient bubbles and puddle pools fed by contact instead of square patches; detritus to bubbles; a photosynthesis trait (genome schema 4); session v11 perception.
- [ADR-0058: Region durability contract](0058-region-durability-contract.md) - accepted M7.1 full checkpoint batches and explicit state closure; storage implementation follows.