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
+6
View File
@@ -64,6 +64,12 @@ std::expected<DevelopmentRules, DevelopmentError> rules_for(std::uint32_t develo
if (development_version == 2) {
return DevelopmentRules{1000, 1200, 10, 15, 40, 60'000, 293'150, 50};
}
// Version 3 (rules 6, 2026-10-15 balance): version 2 with a third of the construction
// energy (13 pJ per 1000 fg built instead of 40). Construction is overhead paid into
// heat, so this changes no matter balance.
if (development_version == 3) {
return DevelopmentRules{1000, 1200, 10, 15, 13, 60'000, 293'150, 50};
}
return std::unexpected{DevelopmentError::unsupported_rules};
}
+7 -6
View File
@@ -3,13 +3,14 @@
#include <limits>
namespace evo::biology {
std::expected<Genome, GenomeError> primitive_founder(std::uint64_t id, std::uint64_t origin_event) {
std::expected<Genome, GenomeError> primitive_founder(std::uint64_t id, std::uint64_t origin_event,
FounderVersion version) {
const auto& p = primitive_founder_parameters;
GenomeDraft draft;
draft.schema_version = genome_schema_version;
draft.schema_version = version.genome_schema;
draft.id = id;
draft.origin_event = origin_event;
draft.development_version = primitive_founder_development_version;
draft.development_version = version.development_version;
draft.capabilities = {{Capability::energy_conversion, p.energy_conversion, 0},
{Capability::membrane, p.membrane, 0},
{Capability::movement, p.movement, 0},
@@ -19,11 +20,11 @@ std::expected<Genome, GenomeError> primitive_founder(std::uint64_t id, std::uint
return Genome::create(draft);
}
std::expected<FounderEndowment, DevelopmentError> primitive_endowment() {
std::expected<FounderEndowment, DevelopmentError> primitive_endowment(FounderVersion version) {
// Identity does not enter development; the published genome gets allocated
// identities at creation, not these analysis-only values.
const auto genome = primitive_founder(1, 1);
const auto rules = rules_for(primitive_founder_development_version);
const auto genome = primitive_founder(1, 1, version);
const auto rules = rules_for(version.development_version);
if (!genome || !rules)
return std::unexpected{DevelopmentError::unsupported_rules};
const auto budget = metabolic_budget(*genome, {1000, 0}, {rules->reference_temperature, {}});
+1 -1
View File
@@ -108,7 +108,7 @@ metabolic_rules_for(std::uint32_t development_version) {
return MetabolicRules{structure_shares, membrane_shares, 20, 50'000};
}
// Version 2: per second; movement at 1000 um/s costs 50 pJ/s per 1000 fg (tunable).
if (development_version == 2) {
if (development_version == 2 || development_version == 3) { // Version 3: same metabolism.
return MetabolicRules{structure_shares, membrane_shares, 50, 50'000};
}
return std::unexpected{DevelopmentError::unsupported_rules};
+9 -5
View File
@@ -28,12 +28,16 @@ constexpr std::array<MutationOperator, 4 * capability_count> catalog = [] {
// One rule rather than a constant per capability: a hundredth of the declared
// range, at least one. Granularity follows the range, which is a stated model
// choice and not a claim about biology.
// The step comes from the genome's own schema, so a schema 1 lineage keeps its steps.
// The step comes from the genome's own schema, so a lineage keeps its steps. Schema 3
// (rules 6, 2026-10-15 balance) takes a third of that step: successor bodies differ a
// third as much, so the matter a mutation needs falls with them (ADR-0118: the cost is
// the body difference, never a discount).
constexpr std::uint32_t adjustment_step(const std::array<CapabilitySpec, capability_count>& table,
Capability kind) noexcept {
Capability kind, std::uint32_t schema) noexcept {
const auto& limits = table[static_cast<std::size_t>(kind)];
const auto span = limits.maximum - limits.minimum;
return span / 100 == 0 ? 1 : span / 100;
const std::uint32_t divisor = schema == genome_schema_v3 ? 300 : 100;
return span / divisor == 0 ? 1 : span / divisor;
}
std::uint64_t mix(std::uint64_t hash, std::uint64_t value) noexcept {
@@ -92,7 +96,7 @@ std::optional<GenomeDraft> apply(const Genome& genome, const MutationOperator& e
if (!present) {
return std::nullopt;
}
const auto step = adjustment_step(table, entry.target);
const auto step = adjustment_step(table, entry.target, genome.schema_version());
// Refused rather than clamped: a clamp would make two operators agree
// and would offer a no-op as a real choice.
if (carried->parameter > limits.maximum - step) {
@@ -105,7 +109,7 @@ std::optional<GenomeDraft> apply(const Genome& genome, const MutationOperator& e
if (!present) {
return std::nullopt;
}
const auto step = adjustment_step(table, entry.target);
const auto step = adjustment_step(table, entry.target, genome.schema_version());
if (carried->parameter < limits.minimum + step) {
return std::nullopt;
}