feat(cellular): rules 13 feeding, matter as energy, spent pool and predation
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 31s
Foundation / server-image (push) Successful in 4m24s
Foundation / image (push) Successful in 5m3s

Phase 2 of the cellular revamp build plan (ADR-0179), server half.

- Matter as energy: when an energy cost exceeds the reserve's energy, reserve
  matter stands in for the rest at each channel's burn rate (pJ per 1,000 fg,
  scaled by the genome's burn efficiency), largest channel first. Upkeep may
  burn any channel; thrust only channels the player has not excluded. Burned
  matter adds no heat; it goes to the region's spent pool. A cell dies only when
  nothing can pay its upkeep.
- Collection: per-channel limits scaled by the genome's collection indices, a
  shared limit on all matter, a tunable cost per membrane point, and only the
  genome's kept share (energy conversion) of bubble energy reaching the reserve.
- Predation: engulf mass carries a tunable share of reserve matter, the
  predator's engulf capacity scales its side and the prey's membrane (now in
  nanometres) its own; kill absorption scales the predator's intake; the kill's
  remainder is split between bubbles at the prey and the spent pool, and a full
  habitat sends overflow to the pool.
- The spent pool is owner format 11 state, counted in conservation, and drips
  back as seeded random bubbles every interval tick.
- Reserve matter is carried as load: slower thrust and turning, costlier thrust.
- Channel exclusions are a 4-bit step intent field, trace byte 14; only owned
  lives under rules 13 may send them.

All values come from the revamp tuning file. Rules up to 12 are unchanged. Tests
cover payments and their conservation over 400 seeds, the rules-13 region step
(collection, membrane, kept energy, burning, engulfment and kill splits with
closure), the drip, load, exclusions, a 700-tick run with closure and exact
restore, and trace replay with exclusions. Session v14 and the client follow
the server phases (build plan). Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-22 18:35:31 -04:00
co-authored by Claude Opus 5.5
parent c7b4846901
commit 76d21b4815
21 changed files with 1307 additions and 72 deletions
+19 -8
View File
@@ -21,13 +21,17 @@ rules 12.
- **One revamp tuning file.** Every new tunable goes in
`deploy/kubernetes/region/dev/tuning/cellular-revamp.tuning`, beside the rules-12
`cellular.tuning`, with the same format and validation.
- **Client and server together** in every phase.
- **Server phases first, then one session version.** Phases 1-5 build and test the
server halves. The wire changes in every one of them (body values, offers, bud
choices, organisms), so session v14 and the client screens for all of them are one
step after phase 5, rather than a protocol revision per phase. Nothing deploys before
that step anyway.
- **Shared biology.** Derivations stay in the headless library, so the client
predictor and the server agree.
## Phases
### Phase 1: genome and body (rules 13 foundation)
### Phase 1: genome and body (rules 13 foundation) - done
Server:
- Genome schema 7: every heritable value the plans name, in points (founder 100)
@@ -44,13 +48,12 @@ Server:
from points; no legacy photosynthesis speed penalty.
- Rules 13 owner skeleton (new owner format) and tuning keys for every body value.
Client: none in this phase. Showing the new body values needs them on the wire, which
session v14 adds in phase 2.
Client: in the session v14 step.
Verify: founder 6 derives the same body as founder 5 where the plans say "today's
value"; the essential floor holds; encode/decode and bound checks for schema 7.
### Phase 2: feeding, energy and predation
### Phase 2: feeding, energy and predation - server done
Server:
- Collection per channel with the shared intake limit; the membrane collection penalty.
@@ -61,10 +64,11 @@ Server:
- Reserve matter in mass for handling and movement energy, not upkeep.
- Engulf check with engulf capacity and `engulf_reserve_mass_percent`; kill
absorption; the kill remainder split between bubbles and the spent pool.
- Session v14 for the new perception fields and the exclusion control.
- Channel exclusions are a 4-bit step intent field, carried in the trace's byte 14.
Client: energy display including what matter can stand in for; channel exclusion
toggles; spent-pool drips drawn like infall; hover and HUD show the phase 1 body values.
Client (session v14 step): energy display including what matter can stand in for;
channel exclusion toggles; spent-pool drips drawn like infall; hover and HUD show the
phase 1 body values.
Verify: conservation per channel and energy across burning, the pool, kills and
drips; no burn of excluded matter except for upkeep; replay determinism.
@@ -124,6 +128,13 @@ Client: organism drawn as its member cells; Emerge button at the threshold.
Verify: one reserve and one genome across members; whole engulfment conserves; the
Emerge action only at the threshold.
### Session v14 and the client
- Session v14: the phase 1 body values in perception; payable energy; the exclusion
control; named offers with pro, con, chance, cost and Stay / Become; the bud choice;
organisms and the Emerge action.
- Client screens for all of the above.
### Phase 6: wildlife, instrumentation and the playtest
- Wildlife controller: matter-as-energy aware, budding with litter, engulfing with the