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,3 +1,4 @@
|
||||
#include "evo/biology/founder.hpp"
|
||||
#include "evo/biology/mutation.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -314,7 +315,7 @@ void invalid_contexts_are_refused() {
|
||||
// An unsupported development version leaves no eligible operator at all,
|
||||
// because every successor fails to derive a budget.
|
||||
auto source = draft();
|
||||
source.development_version = 4;
|
||||
source.development_version = 5;
|
||||
const auto future = build(source);
|
||||
const auto empty = mutation_candidates(future, context(1));
|
||||
CHECK(!empty && empty.error() == MutationError::no_candidates);
|
||||
@@ -325,7 +326,8 @@ void invalid_contexts_are_refused() {
|
||||
// a schema 1 lineage is never migrated by mutating, and a schema 2 one steps per second.
|
||||
// Schema 3 (rules 6) steps a third as far: 1/300 of the range.
|
||||
void successors_keep_their_parents_schema() {
|
||||
for (const auto schema : {genome_schema_v1, genome_schema_v2, genome_schema_v3}) {
|
||||
for (const auto schema :
|
||||
{genome_schema_v1, genome_schema_v2, genome_schema_v3, genome_schema_v4}) {
|
||||
auto source = draft();
|
||||
source.schema_version = schema;
|
||||
source.capabilities.push_back(
|
||||
@@ -333,7 +335,8 @@ void successors_keep_their_parents_schema() {
|
||||
const auto parent = build(source);
|
||||
const auto step = schema == genome_schema_v1 ? 1'000U // 1/100 of the range.
|
||||
: schema == genome_schema_v2 ? 20'000U
|
||||
: 6'666U; // 2,000,000 / 300.
|
||||
: schema == genome_schema_v3 ? 6'666U // 2,000,000 / 300.
|
||||
: 100'000U; // A tenth of 1,000,000.
|
||||
|
||||
bool adjusted = false;
|
||||
// Offers are seeded; search seeds (deterministically) for the movement adjustment.
|
||||
@@ -356,6 +359,39 @@ void successors_keep_their_parents_schema() {
|
||||
}
|
||||
}
|
||||
|
||||
// ADR-0137 (schema 4): a step is a tenth of the current value, down as well as up, and an
|
||||
// acquired capability starts at the founder's value instead of the schema minimum.
|
||||
void schema_four_steps_by_percentage() {
|
||||
const auto find = [](const Genome& parent, Capability target, MutationEffect effect) {
|
||||
for (std::uint64_t seed = 1; seed <= 400; ++seed) {
|
||||
const auto offered = mutation_candidates(parent, context(seed, 8));
|
||||
CHECK(offered);
|
||||
for (const auto& candidate : offered->candidates)
|
||||
if (candidate.target == target && candidate.effect == effect) {
|
||||
const auto successor = select_mutation(parent, context(seed, 8), *offered,
|
||||
candidate.operator_id, 99, 42);
|
||||
CHECK(successor.has_value());
|
||||
return successor.value_or(parent);
|
||||
}
|
||||
}
|
||||
throw std::runtime_error("no such candidate");
|
||||
};
|
||||
auto source = draft();
|
||||
source.schema_version = genome_schema_v4;
|
||||
source.capabilities.push_back({Capability::movement, 200, 0});
|
||||
const auto swimmer = build(source);
|
||||
CHECK(*find(swimmer, Capability::movement, MutationEffect::adjust_up)
|
||||
.parameter(Capability::movement) == 220);
|
||||
CHECK(*find(swimmer, Capability::movement, MutationEffect::adjust_down)
|
||||
.parameter(Capability::movement) == 180);
|
||||
source.capabilities.back().parameter = 5; // Below ten, a step is still 1.
|
||||
CHECK(*find(build(source), Capability::movement, MutationEffect::adjust_up)
|
||||
.parameter(Capability::movement) == 6);
|
||||
source.capabilities.pop_back();
|
||||
const auto still = build(source);
|
||||
CHECK(*find(still, Capability::movement, MutationEffect::acquire)
|
||||
.parameter(Capability::movement) == primitive_founder_parameters.movement);
|
||||
}
|
||||
void mutation_funding_is_exact_and_atomic() {
|
||||
const auto parent = build(draft());
|
||||
const auto context_value = context(33, 8);
|
||||
@@ -415,6 +451,7 @@ int main() try {
|
||||
invalid_contexts_are_refused();
|
||||
every_eligible_operator_is_offered_and_none_is_favoured();
|
||||
successors_keep_their_parents_schema();
|
||||
schema_four_steps_by_percentage();
|
||||
mutation_funding_is_exact_and_atomic();
|
||||
std::cout << "PASS mutation catalog, uniform seeded offers and guarded selection\n";
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user