Cellular balance rules 6 (ADR-0132, schema v41)
Foundation / checks (checks) (push) Successful in 42m33s
Foundation / checks (deploy) (push) Successful in 4m11s
Foundation / checks (ecs) (push) Successful in 2m27s
Foundation / checks (network) (push) Successful in 19m23s
Foundation / checks (postgres) (push) Successful in 44m44s
Foundation / checks (tsan) (push) Successful in 9m53s
Foundation / checks (client) (push) Successful in 16m19s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 3m14s
Foundation / image (push) Successful in 3m16s

The playtest found mutation offers the arena could never pay for. A mutation's
matter cost is the real body difference (ADR-0118), so it cannot be discounted.
Rules 6 cut it honestly:
- genome schema 3 steps a third as far (1/300 of the range);
- development version 3 charges a third of the construction energy (13 instead of
  40 pJ per 1000 fg).

Founder 2 uses both. The cellular-v5 opening creates rules-6 regions on bundle v7,
which schema v41 admits. Existing lineages, regions and committed history are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-15 20:53:31 -04:00
co-authored by Claude Opus 5.5
parent 1446d36d26
commit 4d17a0651c
31 changed files with 571 additions and 68 deletions
+15 -8
View File
@@ -535,7 +535,8 @@ CellularLives::create(const PrimitiveLives& opening,
const auto world = nursery_config.world;
const auto region = nursery_config.region;
const auto frame = nursery_config.frame;
const bool presence = profile == CellularLivesProfile::presence;
const bool balance = profile == CellularLivesProfile::balance; // Rules 6: presence plus.
const bool presence = profile == CellularLivesProfile::presence || balance;
const bool budding = profile == CellularLivesProfile::budding || presence;
const bool engulf = profile == CellularLivesProfile::engulf || budding;
if (engulf)
@@ -548,10 +549,11 @@ CellularLives::create(const PrimitiveLives& opening,
: budding ? cellular_lives_bud_format
: engulf ? cellular_lives_engulf_format
: cellular_lives_format,
presence ? cellular_lives_presence_rules
: budding ? cellular_lives_bud_rules
: engulf ? cellular_lives_engulf_rules
: cellular_lives_rules);
balance ? cellular_lives_balance_rules
: presence ? cellular_lives_presence_rules
: budding ? cellular_lives_bud_rules
: engulf ? cellular_lives_engulf_rules
: cellular_lives_rules);
return std::unique_ptr<CellularLives>{new CellularLives{std::move(state)}};
}
@@ -858,8 +860,11 @@ CellularLives::birth_candidate(LifeRequest request, LifeAllocation allocation) c
state_->archive.find(allocation.genome) || state_->archive.organism(allocation.organism))
return std::unexpected{CellularLivesError::duplicate_life};
const auto endowed = biology::primitive_endowment();
const auto genome = biology::primitive_founder(allocation.genome, allocation.event);
// Rules 6 found version-2 founders: lower construction energy, finer mutations.
const auto founder_version = cellular_founder_version(state_->rules_version);
const auto endowed = biology::primitive_endowment(founder_version);
const auto genome =
biology::primitive_founder(allocation.genome, allocation.event, founder_version);
if (!endowed || !genome)
return std::unexpected{CellularLivesError::biology};
const auto budget = biology::metabolic_budget(
@@ -964,9 +969,11 @@ CellularLives::restore(std::span<const std::uint8_t> bytes, std::uint64_t world,
const bool offer_version = magic == cellular_lives_v2_magic &&
format_version == cellular_lives_format &&
rules_version == cellular_lives_rules;
// Format 6 carries rules 5 or rules 6 (founder 2, no new state).
const bool presence_version = magic == cellular_lives_v6_magic &&
format_version == cellular_lives_presence_format &&
rules_version == cellular_lives_presence_rules;
(rules_version == cellular_lives_presence_rules ||
rules_version == cellular_lives_balance_rules);
// Formats 5 and 6 carry the bud sequence and parent lives (rules 4 and 5).
const bool bud_version = presence_version || (magic == cellular_lives_v5_magic &&
format_version == cellular_lives_bud_format &&