feat(cellular): random founder spawns, tunable thrust cost, commit timing
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 1m6s
Foundation / checks (deploy) (push) Successful in 5m41s
Foundation / postgres-tools (push) Successful in 1m33s
Foundation / image (push) Successful in 4m42s
Foundation / server-image (push) Successful in 4m55s

Playtest feedback on region 10.

Rules-12 founders now start at a seeded random spot anywhere in the region (1 mm
clear of the edges, clear of other cells; seeded by world, region and the life's
identity so replay is exact). The provisioned sites remain the fallback.

Thrust energy is tunable: founder.thrust_cost_per_mille scales the metabolic
full-speed movement cost for thrust and braking (trial 250, a quarter of today's
cost). It is part of the liquid rules declared when a region opens, persisted in
the format-10 block's reserved slot (zero stands for the original 1,000), so
existing regions keep their meaning.

The server logs every cellular commit slower than 50 ms (and one in 60) with its
tick count and duration, to find what stalls the loop once a second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-22 06:40:12 -04:00
co-authored by Claude Opus 5.5
parent c94eca7d4e
commit af32af36ee
12 changed files with 108 additions and 12 deletions
+14 -3
View File
@@ -17,7 +17,8 @@ bool cellular_liquid_valid(const CellularLiquidRules& rules, biology::CellularAr
f.reverse_cost.value == 0 && d.merged_cap != 0 && d.bubble_radius_um != 0 &&
d.bubble_radius_um <= biology::max_cellular_deposit_radius_um && d.max_drift_q10 >= 0 &&
d.max_drift_q10 <= biology::cellular_velocity_limit_q10 &&
d.drift_decay_ppm < biology::cellular_drag_ppm_limit;
d.drift_decay_ppm < biology::cellular_drag_ppm_limit &&
rules.thrust_cost_per_mille != 0 && rules.thrust_cost_per_mille <= 10'000;
}
CellularLiquidRules cellular_liquid_rules(const biology::CellularTuning& t,
@@ -36,12 +37,22 @@ CellularLiquidRules cellular_liquid_rules(const biology::CellularTuning& t,
biology::cellular_velocity_q10_per_um_s),
.drift_decay_ppm = u32(t.food_induced_drift_decay_ppm_per_tick),
.merged_cap = static_cast<std::uint16_t>(t.food_merged_bubble_cap_multiple),
.bubble_radius_um = biology::cellular_mote_radius_um}};
.bubble_radius_um = biology::cellular_mote_radius_um},
.thrust_cost_per_mille = u32(t.founder_thrust_cost_per_mille)};
}
std::expected<biology::CellularHandling, biology::CellularHandlingError>
cellular_liquid_handling(const biology::Genome& genome, const biology::MetabolicBudget& budget,
const CellularLiquidRules& rules) {
return biology::derive_cellular_handling(genome, budget, rules.founder);
auto handling = biology::derive_cellular_handling(genome, budget, rules.founder);
if (!handling)
return handling;
const auto scaled = [&rules](accounting::Picojoules cost) {
const auto product = cost.value * rules.thrust_cost_per_mille;
return accounting::Picojoules{product / 1'000 + (product % 1'000 != 0 ? 1 : 0)};
};
handling->thrust_cost = scaled(handling->thrust_cost);
handling->reverse_cost = scaled(handling->reverse_cost);
return handling;
}
} // namespace evo::server