Cellular rules 8: pools and bubbles fed by contact (ADR-0136 step A)
Foundation / checks (checks) (push) Successful in 47m40s
Foundation / checks (client) (push) Successful in 17m27s
Foundation / checks (deploy) (push) Successful in 4m17s
Foundation / checks (ecs) (push) Successful in 4m31s
Foundation / checks (network) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 13m10s
Foundation / checks (postgres) (push) Successful in 20m54s
Foundation / image (push) Successful in 4m15s
Foundation / postgres-tools (push) Successful in 5m32s
Foundation / server-image (push) Successful in 7m15s
Foundation / checks (checks) (push) Successful in 47m40s
Foundation / checks (client) (push) Successful in 17m27s
Foundation / checks (deploy) (push) Successful in 4m17s
Foundation / checks (ecs) (push) Successful in 4m31s
Foundation / checks (network) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 13m10s
Foundation / checks (postgres) (push) Successful in 20m54s
Foundation / image (push) Successful in 4m15s
Foundation / postgres-tools (push) Successful in 5m32s
Foundation / server-image (push) Successful in 7m15s
Square patches invited camping and left the space between them empty. Rules 8 run on a format-2 habitat of deposits: - pools and single-nutrient bubbles at free micrometre centres, each with a stable id and a contact radius; the cellular-v7 opening scatters bubbles reproducibly from the genesis commit (three in ten in loose clumps) and lists pools with --pool; - every cell drains what it touches, up to its intake rate per tick, with no target; a pool gives at most a quarter of that rate; an emptied deposit disappears; - a dead cell's detritus breaks into one bubble per non-empty channel; - wildlife swims to the nearest non-empty deposit and feeds by touch. Bundle v9 (habitat 2) and schema v43 admit it. Session v11 carries the owner's 512 nearest deposits (id, centre, radius, shape, a drained flag and 16-bit amount codes) instead of patches; every other cellular message is v10's. The client asks for v11, draws bubbles (nutrient-coloured, pulsing while drained, popping when gone) and pools as puddles, slows near food and sends no feed target; the HUD summarises food in range. Earlier rules, regions and v10 clients are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,20 @@ steer_cellular(const CellularControls& controls, client::Intention intention,
|
||||
static_cast<double>(own->voxel.y) * 1'000'000 + static_cast<double>(own->y.value);
|
||||
const double extent = static_cast<double>(own->phenotype.extent);
|
||||
bool target_has_energy = false;
|
||||
// ADR-0136 (v11): deposits feed on contact, so no target; slow near any that
|
||||
// holds something (within 1 mm of its disc).
|
||||
for (const auto& d : perception->deposits) {
|
||||
if (std::ranges::all_of(d.amount_codes, [](auto code) { return code == 0; }))
|
||||
continue;
|
||||
const double cx = static_cast<double>(d.x_um), cy = static_cast<double>(d.y_um);
|
||||
const double gx = std::max({x - cx, cx - x - extent, 0.0});
|
||||
const double gy = std::max({y - cy, cy - y - extent, 0.0});
|
||||
if (controls.slow_near_food &&
|
||||
std::hypot(gx, gy) <= 1000.0 + static_cast<double>(d.radius_um) &&
|
||||
own->phenotype.movement_speed > 0)
|
||||
scale =
|
||||
std::min(scale, 500.0 / static_cast<double>(own->phenotype.movement_speed));
|
||||
}
|
||||
for (const auto& p : perception->patches) {
|
||||
if (p.energy_pj == 0 &&
|
||||
std::ranges::all_of(p.matter_fg, [](auto v) { return v == 0; }))
|
||||
|
||||
Reference in New Issue
Block a user