M11.5d (ADR-0125): wildlife_intents gives each unowned cell a bud intent when it can fund one (at most once a second), else steers it to the nearest perceived food patch and feeds, else wanders. The cellular server puts these intentions into each tick's baseline, so replay and publication treat them like player input. fund_bud refuses a reserve short of the bare investment before scanning growth levels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
5.7 KiB
Markdown
80 lines
5.7 KiB
Markdown
# M11.5: Reproduce funded autonomous descendants
|
|
|
|
M11.5 lets a player cell bud: it pays an explicit investment and leaves an
|
|
unowned wildlife descendant with an exact copy of its genome. The game rules are
|
|
ADR-0098 decisions 1 and 3; the engineering contract is
|
|
[ADR-0125](../adr/0125-cellular-budding-and-wildlife-descendants.md). The client
|
|
bud control and descendant presentation are the maintainer's (client UI is
|
|
deferred); this plan covers biology, owner, protocol, persistence and server.
|
|
|
|
## Boundaries
|
|
|
|
Read ADR-0028, ADR-0032, ADR-0098, ADR-0100, ADR-0122, ADR-0124 and ADR-0125
|
|
before changing the owner. The biology library stays free of transport, database
|
|
and Kubernetes dependencies. Every bud is part of exactly one tick's replayed
|
|
checkpoint: its funding, placement, identity, archive birth and the parent's
|
|
debit recover together. No free or reduced offspring, no player ownership of a
|
|
descendant, and no special wildlife biology.
|
|
|
|
## Segments
|
|
|
|
| Segment | Affected modules | Acceptance evidence |
|
|
|---|---|---|
|
|
| 11.5a: funded bud proposal | Biology reproduction API; tests | Investment from the parent's reserve on every channel; largest fitting birth growth; remainder matter to the bud's reserve; construction energy to heat; 30 s provision; refusal for any short channel, missing capability, partial growth or damage, with nothing spent; exact conservation |
|
|
| 11.5b: owner budding and wildlife | Cellular lives owner, region step, snapshot codec (format 5, rules 4) | Kind 3 intention; placement ring and refusal; namespaced identity and sequence; archive birth; parent life on life and corpse; wildlife (zero account) has no offers; descendants survive parent death; restore and replay byte-identical |
|
|
| 11.5c: action, trace and publication | Session protocol and client sender, canonical action input, trace intent, version bundle v5, schema v36, provisioner `cellular-v3` | Kind 3 only on v10, exclusive with intake/engulf; SQL admits kind 3 and the v5 bundle; allocator bound; PostgreSQL publication and recovery of a bud |
|
|
| 11.5d: wildlife controller and DEV | Server wildlife controller, scheduler, DEV region | Pure deterministic bounded controller; wildlife intents recorded in the trace; a bud from a live session publishes and its descendant feeds and moves; rules-4 DEV region |
|
|
|
|
## Required checks
|
|
|
|
- Insufficient resources on each channel, a duplicate bud action and its ACK
|
|
loss, a bud refused for placement, parent death in the same tick, a bud engulfed
|
|
on a later tick, and a restart between bud and next tick.
|
|
- Controller determinism and bounds: same state and tick give the same
|
|
intentions; no intention is ever unfunded by construction (the owner still
|
|
validates).
|
|
- Genetic vulnerability comparison: a parent and its bud share one genome, and
|
|
the archive reports two living carriers until one dies.
|
|
- Linux CI PostgreSQL publication and recovery before claiming a live path.
|
|
|
|
## Progress
|
|
|
|
- 2026-10-13: ADR-0125 and this plan written. 11.5a is next.
|
|
- 11.5a: `fund_bud` (biology/budding) proposes a bud from a fully realized,
|
|
undamaged parent with the reproduction capability: the ADR-0032 investment and
|
|
a 30 s provision paid from the parent's reserve, the bud at the largest growth
|
|
its investment matter builds, leftover matter in the bud's reserve and the
|
|
construction energy to heat. `budding-contracts` checks conservation, the
|
|
largest-fit growth, the provision, determinism, a refusal for every short
|
|
channel (abundant energy never pays for matter), partial growth, damage and a
|
|
genome without the capability.
|
|
- 11.5b: owner format 5 / rules 4 (`CellularLivesProfile::budding`). A
|
|
`CellularStepIntent::bud` (ignored below rules 4, exclusive with feeding and
|
|
engulfing) funds a bud after the tick's mutations through `fund_bud`, places
|
|
it touching the parent (eight fixed directions), gives it the next
|
|
region-namespace identity and the parent's current genome, and records its
|
|
archive birth and parent life. Results are reported per parent
|
|
(`CellularBudExecution`, tick feedback). Wildlife (zero account) never earns
|
|
offers. Validation and restore enforce the identity namespace and sequence;
|
|
`cellular-lives-owner` buds a fed founder, checks the refusals spend nothing,
|
|
conservation, the shared genome's two carriers, wildlife feeding without
|
|
offers, exact restore and a rewound sequence; rules 3 ignores a bud intent.
|
|
- 11.5c: v10 cellular actions and the canonical input carry target kind 3
|
|
(bud, zero coordinates, exclusive with intake and engulfment); the trace keeps
|
|
it as an intention byte and the action matcher compares it. Below rules 4 the
|
|
owner ignores it. The v5 version bundle (`{4,5,1,1,1,2,1,2,1}`, revision
|
|
history) is admitted in C++ and by schema v36, which also admits kind 3 in SQL
|
|
action inputs and the v5 bundle for format-3 birth traces. The provisioner
|
|
offers `cellular-v3` (rules 4). A rules-4 owner refuses founder identities at
|
|
or above 2^63; the allocator keeps its full range. PostgreSQL tests publish a
|
|
real bud from a fed founder, restart the host and recover the wildlife cell.
|
|
- 11.5d (code): `wildlife_intents` (server/lifecycle/wildlife_controller) is the
|
|
pure controller: per unowned life, a bud intent at most once a second when
|
|
`fund_bud` would succeed; else steer to the nearest perceived patch holding
|
|
energy and feed from it (no movement once touching it); else wander, changing
|
|
direction every two seconds from the life id and tick. `serve_cellular` puts its
|
|
intentions into each tick's baseline, so they ride the trace like a player's.
|
|
`fund_bud` now refuses a reserve short of the bare investment before its growth
|
|
scan (same answer, bounded cost per wildlife tick). The rules-4 DEV region
|
|
(`cellular-v3`) follows once CI publishes images with schema v36.
|