M11-PT-001: wildlife steering stays within the intent length limit
Foundation / checks (checks) (push) Successful in 45m24s
Foundation / checks (deploy) (push) Successful in 4m8s
Foundation / checks (ecs) (push) Successful in 2m18s
Foundation / checks (network) (push) Successful in 19m39s
Foundation / checks (postgres) (push) Successful in 44m48s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / checks (client) (push) Successful in 17m4s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 3m10s
Foundation / image (push) Successful in 3m18s
Foundation / checks (checks) (push) Successful in 45m24s
Foundation / checks (deploy) (push) Successful in 4m8s
Foundation / checks (ecs) (push) Successful in 2m18s
Foundation / checks (network) (push) Successful in 19m39s
Foundation / checks (postgres) (push) Successful in 44m48s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / checks (client) (push) Successful in 17m4s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 3m10s
Foundation / image (push) Successful in 3m18s
DEV region 6 stopped at tick 7144 (stall log: append error=13 lives=10, region_step).
The wildlife controller steered toward food by scaling the larger component to 1000, so
a diagonal heading such as {1000, 800} was longer than a cellular intent may be; the
owner refused it, failing the tick, and the deterministic controller asked again every
tick. Earlier tests only had buds already touching food, so none moved.
wildlife_toward scales each component by the exact length, truncates toward zero and
pulls in any rounding excess. A regression test reproduces the refusal and accepts the
steered intent; another checks length, direction and speed over a grid of offsets.
No history changes: the refused ticks were never committed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,10 @@ inline constexpr std::uint64_t wildlife_bud_interval_ticks = 20; // 1 s
|
||||
inline constexpr std::uint64_t wildlife_wander_interval_ticks = 40; // 2 s
|
||||
inline constexpr std::int16_t wildlife_full_speed = 1'000;
|
||||
|
||||
// Full speed toward (dx, dy): the intent's length is at most wildlife_full_speed, as a
|
||||
// cellular intent requires (a longer one is refused and fails the whole tick).
|
||||
[[nodiscard]] biology::CellularIntent wildlife_toward(std::int64_t dx, std::int64_t dy) noexcept;
|
||||
|
||||
// One intention per wildlife life (zero account), sorted by life id: bud when the reserve
|
||||
// funds one, else steer to and feed from the nearest perceived patch holding energy,
|
||||
// else wander. Owned lives are left to their players.
|
||||
|
||||
Reference in New Issue
Block a user