feat(biology): genome schema 7 traits, founder 6 and development 7
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 33s
Foundation / server-image (push) Successful in 4m14s
Foundation / image (push) Successful in 4m41s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 33s
Foundation / server-image (push) Successful in 4m14s
Foundation / image (push) Successful in 4m41s
Phase 1 of the cellular revamp build plan (ADR-0179). Genome schema 7 carries twenty 16-bit cellular traits after the movement arrangement: density, upkeep efficiency, growth speed, collection per channel (E/C/N/P/O), burn efficiency per matter channel, engulf capacity, kill absorption, litter, the body recipe (C/N/P/O per thousand, summing to 1000) and adhesion. Its membrane is held in nanometres so it can change in 5% steps of the founder's 1 um. The largest record still fits the 256-byte bound. Development 7 and founder 6 serve rules 13: density sets how large a body is for its mass, the recipe sets the body's composition (intake keeps the founder shares), upkeep is an essential share no trait reduces plus the rest over upkeep efficiency (region-declared BodyTuning, trial 25%), the producer speed penalty is dropped, and the reproduction value is the bud's share of the body with the construction discount fixed at the founder's level. Founder 6 builds exactly founder 5's cell. Earlier schemas and development versions are unchanged. The development and metabolism test mains now print the failing line. Refreshes the DEV session window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,10 +32,18 @@ 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 <= 6
|
||||
? development_v2_rate_microseconds // Versions 3-6 keep version 2's rates.
|
||||
: development_version >= 2 && development_version <= 7
|
||||
? development_v2_rate_microseconds // Versions 3-7 keep version 2's rates.
|
||||
: 0;
|
||||
}
|
||||
// Development version 7 (ADR-0179): region-declared body tuning. Upkeep is an essential
|
||||
// share of the mass-based upkeep that no trait reduces, plus the rest divided by the
|
||||
// genome's upkeep efficiency. Earlier versions ignore it.
|
||||
struct BodyTuning {
|
||||
std::uint32_t essential_upkeep_per_thousand{250}; // Trial (ADR-0179).
|
||||
auto operator<=>(const BodyTuning&) const = default;
|
||||
};
|
||||
inline constexpr BodyTuning default_body_tuning{};
|
||||
// Chosen constants, reviewable as a unit and selected by the genome's
|
||||
// development version. Declared model parameters, not balance.
|
||||
struct DevelopmentRules {
|
||||
@@ -68,6 +76,7 @@ struct Phenotype {
|
||||
// built inside the cell. At efficiency p per thousand they add p/4 of the structural mass
|
||||
// as membrane mass (so they are upkept twice, like membrane) and slow movement by p/2 per
|
||||
// thousand. Light itself is captured by the region's environment owner, never here.
|
||||
// Version 7 keeps the organelle mass but drops the speed penalty: mass slows the cell.
|
||||
inline constexpr std::uint32_t photosynthesis_organelle_quarter = 4;
|
||||
inline constexpr std::uint32_t photosynthesis_speed_halving = 2;
|
||||
// A proposal. It reserves nothing, pays for nothing and commits nothing; the
|
||||
@@ -85,12 +94,14 @@ rules_for(std::uint32_t development_version);
|
||||
// Pure: a phenotype is recomputed from retained inputs rather than cached, so a
|
||||
// cached copy can always be checked against a recomputation.
|
||||
[[nodiscard]] std::expected<Phenotype, DevelopmentError>
|
||||
derive_phenotype(const Genome& genome, GrowthState growth, EnvironmentState environment);
|
||||
derive_phenotype(const Genome& genome, GrowthState growth, EnvironmentState environment,
|
||||
const BodyTuning& tuning = default_body_tuning);
|
||||
// Advances realized growth toward the target by at most the rule step, reduced to
|
||||
// the largest step the available mass and energy admit. This bounds by total mass
|
||||
// only: it cannot see which elements a step consumes, so it is a proposal and not
|
||||
// an affordability authority. `metabolic_budget` decides that, per channel, and
|
||||
// can only narrow this further. Never repairs damage.
|
||||
[[nodiscard]] std::expected<DevelopmentPlan, DevelopmentError>
|
||||
plan_development(const Genome& genome, GrowthState growth, EnvironmentState environment);
|
||||
plan_development(const Genome& genome, GrowthState growth, EnvironmentState environment,
|
||||
const BodyTuning& tuning = default_body_tuning);
|
||||
} // namespace evo::biology
|
||||
|
||||
Reference in New Issue
Block a user