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
+43
View File
@@ -798,6 +798,48 @@ void rules_four_owner_buds_wildlife() {
refresh_checksum(rewound);
CHECK(!CellularLives::restore(rewound, 93, 1, 7, owner.tick()));
}
// 2026-10-15 balance: a rules-6 opening keeps owner format 6 and founds schema-3,
// development-3 cells, whose birth costs the nursery less construction energy; the
// snapshot restores as rules 6 and a rules-5 opening still founds founder-1 cells.
void rules_six_found_cheaper_cells_with_finer_mutations() {
auto primitive = PrimitiveLives::create({95, 1, 7, 17, founder_price(2), {{0, 0}, {1'500, 0}}});
CHECK(primitive);
auto habitat = evo::biology::CellularHabitat::create({95, 1, 7, 3'000, 2'000, {}});
CHECK(habitat);
auto created =
CellularLives::create(**primitive, std::move(*habitat), {{3'000, 2'000}, 0, 293'150},
CellularLivesProfile::balance);
CHECK(created);
auto owner = std::move(*created);
CHECK(owner->format_version() == cellular_lives_presence_format &&
owner->rules_version() == cellular_lives_balance_rules);
const std::span<const CellularLifeIntent> no_lives{};
CHECK(owner->advance_tick(no_lives));
LifeRequest request{};
request.account.back() = 7;
request.action = 1;
const LifeAllocation allocation{601, 601, 601, 601, {1}};
const auto born = owner->birth_candidate(request, allocation);
CHECK(born && (*born)->lives().size() == 1);
const auto genome = (*born)->archive().find(allocation.genome);
CHECK(genome && genome->schema_version() == evo::biology::genome_schema_v3 &&
genome->development_version() == 3);
const auto endowment = evo::biology::primitive_endowment(evo::biology::primitive_founder_v2);
const auto classic = evo::biology::primitive_endowment();
CHECK(endowment && classic && endowment->construction.value < classic->construction.value);
CHECK((*born)->nursery().energy.value == owner->nursery().energy.value -
endowment->reserve.energy.value -
endowment->construction.value);
CHECK((*born)->heat().energy.value == endowment->construction.value &&
(*born)->current_total() == (*born)->opening_total());
const auto recovered = CellularLives::restore((*born)->snapshot(), 95, 1, 7, (*born)->tick());
CHECK(recovered && (*recovered)->rules_version() == cellular_lives_balance_rules &&
(*recovered)->snapshot() == (*born)->snapshot());
CHECK(cellular_founder_version(cellular_lives_presence_rules) ==
evo::biology::primitive_founder_v1 &&
cellular_founder_version(cellular_lives_balance_rules) ==
evo::biology::primitive_founder_v2);
}
// ADR-0128: an offline owned life freezes, lingers 200 ticks, is suspended without aging,
// survives restore, and resumes; a newborn on its spot makes it resume nearby.
void rules_five_owner_freezes_lingers_suspends_and_resumes() {
@@ -911,6 +953,7 @@ int main() {
rules_three_owner_resolves_engulf_and_detritus();
rules_four_owner_buds_wildlife();
rules_five_owner_freezes_lingers_suspends_and_resumes();
rules_six_found_cheaper_cells_with_finer_mutations();
std::puts(
"PASS cellular lives: feeding, tick ownership, terminal closure, rules 3, budding");
} catch (const std::exception& error) {