Cellular rules 7: percentage mutations, skilled budding, hunting wildlife (ADR-0137)
Foundation / checks (ecs) (push) Successful in 3m21s
Foundation / checks (deploy) (push) Successful in 5m39s
Foundation / checks (tsan) (push) Successful in 11m43s
Foundation / checks (network) (push) Successful in 22m3s
Foundation / checks (client) (push) Successful in 22m35s
Foundation / checks (checks) (push) Successful in 46m53s
Foundation / checks (postgres) (push) Successful in 48m22s
Foundation / postgres-tools (push) Successful in 1m17s
Foundation / image (push) Successful in 3m31s
Foundation / server-image (push) Successful in 6m7s

The region 6 playtest found a speed mutation adding 6,667 um/s (1/300 of the range,
33x a founder), so buds seemed to teleport; reproduction made buds bigger and dearer;
and wildlife never hunted. Rules 7:

- genome schema 4: a step is a tenth of the current value (at least 1); an acquired
  capability starts at the founder's value instead of a minimum it could never grow from;
- development 4: a bud is always half the body, and reproduction takes value/2000 off
  its construction energy (founders save a quarter; matter is never discounted);
- twins: a seeded roll (reproduction/2 per thousand) splits one affordable bud's
  investment into two quarter-size buds;
- wildlife engulfs a touching cell the region step lets it take, players' included.

Founder 3, owner format 6 (no new state), bundle v8 and schema v42; the cellular-v6
opening provisions it. The client's mutation callout shrinks to a "Mutation [E]" pill and
its candidate texts describe the new steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-16 22:41:55 -04:00
co-authored by Claude Opus 5.5
parent feac7aac4e
commit 86ee800f32
33 changed files with 786 additions and 137 deletions
+4 -1
View File
@@ -31,9 +31,12 @@ enum class BuddingError : std::uint8_t {
// Pure and deterministic. On every channel the parent's reserve before equals its reserve
// after plus the bud's body and reserve, plus heat in energy. A refusal spends nothing.
// `share` > 1 (ADR-0137 twins) funds one of that many buds from the same investment: each
// gets the investment divided by `share`, so twins are smaller, not extra.
[[nodiscard]] std::expected<BudTransition, BuddingError>
fund_bud(const Genome& genome, GrowthState parent_growth,
const accounting::Inventory& parent_reserve, std::uint32_t temperature_millikelvin);
const accounting::Inventory& parent_reserve, std::uint32_t temperature_millikelvin,
std::uint32_t share = 1);
// What one bud takes from a fully grown, undamaged parent of this genome at this temperature
// (ADR-0129 amendment): investment matter per channel, and construction energy plus the
// bud's provision; exactly what `fund_bud` charges such a parent. Nullopt when the genome
+2 -2
View File
@@ -32,8 +32,8 @@ inline constexpr std::uint64_t development_v2_rate_microseconds = 1'000'000;
[[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_version == 3
? development_v2_rate_microseconds // Version 3 keeps version 2's rates.
: development_version >= 2 && development_version <= 4
? development_v2_rate_microseconds // Versions 3 and 4 keep version 2's rates.
: 0;
}
// Chosen constants, reviewable as a unit and selected by the genome's
+2
View File
@@ -32,6 +32,8 @@ struct FounderVersion {
};
inline constexpr FounderVersion primitive_founder_v1{genome_schema_v2, 2};
inline constexpr FounderVersion primitive_founder_v2{genome_schema_v3, 3};
// Founder 3 serves rules 7 (ADR-0137): percentage mutation steps and skilled reproduction.
inline constexpr FounderVersion primitive_founder_v3{genome_schema_v4, 4};
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
+9 -5
View File
@@ -111,14 +111,18 @@ 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;
// Schema 4 (rules 7, ADR-0137): schema 2's table and units; a mutation step is a tenth of
// the current value (at least 1), and an acquired capability starts at the founder's value.
inline constexpr std::uint32_t genome_schema_v4 = 4;
// 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.
inline constexpr std::uint32_t genome_schema_version = genome_schema_v4;
// The capability table of a supported schema (1 to 4); 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_v2 || schema == genome_schema_v3 ? &capability_schema_v2
: nullptr;
return schema == genome_schema_v1 ? &capability_schema_v1
: schema == genome_schema_v2 || schema == genome_schema_v3 || schema == genome_schema_v4
? &capability_schema_v2
: nullptr;
}
inline constexpr std::size_t max_parents = 2;
inline constexpr std::size_t max_genome_bytes = 256;
+2
View File
@@ -6,6 +6,8 @@
#include <optional>
namespace evo::biology {
// Development version 4 (rules 7, ADR-0137): a bud is always this share of the parent's body.
inline constexpr std::uint32_t bud_body_per_thousand_v4 = 500;
// Shares in thousandths over the ledger's C/N/P/other channels, summing to 1000.
// The last channel absorbs the rounding remainder, so a split conserves mass.
using Composition = std::array<std::uint16_t, 4>;
@@ -61,10 +61,12 @@ inline constexpr CellularVersionBundle cellular_v5_versions{4, 5, 1, 1, 1, 2, 1,
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};
// ADR-0137: rules 7 on owner envelope 6, with development 4 and founder 3.
inline constexpr CellularVersionBundle cellular_v8_versions{7, 6, 1, 1, 1, 4, 3, 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_v7_versions;
b == cellular_v6_versions || b == cellular_v7_versions || b == cellular_v8_versions;
}
// Batch evidence bound by manifest v2 (ADR-0063); all zero at genesis.
@@ -34,12 +34,22 @@ inline constexpr std::uint32_t cellular_lives_presence_rules = 5;
// 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;
// ADR-0137: rules 7 are rules 6 with founder 3 (genome schema 4: percentage mutation
// steps; development 4: reproduction cheapens buds), twin buds, and wildlife that engulfs.
// No new state, so they keep owner format 6.
inline constexpr std::uint32_t cellular_lives_reproduction_rules = 7;
// 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;
return rules >= cellular_lives_reproduction_rules ? biology::primitive_founder_v3
: rules >= cellular_lives_balance_rules ? biology::primitive_founder_v2
: biology::primitive_founder_v1;
}
// ADR-0137: a bud action also yields a twin with probability reproduction / 2 per thousand
// (founders: 25 %), when the reserve funds it and there is room. Seeded per parent and tick.
[[nodiscard]] bool cellular_twin_bud(std::uint64_t world, std::uint64_t region,
std::uint64_t parent_life, std::uint64_t tick,
std::uint32_t reproduction) noexcept;
// 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;
@@ -158,7 +168,14 @@ 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, balance };
enum class CellularLivesProfile : std::uint8_t {
offers,
engulf,
budding,
presence,
balance,
reproduction
};
struct CellularLivesConfig {
biology::CellularArea area{};
std::uint64_t tick{};