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
+4 -3
View File
@@ -31,9 +31,10 @@ inline constexpr std::uint64_t development_v2_rate_microseconds = 1'000'000;
// of them: it follows from the genome's development version.
[[nodiscard]] constexpr std::uint64_t
development_rate_microseconds(std::uint32_t development_version) noexcept {
return development_version == 1 ? development_v1_tick_microseconds
: development_version == 2 ? development_v2_rate_microseconds
: 0;
return development_version == 1 ? development_v1_tick_microseconds
: development_version == 2 || development_version == 3
? development_v2_rate_microseconds // Version 3 keeps version 2's rates.
: 0;
}
// Chosen constants, reviewable as a unit and selected by the genome's
// development version. Declared model parameters, not balance.
+16 -4
View File
@@ -23,11 +23,22 @@ struct FounderParameters {
};
inline constexpr FounderParameters primitive_founder_parameters{400, 1, 8'000'000,
200, 574'000, 500};
inline constexpr std::uint32_t primitive_founder_development_version = 2;
// The genome schema and development version a founder is created with (the version
// bundle's `founder`). Founder 1 serves rules 1-5; founder 2 serves rules 6 (2026-10-15
// balance: a third of the mutation step and a third of the construction energy).
struct FounderVersion {
std::uint32_t genome_schema, development_version;
auto operator<=>(const FounderVersion&) const = default;
};
inline constexpr FounderVersion primitive_founder_v1{genome_schema_v2, 2};
inline constexpr FounderVersion primitive_founder_v2{genome_schema_v3, 3};
inline constexpr std::uint32_t primitive_founder_development_version =
primitive_founder_v1.development_version;
// The founder genome under a world-scoped identity and its origin event. Fails only on
// an invalid identity (zero).
[[nodiscard]] std::expected<Genome, GenomeError> primitive_founder(std::uint64_t id,
std::uint64_t origin_event);
[[nodiscard]] std::expected<Genome, GenomeError>
primitive_founder(std::uint64_t id, std::uint64_t origin_event,
FounderVersion version = primitive_founder_v1);
// M11.2 founder rules 1 (ADR-0100): fully grown, no damage or spare matter;
// 30 seconds of full-speed demand as usable energy. Construction energy is paid
@@ -41,5 +52,6 @@ struct FounderEndowment {
accounting::Picojoules construction{};
auto operator<=>(const FounderEndowment&) const = default;
};
[[nodiscard]] std::expected<FounderEndowment, DevelopmentError> primitive_endowment();
[[nodiscard]] std::expected<FounderEndowment, DevelopmentError>
primitive_endowment(FounderVersion version = primitive_founder_v1);
} // namespace evo::biology
+10 -6
View File
@@ -106,15 +106,19 @@ enum class GenomeError : std::uint8_t {
digest_mismatch,
invalid_encoding
};
// The current schema. Schema 1 records stay valid and are never rewritten (ADR-0099).
inline constexpr std::uint32_t genome_schema_version = 2;
inline constexpr std::uint32_t genome_schema_v1 = 1;
// The capability table of a supported schema (1 or 2); nullptr otherwise.
inline constexpr std::uint32_t genome_schema_v2 = 2;
// Schema 3 (rules 6, 2026-10-15 balance): schema 2's capability table and units, with
// mutation steps a third as large (mutation.cpp). Founded only by rules-6 regions.
inline constexpr std::uint32_t genome_schema_v3 = 3;
// The newest schema. Older records stay valid and are never rewritten (ADR-0099).
inline constexpr std::uint32_t genome_schema_version = genome_schema_v3;
// The capability table of a supported schema (1, 2 or 3); nullptr otherwise.
[[nodiscard]] constexpr const std::array<CapabilitySpec, capability_count>*
capability_schema_for(std::uint32_t schema) noexcept {
return schema == genome_schema_v1 ? &capability_schema_v1
: schema == genome_schema_version ? &capability_schema_v2
: nullptr;
return schema == genome_schema_v1 ? &capability_schema_v1
: schema == genome_schema_v2 || schema == genome_schema_v3 ? &capability_schema_v2
: nullptr;
}
inline constexpr std::size_t max_parents = 2;
inline constexpr std::size_t max_genome_bytes = 256;
@@ -59,10 +59,12 @@ inline constexpr CellularVersionBundle cellular_v4_versions{3, 4, 1, 1, 1, 2, 1,
inline constexpr CellularVersionBundle cellular_v5_versions{4, 5, 1, 1, 1, 2, 1, 2, 1};
// ADR-0128: rules 5 (offline freeze and resume) and owner envelope 6 (presence).
inline constexpr CellularVersionBundle cellular_v6_versions{5, 6, 1, 1, 1, 2, 1, 2, 1};
// 2026-10-15 balance: rules 6 on owner envelope 6, with development 3 and founder 2.
inline constexpr CellularVersionBundle cellular_v7_versions{6, 6, 1, 1, 1, 3, 2, 2, 1};
// Bundles with genome revisions: the revision history profile and format-3 traces.
[[nodiscard]] constexpr bool cellular_revision_bundle(const CellularVersionBundle& b) noexcept {
return b == cellular_v3_versions || b == cellular_v4_versions || b == cellular_v5_versions ||
b == cellular_v6_versions;
b == cellular_v6_versions || b == cellular_v7_versions;
}
// Batch evidence bound by manifest v2 (ADR-0063); all zero at genesis.
@@ -30,6 +30,16 @@ inline constexpr std::uint32_t cellular_lives_bud_rules = 4;
// the offline freeze, linger, suspension and resume.
inline constexpr std::uint32_t cellular_lives_presence_format = 6;
inline constexpr std::uint32_t cellular_lives_presence_rules = 5;
// 2026-10-15 balance (ADR-0132): rules 6 are rules 5 with founders of genome schema
// 3 and development version 3 (founder 2): a third of the mutation step and a third of the
// construction energy. No new state, so they keep owner format 6.
inline constexpr std::uint32_t cellular_lives_balance_rules = 6;
// The founder a region of these rules creates.
[[nodiscard]] constexpr biology::FounderVersion
cellular_founder_version(std::uint32_t rules) noexcept {
return rules >= cellular_lives_balance_rules ? biology::primitive_founder_v2
: biology::primitive_founder_v1;
}
// Trial values (ADR-0128): ticks a frozen life lingers in the world (10 s at 50 ms), and
// how many of its own extents away a resume may look for a clear spot.
inline constexpr std::uint64_t cellular_linger_ticks = 200;
@@ -148,7 +158,7 @@ struct CellularLifeTickFeedback {
// Which owner version a new region starts on. Offers: format 2, rules 2 (the M11.3/11.4
// trial, upgraded by the no-tick migrations). Engulf: format 4, rules 3 (ADR-0124).
// Budding: format 5, rules 4 (ADR-0125). Presence: format 6, rules 5 (ADR-0128).
enum class CellularLivesProfile : std::uint8_t { offers, engulf, budding, presence };
enum class CellularLivesProfile : std::uint8_t { offers, engulf, budding, presence, balance };
struct CellularLivesConfig {
biology::CellularArea area{};
std::uint64_t tick{};