Cellular rules 7: percentage mutations, skilled budding, hunting wildlife (ADR-0137)
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
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>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "evo/biology/mutation.hpp"
|
||||
|
||||
#include "evo/biology/founder.hpp"
|
||||
#include "evo/core/random.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -32,14 +33,28 @@ constexpr std::array<MutationOperator, 4 * capability_count> catalog = [] {
|
||||
// (rules 6, 2026-10-15 balance) takes a third of that step: successor bodies differ a
|
||||
// third as much, so the matter a mutation needs falls with them (ADR-0118: the cost is
|
||||
// the body difference, never a discount).
|
||||
// Schema 4 (rules 7, ADR-0137) steps by a tenth of the current value instead (at least 1),
|
||||
// so a trait changes by a percentage and a lineage compounds.
|
||||
constexpr std::uint32_t adjustment_step(const std::array<CapabilitySpec, capability_count>& table,
|
||||
Capability kind, std::uint32_t schema) noexcept {
|
||||
Capability kind, std::uint32_t schema,
|
||||
std::uint32_t current) noexcept {
|
||||
if (schema == genome_schema_v4)
|
||||
return current / 10 == 0 ? 1 : current / 10;
|
||||
const auto& limits = table[static_cast<std::size_t>(kind)];
|
||||
const auto span = limits.maximum - limits.minimum;
|
||||
const std::uint32_t divisor = schema == genome_schema_v3 ? 300 : 100;
|
||||
return span / divisor == 0 ? 1 : span / divisor;
|
||||
}
|
||||
|
||||
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;
|
||||
return std::clamp(value, limits.minimum, limits.maximum);
|
||||
}
|
||||
|
||||
std::uint64_t mix(std::uint64_t hash, std::uint64_t value) noexcept {
|
||||
// Non-cryptographic combiner. No wall clock and no std::hash enters this.
|
||||
return hash ^ (value + 0x9e3779b97f4a7c15ULL + (hash << 6U) + (hash >> 2U));
|
||||
@@ -96,7 +111,8 @@ std::optional<GenomeDraft> apply(const Genome& genome, const MutationOperator& e
|
||||
if (!present) {
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto step = adjustment_step(table, entry.target, genome.schema_version());
|
||||
const auto step =
|
||||
adjustment_step(table, entry.target, genome.schema_version(), carried->parameter);
|
||||
// Refused rather than clamped: a clamp would make two operators agree
|
||||
// and would offer a no-op as a real choice.
|
||||
if (carried->parameter > limits.maximum - step) {
|
||||
@@ -109,7 +125,8 @@ std::optional<GenomeDraft> apply(const Genome& genome, const MutationOperator& e
|
||||
if (!present) {
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto step = adjustment_step(table, entry.target, genome.schema_version());
|
||||
const auto step =
|
||||
adjustment_step(table, entry.target, genome.schema_version(), carried->parameter);
|
||||
if (carried->parameter < limits.minimum + step) {
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -120,7 +137,13 @@ std::optional<GenomeDraft> apply(const Genome& genome, const MutationOperator& e
|
||||
if (present) {
|
||||
return std::nullopt;
|
||||
}
|
||||
draft.capabilities.push_back({entry.target, limits.minimum, 0});
|
||||
// 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
|
||||
? acquired_start(entry.target, limits)
|
||||
: limits.minimum,
|
||||
0});
|
||||
break;
|
||||
case MutationEffect::shed:
|
||||
if (!present) {
|
||||
|
||||
Reference in New Issue
Block a user