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>
47 lines
2.5 KiB
C++
47 lines
2.5 KiB
C++
#pragma once
|
|
|
|
#include "evo/biology/metabolism.hpp"
|
|
|
|
#include <cstdint>
|
|
#include <expected>
|
|
#include <optional>
|
|
|
|
// 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
|
|
// from its reserve; nothing is drawn from its body.
|
|
namespace evo::biology {
|
|
// Seconds of the bud's full demand (maintenance plus full-speed movement) the parent
|
|
// provides as starting reserve energy: the founder's reserve rule (ADR-0100). Trial.
|
|
inline constexpr std::uint64_t bud_provision_seconds = 30;
|
|
|
|
struct BudTransition {
|
|
GrowthState growth{}; // the bud's, the largest the investment matter builds
|
|
accounting::Inventory body{}; // the bud's developed body
|
|
accounting::Inventory reserve; // the bud's: leftover matter and the provision
|
|
accounting::Inventory parent_reserve; // the parent's reserve after paying
|
|
accounting::Picojoules heat{}; // the investment's construction energy
|
|
auto operator<=>(const BudTransition&) const = default;
|
|
};
|
|
enum class BuddingError : std::uint8_t {
|
|
no_capability, // The genome cannot reproduce.
|
|
not_grown, // The parent is not fully realized, or is damaged.
|
|
insufficient_funding, // Some channel of investment plus provision is missing.
|
|
development // The genome's rules cannot develop it.
|
|
};
|
|
|
|
// 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,
|
|
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
|
|
// cannot bud or cannot build a cell from its investment.
|
|
[[nodiscard]] std::optional<accounting::Inventory> bud_cost(const Genome& genome,
|
|
std::uint32_t temperature_millikelvin);
|
|
} // namespace evo::biology
|