feat(biology): evolve photosynthetic producers that capture light
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (deploy) (push) Successful in 5m15s
Foundation / checks (network) (push) Successful in 21m56s
Foundation / checks (client) (push) Successful in 22m54s
Foundation / checks (tsan) (push) Successful in 47m4s
Foundation / checks (postgres) (push) Successful in 1h15m49s
Foundation / checks (checks) (push) Failing after 1h30m4s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (deploy) (push) Successful in 5m15s
Foundation / checks (network) (push) Successful in 21m56s
Foundation / checks (client) (push) Successful in 22m54s
Foundation / checks (tsan) (push) Successful in 47m4s
Foundation / checks (postgres) (push) Successful in 1h15m49s
Foundation / checks (checks) (push) Failing after 1h30m4s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
ADR-0175 implements ADR-0136 step C with trial costs to be balanced after playtesting. Genome schema 5 adds a photosynthesis efficiency (empty in schemas 1-4, so earlier offers and draws are unchanged; mutation operators 29-32 are appended). Development version 5 builds the organelles as internal membrane (p/4 of structure, upkept twice) and slows movement by p/2 per thousand. Founder 4 and cellular rules 11 let lineages earn the capability as an offspring plan that children express. Owner format 9 declares the region's light. Inside each tick's detached candidate, active unfrozen producers capture cross-section x irradiance x efficiency (a quarter while moving), credited to the reserve and boundary inflow together and replayed from recorded intentions. Well-lit wildlife producers hold still. The joint owner keeps infall, water and radiation and nests a rules-11 owner unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
|
||||
namespace evo::biology {
|
||||
namespace {
|
||||
// Four effects over seven capabilities. IDs are stable and carry no ranking;
|
||||
// Four effects over eight capabilities. IDs are stable and carry no ranking;
|
||||
// photosynthesis (ADR-0175) appends IDs 29-32, so every earlier ID is unchanged;
|
||||
// they exist to order candidates canonically and to name one across calls.
|
||||
constexpr std::array<MutationOperator, 4 * capability_count> catalog = [] {
|
||||
std::array<MutationOperator, 4 * capability_count> entries{};
|
||||
@@ -38,7 +39,7 @@ constexpr std::array<MutationOperator, 4 * capability_count> catalog = [] {
|
||||
constexpr std::uint32_t adjustment_step(const std::array<CapabilitySpec, capability_count>& table,
|
||||
Capability kind, std::uint32_t schema,
|
||||
std::uint32_t current) noexcept {
|
||||
if (schema == genome_schema_v4)
|
||||
if (schema == genome_schema_v4 || schema == genome_schema_v5)
|
||||
return current / 10 == 0 ? 1 : current / 10;
|
||||
const auto& limits = table[static_cast<std::size_t>(kind)];
|
||||
const auto span = limits.maximum - limits.minimum;
|
||||
@@ -48,10 +49,11 @@ constexpr std::uint32_t adjustment_step(const std::array<CapabilitySpec, capabil
|
||||
|
||||
std::uint32_t acquired_start(Capability kind, const CapabilitySpec& limits) noexcept {
|
||||
const auto& p = primitive_founder_parameters;
|
||||
const auto value = kind == Capability::movement ? p.movement
|
||||
: kind == Capability::ingestion ? p.ingestion
|
||||
: kind == Capability::reproduction ? p.reproduction
|
||||
: limits.minimum;
|
||||
const auto value = kind == Capability::movement ? p.movement
|
||||
: kind == Capability::ingestion ? p.ingestion
|
||||
: kind == Capability::reproduction ? p.reproduction
|
||||
: kind == Capability::photosynthesis ? photosynthesis_acquired_start
|
||||
: limits.minimum;
|
||||
return std::clamp(value, limits.minimum, limits.maximum);
|
||||
}
|
||||
|
||||
@@ -134,13 +136,14 @@ std::optional<GenomeDraft> apply(const Genome& genome, const MutationOperator& e
|
||||
break;
|
||||
}
|
||||
case MutationEffect::acquire:
|
||||
if (present) {
|
||||
// An empty range (photosynthesis before schema 5) is not acquirable at all.
|
||||
if (present || limits.maximum < limits.minimum) {
|
||||
return std::nullopt;
|
||||
}
|
||||
// Schema 4 starts an acquired capability at the founder's value (a percentage of
|
||||
// the minimum, zero speed for instance, would never grow); otherwise the minimum.
|
||||
draft.capabilities.push_back({entry.target,
|
||||
genome.schema_version() == genome_schema_v4
|
||||
genome.schema_version() >= genome_schema_v4
|
||||
? acquired_start(entry.target, limits)
|
||||
: limits.minimum,
|
||||
0});
|
||||
|
||||
Reference in New Issue
Block a user