Files
aevolution/docs/adr/0135-behaviour-driven-evolution-and-colonies.md
T
dingo 936ce36b3f
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m44s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
docs(gameplay): ratify structural inheritance and one-way succession
2026-10-19 12:59:38 -04:00

10 KiB
Raw Blame History

ADR-0135: Behaviour-driven evolution and budding colonies

Status

2026-10-19: ADR-0163 separately accepts structural offspring expression, one-way birth succession and NPC-parent continuity. Colony geometry/coalescence and the other proposals below remain unimplemented. This draft's rules/schema numbers are provisional: actual rules 7–9 now identify other accepted changes and must not be reused for this draft.

Proposed (2026-10-16) by the maintainer after the first sign-in playtests. Design for three rules versions, each to be built and playtested on its own: rules 7 (weighted offers), rules 8 (colonizing buds) and rules 9 (steered colonies and coalescence). Every number marked tunable is a trial value. Nothing here is implemented yet.

Context

Mutation offers are seeded, uniform draws from the 28-operator catalog (ADR-0120): what a cell does has no effect on what it is offered. A decline consumes the whole offer (ADR-0120 amendment). Every bud becomes independent wildlife (ADR-0125). The roadmap's multicellular transition (M14.2, "funded multicellular development") has no earned path into it.

The maintainer's intent: a cell's behaviour decides how it evolves, and therefore what kind of multicellular organism it can become. Budding is the bridge. A bud may stay attached to its parent and grow a colony that the player steers. Given time, a colony may coalesce into a multicellular organism.

Decision

Rules 7: behaviour-weighted offers

Behaviour record. Each owned life keeps cumulative counters, updated once per committed tick by the authoritative owner and stored in its state, so replay and recovery reproduce them exactly:

  • distance moved (µm) and ticks spent moving;
  • ticks spent still (no movement requested);
  • energy acquired from food (the credit ADR-0120 already counts);
  • buds attempted and produced;
  • engulfs attempted and succeeded.

Offline (frozen) ticks add nothing (ADR-0128). Wildlife keeps no record.

Trait families. Every catalog operator belongs to one family; families have related families:

Family Operators (capability, effect) Fed by Related
Locomotion movement up/down/acquire/shed moving Feeding
Feeding ingestion, energy conversion eating Locomotion, Growth
Growth target size eating, budding Feeding, Reproduction
Defense membrane being engulfed, staying still Growth
Reproduction reproduction budding Growth
Environment thermal tolerance (none yet) (none)

Weights. When an offer is drawn, each eligible operator gets an integer weight in per-mille:

  • Base: 1000.
  • Behaviour: × (1000 + 2000 × the share of this life's activity that feeds the family) / 1000 (tunable). A cell that only moves draws locomotion three times as often as an unrelated family.
  • History: × the operator's bias, starting at 1000.
    • An accepted mutation multiplies its own operator's bias by 1.25 and its family's other operators' by 1.10.
    • A declined candidate multiplies its own bias by 0.80, its family's other operators' by 0.92, and related families' operators' by 0.97 (all tunable). Declining cold tolerance therefore makes every temperature trait rarer, and feeding traits slightly rarer if it were a feeding trait.
  • Floor and cap: each final weight is clamped to 100–4000 per-mille. Nothing is ever ruled out: the floor keeps every strategy reachable, as the locked "no linear mutation tree" requirement demands.

The draw is weighted sampling without replacement from the existing seeded stream (seed, stream, event index: ADR-0120), in checked integer arithmetic, so it is exact and replayable. Biases are life state. Candidates are still shown in operator order, unranked; only their chance of appearing changes.

Per-candidate decline. A v10 mutation choice may decline one candidate of the exact outstanding offer. The candidate leaves the offer and is not replaced, and its decline bias applies. The offer stays open with the rest. Declining the last candidate consumes the offer. "Decline all" (operator 0, schema v40) applies the decline bias to every candidate shown. A decline never earns a replacement: the next offer still needs feeding credit (ADR-0120). The wire form is a new choice kind; the details belong to the implementation ADR amendment.

Rules 8: colonizing buds

New capabilities (genome schema 4, development version 4):

  • Colonization, per-mille: the chance a bud stays attached. Founders start at 0, so rules-8 founders bud like today until they evolve it.
  • Budding efficiency, per-mille: lowers the construction energy and the bud's provision. Matter is never discounted (ADR-0118): a cheaper bud is a smaller or thriftier one.
  • Budding rate: the minimum interval between buds.
  • Movement efficiency: cheaper movement per µm. Fed by moving.
  • Mutation rate: less feeding credit per offer. Fed by eating.

These join the families above, and reproduction-family operators are the ones budding behaviour pulls toward.

The bud roll. A funded bud draws, from the seeded stream keyed by (region, parent life, bud sequence), whether it is attached (draw below colonization) or detached. The result is recorded in the trace like any outcome, so replay does not redraw it.

  • Attached: the bud joins its parent's colony. It belongs to the parent's account, has its own body and reserve, and stays in contact with a member of the colony. The colony has a bounded size (16 members, tunable); a bud that would exceed it is detached instead.
  • Detached: unowned wildlife, as today, with a home anchor at its birth position. The wildlife controller keeps it within 2 mm of its anchor (tunable). When its parent's account logs out, every detached bud of that parent re-anchors at the parent's last position, so a player's detached colony stays where they left it.

Logout. Attached members are the player's organism. They freeze, linger and suspend with the parent, exactly as the parent does (ADR-0128), and resume with it. Detached buds are wildlife and keep living (ADR-0125).

Rules 9: steered colonies and coalescence

One body, separate reserves. The player steers the colony as one body: movement intentions move every attached member together, keeping their attachments. Each member keeps its own reserve and feeds from any patch it touches. Members pay their own upkeep, and the colony's movement cost is shared in proportion to mass. A member that starves dies, becomes a corpse and detaches. Engulfing and budding are colony actions, performed by the member best placed for them.

Permadeath. The life is the colony's founding cell. When it dies, the life ends (ADR-0127). Surviving attached members detach as wildlife with their own reserves. Nothing is resurrected.

Coalescence. Once a colony has held at least 4 members (tunable) for at least 5 minutes of active play (tunable), offers may include Coalesce. Choosing it is a funded transition (ADR-0118):

  • the members' bodies and reserves combine, channel by channel, into one multicellular organism, with construction energy for the junctions;
  • nothing is created or lost;
  • the colony's history (its size, and which families its members evolved) becomes the organism's starting body plan.

This is the entry to M14.2. What that organism can then develop into, and how it enters the 3D habitat (M14.3), is M14's decision, not this ADR's.

Locked requirements

  • No linear mutation tree: satisfied, because the weight floor keeps every operator reachable and offers remain unranked.
  • Absolute permadeath: a dead founder ends the life; colony members never carry it on.
  • No account-age advantage: behaviour records and biases are life state. A new life starts uniform.
  • Offline fairness: attached members freeze with their owner; detached wildlife is independent.
  • Biological costs and conservation: every new effect is funded; cheaper budding lowers energy or bud size, never matter.
  • Shared presentation: colonies and wildlife render by the same rules as everything else.

Versions

  • Rules 7: owner format 7 (behaviour record, biases, per-candidate decline state), a version bundle and schema migration, a new choice kind on the wire, and a new DEV region.
  • Rules 8: genome schema 4 and development version 4 (new capabilities), owner format 8 (colony membership, home anchors), a trace outcome for the bud roll, a version bundle, a migration and a region.
  • Rules 9: colony motion, shared costs and the Coalesce transition, with the same version steps.

Each version keeps earlier regions and their history unchanged, as rules 6 did (ADR-0132).

Alternatives

  • Uniform offers (status quo): rejected by the maintainer; behaviour would not matter.
  • Deterministic paths (moving always offers speed): rejected; it is a linear tree.
  • Rerolling declined candidates: rejected, as in ADR-0120; it gives unearned draws. Declining shapes later odds instead.
  • An automatic budding discount per bud: replaced by the budding-efficiency capability, so cheaper budding is evolved rather than granted.
  • Colonies sharing one reserve from the start: rejected; the merged reserve is what Coalescence earns.

Consequences

Players read their evolution from their play: a mover drifts toward speed, a feeder toward intake and size, a budder toward colonies. The client needs the behaviour record and the per-family odds to explain offers ("offered because you move a lot"). The playtests need telemetry on family shares, decline rates and colony sizes to tune the numbers. A colony gives the multicellular transition a cause, and a recognisable origin for each multicellular body plan.

Open questions

  • Which behaviours should feed Defense and Environment once threats and temperature gradients exist?
  • How many discards per offer, if declining should cost anything?
  • How colony members attach geometrically (chain, cluster, sheet), and whether that shape constrains the multicellular body plan.