Give capability a cost without giving it a multiplier
M3.3 turns a phenotype into the budgets a ledger can hold: body composition, maintenance, movement, the next construction step, the per-tick intake limit and the reproduction investment. metabolism is the single place the genome's description of capability becomes accounting quantities, so the record itself stays free of those types and M3.1's boundary is crossed once, explicitly. The named risk is reintroducing RPG modifiers, where a capability parameter becomes a flat percentage over every budget. Each budget is therefore derived from a different phenotype quantity: maintenance from mass plus membrane upkeep, movement from mass and speed, intake from surface, construction from the mass a growth step adds, investment from the body a parent already has. One parameter moves some budgets and not others, by different amounts. Doubling membrane thickness costs more matter to build, more energy to hold and more to haul, while leaving uptake, speed, assimilation and structural mass identical, and the mass and maintenance ratios differ, so no single multiplier could produce it. The test asserts that non-uniformity rather than describing it. Composition is declared per compartment, and membrane is the carbon-rich one, so a thicker membrane changes what a body is made of and not only how much. A split assigns the first three channels by share and gives the remainder to the last, so parts always sum back to the whole and a derived body can be spent through the ledger without a rounding leak. That is checked at four awkward masses where every share floors. processes::consumer_for is the first path from a genome into the M2 fixtures. Opening inventory stays the caller's: a genome says what an organism can do, never what it holds, and a derived config that invented an opening balance would create matter. A derived consumer is shown driving a real feeding tick with the ledger conserving exactly, and a bite one femtogram past the derived cap refused by the M2.3 contract. Every budget is asserted as a hand-calculated literal. The constants are chosen so budgets are of comparable magnitude, which is legibility for tests and not tuning. No existing fixture reads genomes, and no organism spends any budget: there is still no starvation, death or repair rule. Native Release, clang-tidy analysis, ASan and format checks pass 19/19; every existing golden and fingerprint is unchanged. Linux CI has not run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -78,7 +78,12 @@ nothing. M3.2 now derives a phenotype from it (ADR-0031): mass, a declared cube
|
||||
geometry, maintenance and enabled components, as pure integer functions of genome,
|
||||
growth and environment, with a bounded plan reporting what further growth would
|
||||
require. Growth and damage are runtime state that never reach the genome. Nothing
|
||||
is spent yet; M3.3 attaches these parameters to the M2 budgets.
|
||||
is spent yet. M3.3 now attaches those parameters to budgets (ADR-0032): body
|
||||
composition, maintenance, movement, construction, intake and reproduction
|
||||
investment, each derived from a different phenotype quantity so one parameter
|
||||
moves some budgets and not others. `consumer_for` is the first path from a genome
|
||||
into the M2 fixtures, and mass splits conserve exactly so a derived body can be
|
||||
spent through the ledger. No existing fixture reads genomes yet; that is M3.6.
|
||||
|
||||
## M3 — Genome v0.1
|
||||
|
||||
|
||||
+21
-4
@@ -1,13 +1,13 @@
|
||||
# Project status and next steps
|
||||
|
||||
Updated 2026-09-22. The repository contains an engineering foundation and a
|
||||
Updated 2026-09-23. The repository contains an engineering foundation and a
|
||||
deterministic headless proof. It does not yet contain cellular gameplay or a
|
||||
persistent simulation server. The founding vision remains unchanged.
|
||||
|
||||
## Completed implementation
|
||||
|
||||
- Vision, architectural pillars, risks, open-question register, architecture
|
||||
diagrams, biological contracts, engineering constitution and 31 ADRs.
|
||||
diagrams, biological contracts, engineering constitution and 32 ADRs.
|
||||
Proposed/deferred choices remain distinct from accepted proof decisions.
|
||||
- M0–M4 task breakdowns with dependencies, acceptance evidence and risks,
|
||||
plus M5–M14 gates in [ROADMAP.md](ROADMAP.md).
|
||||
@@ -61,8 +61,8 @@ for the bounded proof; the general production ECS remains a later measured choic
|
||||
|
||||
| Priority | Work | Completion evidence |
|
||||
|---|---|---|
|
||||
| 1 | M3.3 derive energetic components | Size, membrane and movement tradeoffs affect several budgets; the first increment where a genome reaches the M2 ledger |
|
||||
| 2 | M3.4 seeded mutation candidates | Bounded reproducible candidates conditioned by recorded context, with prerequisite and cost tests |
|
||||
| 1 | M3.4 seeded mutation candidates | Bounded reproducible candidates conditioned by recorded context, with prerequisite, cost and fixed-seed tests |
|
||||
| 2 | M3.5 heredity and divergence history | Reproduction persists parent/child links and genome identity survives death |
|
||||
| Delivery gate | Add/update the dev workload when a deployable increment needs it; Argo is ready | Observe Job/pod completion separately from image publication; no World0 changes |
|
||||
|
||||
M1.6 now implements [the sequential scheduler contract](architecture/SCHEDULER_CONTRACT.md):
|
||||
@@ -191,6 +191,23 @@ limitation, not a modifier, and the constants must not become tuning by having
|
||||
been written down. Native Release, analysis, ASan and formatting passed 18/18;
|
||||
Linux CI has not run yet.
|
||||
|
||||
M3.3 gives capability a cost (ADR-0032). `metabolic_budget` returns body
|
||||
composition, maintenance, movement, construction, the per-tick intake limit and
|
||||
the reproduction investment, in accounting types; `metabolism` is the single
|
||||
translation layer and the genome record stays free of those types. Each budget
|
||||
comes from a different phenotype quantity, so one parameter moves some and not
|
||||
others: a thicker membrane costs more matter to build, more energy to hold and
|
||||
more to haul, while leaving uptake, speed and assimilation identical. That
|
||||
non-uniformity is asserted directly, because a capability that became a flat
|
||||
multiplier is the failure this increment was scoped against. Composition is
|
||||
declared per compartment, and splits give the remainder to the last channel so
|
||||
parts sum back to the whole and a derived body can be spent without a rounding
|
||||
leak. `processes::consumer_for` is the first path from a genome into the M2
|
||||
fixtures, with opening inventory left to the caller so no matter is invented; a
|
||||
derived consumer is shown driving a real feeding tick with the ledger conserving.
|
||||
No existing fixture reads genomes yet and no organism spends any budget. Native
|
||||
Release, analysis, ASan and formatting passed 19/19; Linux CI has not run yet.
|
||||
|
||||
Before biology, resolve the relevant heredity and energetic contracts rather
|
||||
than treating proof particles as organisms. Exact game tick rate, NPC mutation,
|
||||
logout treatment, species/extinction rules and multicellular transition remain
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
# ADR-0032: Metabolic budgets derived from a phenotype
|
||||
|
||||
## Status
|
||||
|
||||
Adopted for M3.3. Running seeded ensembles on genome-derived strategies is M3.6.
|
||||
Mutation is M3.4. No gameplay balance, mortality rule or fitness score is selected,
|
||||
and no existing M2 fixture behaviour changes.
|
||||
|
||||
## Context
|
||||
|
||||
M3.2 derives dimensioned physical parameters but nothing spends them. The M2
|
||||
fixtures still run on hand-written constants, so capability and cost are still
|
||||
unrelated. This is the increment where a genome first reaches the ledger, and the
|
||||
roadmap names its risk precisely: reintroducing RPG modifiers, where a capability
|
||||
parameter becomes a flat percentage applied uniformly to every budget.
|
||||
|
||||
M3.1 deliberately kept the genome free of accounting types so its units could not
|
||||
imply ledger semantics. That boundary now has to be crossed somewhere explicit
|
||||
rather than everywhere implicitly.
|
||||
|
||||
## Decision
|
||||
|
||||
Add `evo::biology::metabolic_budget`, one entry point returning every budget a
|
||||
phenotype implies, in accounting types. The genome record itself stays free of
|
||||
those types: `metabolism` is the single translation layer, and the genome remains
|
||||
a description of capability rather than of resources.
|
||||
|
||||
The budgets are body composition, maintenance per tick, movement per tick at full
|
||||
speed, total demand, the next construction step, the per-tick intake limit and the
|
||||
reproduction investment. They are derived from different phenotype quantities on
|
||||
purpose: maintenance from total mass plus a membrane upkeep term, movement from
|
||||
total mass and speed, intake from surface, construction from the mass difference a
|
||||
growth step implies, and investment from the body a parent would divide. A change
|
||||
to one genome parameter therefore moves some budgets and not others, by different
|
||||
amounts. That is the whole point: a thicker membrane costs more matter to build
|
||||
and more energy to hold, while changing neither uptake nor speed. Nothing here is
|
||||
a multiplier applied to a total.
|
||||
|
||||
Composition is declared per compartment in thousandths. Structure and membrane
|
||||
have different compositions, so a thicker membrane changes what the body is made
|
||||
of and not only how much. A split assigns the first three channels by share and
|
||||
gives the remainder to the last, so mass is conserved exactly and a body can be
|
||||
spent through the ledger without a rounding leak.
|
||||
|
||||
Reproduction investment is the body scaled by the genome's reproduction fraction,
|
||||
with its energy priced at the same construction rate as the organism's own tissue:
|
||||
building offspring tissue costs what building your own does. A genome without the
|
||||
reproduction capability invests nothing, rather than investing a default.
|
||||
|
||||
The rule constants are selected by the same development version as M3.2 and fail
|
||||
closed on an unknown one. They are chosen so the budgets are of comparable
|
||||
magnitude, because budgets that differ by orders of magnitude make every tradeoff
|
||||
invisible. That is a legibility choice for tests, not tuning, and it must be
|
||||
re-derived before any of it is balanced.
|
||||
|
||||
`processes::consumer_for` converts a budget into the existing `ConsumerConfig`.
|
||||
Opening inventory stays the caller's: a genome describes what an organism can do,
|
||||
never the resources it happens to hold, and a derived config that also invented an
|
||||
opening balance would be creating matter. Nothing else in the M2 fixtures changes,
|
||||
and no existing fixture starts reading genomes.
|
||||
|
||||
## Alternatives Considered
|
||||
|
||||
A single efficiency multiplier over one budget would be exactly the modifier this
|
||||
increment exists to avoid. Putting accounting types into the genome record would
|
||||
undo the M3.1 boundary and let a stored parameter imply a ledger channel. Deriving
|
||||
composition from the phenotype rather than declaring it per compartment would hide
|
||||
the one place the membrane's different chemistry is stated. Giving the rounding
|
||||
remainder to the largest channel instead of a fixed one would make a split depend
|
||||
on the mass being split. Having `consumer_for` supply an opening inventory would
|
||||
create matter from a description.
|
||||
|
||||
## Benefits
|
||||
|
||||
Capability now has cost, and the cost is not uniform. Size, membrane thickness and
|
||||
movement each move a different subset of budgets, so the tradeoffs are visible and
|
||||
testable rather than asserted. Mass splits conserve exactly, so a derived body can
|
||||
be spent through the ledger. The M2 fixtures gain a genome-driven path without any
|
||||
of them changing behaviour.
|
||||
|
||||
## Costs
|
||||
|
||||
Every constant is chosen, including two compositions, a movement coefficient and
|
||||
an intake energy density. Intake is distributed by the structure composition, which
|
||||
assumes an organism takes up what it builds from. Movement is priced at full speed
|
||||
whether or not an organism moves, so it is a capacity rather than an expenditure.
|
||||
The small integer helpers are duplicated rather than shared through an internal
|
||||
header.
|
||||
|
||||
## Risks
|
||||
|
||||
Do not read any budget as balance or a power score, and do not let the constants
|
||||
become tuning by having been measured. Comparable magnitudes were chosen for
|
||||
legibility and say nothing about what an organism should be able to afford. A
|
||||
budget is a derived quantity, not a rule: nothing here decides starvation, death,
|
||||
repair or whether demand is ever met. No organism spends any of this yet.
|
||||
|
||||
## Consequences
|
||||
|
||||
Test that each budget is hand-calculable, that mass splits conserve exactly on
|
||||
both compartments and at the remainder boundary, that a thicker membrane raises
|
||||
matter cost and maintenance while leaving uptake and speed untouched, that a
|
||||
larger body raises maintenance and uptake together, that an absent capability
|
||||
yields a zero budget rather than a default, that unknown rule versions fail closed,
|
||||
and that a derived consumer drives a real feeding tick with the ledger conserving.
|
||||
No genome, snapshot, ledger, existing fixture, renderer or deployment changes.
|
||||
@@ -24,6 +24,7 @@ Each record has the eight required sections.
|
||||
0029 scopes the deterministic ecosystem driver and bounded measured episodes.
|
||||
0030 adopts the immutable genome v1 record, validation and canonical encoding.
|
||||
0031 adopts deterministic development, derived phenotype and bounded plans.
|
||||
0032 derives non-uniform metabolic budgets and the first genome/ledger path.
|
||||
|
||||
Every dependency adoption records exact version/commit and integrity hash,
|
||||
transitive license obligations, maintenance/security review, owner and removal
|
||||
|
||||
@@ -154,3 +154,37 @@ must not become tuning by having been written down. Thermal shortfall is reporte
|
||||
as a quantity; it is not a mortality, penalty or damage rule. A derived phenotype
|
||||
is not a viability claim. Repair is not modelled: a plan advances growth and never
|
||||
reduces damage. Nothing is spent or reserved, and no organism yet develops.
|
||||
|
||||
## Implemented M3.3 metabolic budgets
|
||||
|
||||
[ADR-0032](../adr/0032-metabolic-budgets-from-genome.md) turns a phenotype into
|
||||
the budgets a ledger can hold: body composition, maintenance, movement, the next
|
||||
construction step, the per-tick intake limit and the reproduction investment.
|
||||
`metabolism` is the single place the genome's description of capability becomes
|
||||
accounting quantities; the record itself stays free of those types.
|
||||
|
||||
Each budget is derived from a different phenotype quantity on purpose. Maintenance
|
||||
follows total mass plus a membrane upkeep term, movement follows mass and speed,
|
||||
intake follows surface, construction follows the mass a growth step adds, and
|
||||
investment divides the body a parent already has. One genome parameter therefore
|
||||
moves some budgets and not others, by different amounts: a thicker membrane costs
|
||||
more matter to build, more energy to hold and more energy to haul, while changing
|
||||
neither uptake nor speed. Nothing here is a multiplier applied to a total, which
|
||||
is the capability-as-percentage-modifier failure this increment was scoped against.
|
||||
|
||||
Composition is declared per compartment, and membrane is the more carbon-rich one,
|
||||
so a thicker membrane changes what a body is made of and not only how much. A
|
||||
split assigns the first three channels by share and gives the remainder to the
|
||||
last, so parts always sum back to the whole and a derived body can be spent
|
||||
through the ledger without a rounding leak.
|
||||
|
||||
`processes::consumer_for` is the first path from a genome into the M2 fixtures.
|
||||
Opening inventory stays the caller's: a genome describes what an organism can do,
|
||||
never the resources it holds, and a derived config that invented an opening
|
||||
balance would create matter. No existing fixture reads genomes; that is M3.6.
|
||||
|
||||
The rule constants are chosen so budgets are of comparable magnitude, because
|
||||
budgets differing by orders of magnitude make every tradeoff invisible. That is a
|
||||
legibility choice for tests, not tuning, and must be re-derived before balancing.
|
||||
A budget is a derived quantity, not a rule: nothing here decides starvation,
|
||||
death or repair, and no organism spends any of it yet.
|
||||
|
||||
@@ -482,3 +482,51 @@ of ApplyDevelopment, energetic budgets, repair, ageing, starvation, mutation and
|
||||
morphology are not implemented. Golden `d61ad5bf0c928c76`, ecosystem fingerprint
|
||||
`2cd4a15f9fbe9949` and the frozen genome fixture are unchanged. No deployment
|
||||
manifest or image pin changed. Linux validation is pending its first pushed run.
|
||||
|
||||
## M3.3 metabolic budgets (2026-09-23)
|
||||
|
||||
Native Release, analysis and MSVC ASan each passed 19/19 CTests; formatting
|
||||
passed. Commands: `tools/windows-check.ps1 -Preset <release|analysis|asan>
|
||||
-Action check` and debug `-Action format`. `metabolism-contracts` is the one new
|
||||
CTest case. `evo_biology` now links `evo::accounting` and `evo_processes` links
|
||||
`evo::biology`; no existing suite changed and no existing fixture reads genomes.
|
||||
|
||||
Every budget is asserted as a hand-calculated literal against the same 20
|
||||
micrometre cube fixture as M3.2: body 24,160,000 / 2,640,000 / 3,280,000 /
|
||||
6,720,000 femtograms across C/N/P/other, maintenance 160,000 and movement 184,000
|
||||
picojoules per tick, intake 240,000 picojoules and 2400/720/240/1440 femtograms,
|
||||
and a reproduction investment of 11,040,000 femtograms priced at 441,600
|
||||
picojoules. Construction is checked to compose each compartment separately rather
|
||||
than by one blended ratio, and to agree exactly with what `plan_development`
|
||||
reports as material and energy.
|
||||
|
||||
The non-uniformity the increment exists to demonstrate is tested directly.
|
||||
Doubling membrane thickness raises body matter to 65,600,000 femtograms,
|
||||
maintenance to 304,000 picojoules and the movement cost, shifts the carbon share
|
||||
upward because membrane is the carbon-rich compartment, and leaves intake limit,
|
||||
speed, assimilation and structural mass identical; the mass and maintenance ratios
|
||||
are asserted to differ, so no single multiplier could produce this. Growth is
|
||||
tested the same way: uptake follows surface while maintenance follows mass, and
|
||||
their ratios differ.
|
||||
|
||||
Mass splits are checked to conserve at four awkward target sizes and four growth
|
||||
fractions, where every share floors and the last channel absorbs the remainder.
|
||||
An absent capability is checked to yield a zero budget rather than a default, and
|
||||
unknown rule versions and out-of-range growth fail closed.
|
||||
|
||||
The genome-to-ledger path is exercised end to end: a derived `ConsumerConfig`
|
||||
drives a real `FeedingCommunity` tick, the ledger totals are identical before and
|
||||
after, and a bite one femtogram past the derived cap is refused by the existing
|
||||
M2.3 contract. The opening inventory is checked to be exactly the caller's.
|
||||
|
||||
Coverage limitation: as in M3.2, the overflow guards are unreachable through the
|
||||
public API at schema 1 ranges and are recorded rather than covered by a test that
|
||||
could not fail. The small integer helpers are duplicated between `development.cpp`
|
||||
and `metabolism.cpp` rather than shared through an internal header.
|
||||
|
||||
No organism spends any budget: nothing consumes maintenance, movement or
|
||||
construction, and no starvation, death or repair rule exists. The constants are
|
||||
chosen for legible magnitudes, not balance. Golden `d61ad5bf0c928c76`, ecosystem
|
||||
fingerprint `2cd4a15f9fbe9949` and the frozen genome fixture are unchanged. No
|
||||
deployment manifest or image pin changed. Linux validation is pending its first
|
||||
pushed run; no Gitea result is claimed for any increment since `b01a824`.
|
||||
|
||||
Reference in New Issue
Block a user