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>
72 lines
3.9 KiB
C++
72 lines
3.9 KiB
C++
#pragma once
|
|
|
|
#include "evo/biology/cellular_catalog.hpp"
|
|
#include "evo/biology/cellular_tuning.hpp"
|
|
|
|
#include <array>
|
|
#include <compare>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <expected>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
// Git-managed trial values for the cellular revamp (rules 13, ADR-0179), in their own file
|
|
// beside the rules-12 tuning file so older images never meet keys they do not know. Same
|
|
// format and rules: plain `key = value` integer lines, every key required exactly once and
|
|
// range-checked. Later build phases add feeding, mutation and reproduction keys.
|
|
namespace evo::biology {
|
|
inline constexpr std::int64_t cellular_revamp_tuning_version = 1;
|
|
inline constexpr std::size_t max_cellular_revamp_tuning_bytes = std::size_t{256} * 1'024;
|
|
|
|
struct CellularRevampTuning {
|
|
std::int64_t version{};
|
|
// Body: the share of upkeep no upkeep-efficiency trait reduces.
|
|
std::int64_t body_essential_upkeep_per_mille{};
|
|
// Body: share of reserve matter carried as load on handling and thrust costs.
|
|
std::int64_t body_reserve_load_per_mille{};
|
|
// Body: growth per tick at growth speed 100, in hundredths of a per mille.
|
|
std::int64_t body_growth_per_tick_centi_mille{};
|
|
// Energy: picojoules 1,000 fg of each matter channel stand in for (burn efficiency 100).
|
|
std::int64_t energy_burn_carbon_pj_per_kfg{}, energy_burn_nitrogen_pj_per_kfg{},
|
|
energy_burn_phosphorus_pj_per_kfg{}, energy_burn_other_pj_per_kfg{};
|
|
// Feeding: per mille of collection lost per membrane point above the founder's 100.
|
|
std::int64_t feeding_membrane_collection_per_mille_per_point{};
|
|
// Predation.
|
|
std::int64_t predation_engulf_ratio_milli{}, predation_engulf_reserve_percent{},
|
|
predation_kill_bubble_per_mille{};
|
|
// The spent pool's drip back into the region.
|
|
std::int64_t spent_drip_interval_ticks{}, spent_drip_bubble_pj{}, spent_drip_bubble_fg{};
|
|
// Mutation offers (Cellular_mutation_plan.md section 3).
|
|
std::int64_t mutation_options{}, mutation_floor_ppm{}, mutation_cap_ppm{};
|
|
std::int64_t mutation_score_min{}, mutation_score_max{};
|
|
std::int64_t mutation_max_multiplier_per_mille{}, mutation_min_multiplier_per_mille{};
|
|
std::int64_t mutation_offer_interval_ticks{};
|
|
std::int64_t mutation_min_points{}, mutation_max_points{}, mutation_recipe_min_share{};
|
|
std::int64_t mutation_max_offspring{}, mutation_carbon_for_light_fg{},
|
|
mutation_buds_for_adhesion{};
|
|
// Reproduction (Cellular_reproduction_plan.md).
|
|
std::int64_t reproduction_split_share_per_mille{}, reproduction_split_min_growth_per_mille{};
|
|
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{};
|
|
auto operator<=>(const CellularRevampTuning&) const = default;
|
|
};
|
|
// A mutation's tunables as the file names them.
|
|
inline constexpr std::array<std::string_view, 15> cellular_mutation_tuning_fields{
|
|
"enabled", "base_weight", "increase_points", "decrease_points", "primary_step",
|
|
"paired_step", "spread_step", "increase_ticks", "decrease_ticks", "cost_e_pj",
|
|
"cost_c_fg", "cost_n_fg", "cost_p_fg", "cost_o_fg", "cost_scale_percent"};
|
|
|
|
[[nodiscard]] std::expected<CellularRevampTuning, CellularTuningError>
|
|
parse_cellular_revamp_tuning(std::string_view text);
|
|
// Canonical text: every key once, in schema order.
|
|
[[nodiscard]] std::string encode_cellular_revamp_tuning(const CellularRevampTuning& tuning);
|
|
} // namespace evo::biology
|