#pragma once #include "evo/biology/metabolism.hpp" #include #include // The primitive founder (ADR-0098): every new life starts from this same genome, so no // account carries a biological advantage into a new life. Genome schema 2 and development // version 2 (rates per second, ADR-0099). Its parameters are tunable playtest values, not // locked rules: with development version 2 a full-grown founder funds its first bud in // about 5 minutes feeding all of the time, 10 minutes feeding half of it and 15 minutes // feeding a third of it, while moving at full speed throughout (ADR-0098 decision 7). namespace evo::biology { // Per-second rates and sizes of the founder, reviewable as a unit. struct FounderParameters { std::uint32_t energy_conversion; // per thousand std::uint32_t membrane; // micrometres std::uint32_t target_size; // femtograms std::uint32_t movement; // micrometres per second std::uint32_t ingestion; // femtograms per second at the reference surface std::uint32_t reproduction; // per thousand of the body invested in a bud }; 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 founder genome under a world-scoped identity and its origin event. Fails only on // an invalid identity (zero). [[nodiscard]] std::expected primitive_founder(std::uint64_t id, std::uint64_t origin_event); // 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 // separately into heat. Tunable and versioned; not an account reward. inline constexpr std::uint32_t founder_life_rules = 1; inline constexpr std::uint64_t founder_reserve_seconds = 30; struct FounderEndowment { GrowthState growth{1000, 0}; accounting::Inventory body{}; accounting::Inventory reserve{}; accounting::Picojoules construction{}; auto operator<=>(const FounderEndowment&) const = default; }; [[nodiscard]] std::expected primitive_endowment(); } // namespace evo::biology