feat(lifecycle): rules 13 multicellular organisms and Emerge
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 4m12s
Foundation / image (push) Successful in 4m52s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 4m12s
Foundation / image (push) Successful in 4m52s
Adhesion turns a cell into a two-member organism: one life with a member count, one genome and one reserve, developed as its genome with the target size times its members. The single cell ends as an empty merged corpse. An organism expresses accepted mutations as a whole, paid from its reserve; its buds add internal members (wildlife stops one short of the threshold); the extra members' mass loads its thrust. At the emergence threshold the Emerge intent exports the body and reserve through the boundary ledger and ends the life as emerged. Records the maintainer's 2026-10-23 decisions in ADR-0179 and the project vision (whole-organism mutations; the playtest form of Emerge). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
|
||||
// M11.5 budding (ADR-0098 decision 1, ADR-0125): a funded proposal, detached from any
|
||||
// owner. The parent pays its ADR-0032 reproduction investment and a starting provision
|
||||
@@ -66,6 +67,13 @@ split_cell(const Genome& parent, const Genome& child, GrowthState growth,
|
||||
const accounting::Inventory& body, const accounting::Inventory& reserve,
|
||||
std::uint32_t temperature_millikelvin, std::uint32_t share_per_thousand,
|
||||
std::uint32_t min_growth, const BodyTuning& tuning = default_body_tuning);
|
||||
// Rules 13: the largest growth whose body `genome` builds within `matter` on every channel and
|
||||
// that body; nothing when even the smallest does not fit.
|
||||
[[nodiscard]] std::expected<std::optional<std::pair<GrowthState, accounting::Inventory>>,
|
||||
BuddingError>
|
||||
largest_growth_within(const Genome& genome, const accounting::Inventory& matter,
|
||||
std::uint32_t temperature_millikelvin,
|
||||
const BodyTuning& tuning = default_body_tuning);
|
||||
// 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
|
||||
|
||||
@@ -97,7 +97,15 @@ struct CellularPatchStockUpdate {
|
||||
auto operator<=>(const CellularPatchStockUpdate&) const = default;
|
||||
};
|
||||
// Unrecorded: a corpse from a checkpoint format that kept no cause (before format 4).
|
||||
enum class CellularDeathCause : std::uint8_t { unrecorded = 0, starved = 1, engulfed = 2 };
|
||||
// Rules 13 (ADR-0179): merged, a single cell that became a multicellular organism (its body and
|
||||
// reserve moved into the organism); emerged, an organism that left the region for the world.
|
||||
enum class CellularDeathCause : std::uint8_t {
|
||||
unrecorded = 0,
|
||||
starved = 1,
|
||||
engulfed = 2,
|
||||
merged = 3,
|
||||
emerged = 4
|
||||
};
|
||||
struct CellularCorpseCandidate {
|
||||
std::uint64_t life_id{};
|
||||
CellularPosition position;
|
||||
|
||||
@@ -50,6 +50,9 @@ struct CellularRevampTuning {
|
||||
std::int64_t reproduction_bud_fee_e_pj{}, reproduction_bud_fee_c_fg{},
|
||||
reproduction_bud_fee_n_fg{}, reproduction_bud_fee_p_fg{}, reproduction_bud_fee_o_fg{};
|
||||
std::int64_t reproduction_bud_fee_scale_percent{}, reproduction_organism_cap{};
|
||||
// Multicellular organisms.
|
||||
std::int64_t organism_load_per_mille{}, organism_emerge_members{}, organism_emerge_mass_fg{},
|
||||
organism_emerge_reserve_pj{};
|
||||
// Each catalog mutation's tunables, in catalog order. Optional keys
|
||||
// `mutation.<key>.<field>` override the defaults from its spec.
|
||||
std::array<CellularMutationTuning, cellular_catalog_size> mutations{};
|
||||
|
||||
@@ -27,6 +27,8 @@ struct CellularStepIntent {
|
||||
std::uint8_t exclude{};
|
||||
// Rules 13: with `bud`, the player continues as the (first) bud; the parent becomes wildlife.
|
||||
bool become{};
|
||||
// Rules 13: an organism at the emergence threshold leaves the region for the world.
|
||||
bool emerge{};
|
||||
auto operator<=>(const CellularStepIntent&) const = default;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user