Long-haul bot travel wedges: horizon-bounded coarse routing stalls on cross-map journeys #188
Labels
No labels
bug
ci-cd
client
epic:security-hardening
feature
optimization
priority:high
priority:low
priority:medium
server
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
BlackLobster/Server#188
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bots on long cross-map journeys wedge because coarse-route pathfinding is horizon-bounded.
Game.Bot.Navigation.build_route/2runs A* with@route_max_distance(64); when the destination is farther than that, the search returns a best-effort partial (or the collision-blind straight-line fallback), so the sampled waypoints don't actually reach the goal and the walker stalls at the far edge of the horizon, re-routes, and recover-teleports on a loop.This is the residual tail after the Edgeville wilderness-ditch fix (#186) and the gatherer/ditch-approach work: two smaller wedge populations remain, both the same root cause.
Observed live (persisted fleet,
scripts/probe_stuck_bots.exs):(3107,3353)withpath_goal(3107,3520)(~167 tiles north), A* returns partials that end progressively closer but never arrive.{3021,3640},{3290,3680},{3349,3700}etc., same shape.These are low-volume (a handful of bots each) compared to the ditch pileup, but they contribute to the ongoing
Nav[...]churn and the affected bots make no progress while wedged.Fix directions to weigh:
build_routefrom each reached partial-path endpoint so a long journey walks as a sequence of collision-aware segments rather than one horizon-bounded search.@route_max_distancenow that A* is much cheaper post-overhaul (refactor/pathfinding-perf), with a cost check at fleet scale.seed_routeprecedent).Repro: boot the persisted fleet, soak ~5 min,
scripts/probe_stuck_bots.exs— the remaining wedged bots after the ditch/approach fixes are these long-haul ones (histogram theirpath_goal).Confirmed the Falador-west rotation-gatherer wedges are this same class, not a data bug.
A rotation bot at (2936,3355) with path_goal (2925,3364): A* from the east (its approach side) returns NO PATH even at max_distance 128, but (2925,3364) is reachable in 7-14 steps from the west/south/north. It is walled off from the east and needs a route around the Falador wall that overruns the coarse-route horizon, so the general long-route fix here should clear these too.
Separately, the ditch-approach follow-up (bots stranded ON the Edgeville ditch near the buildings because the approach/exit rows are walled) was fixed on
fix/nav-gatherer-chokepoints—WildernessDitch.crossable_approach/1now picks a column clear on both sides. The truly-stuck bots remaining after that fix are the long-haul travellers tracked in this issue.