Long-haul bot travel wedges: horizon-bounded coarse routing stalls on cross-map journeys #188

Open
opened 2026-07-20 20:05:58 +00:00 by sickday · 1 comment
Owner

Bots on long cross-map journeys wedge because coarse-route pathfinding is horizon-bounded. Game.Bot.Navigation.build_route/2 runs 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):

  • Far travel toward a distant target — e.g. a PKer at (3107,3353) with path_goal (3107,3520) (~167 tiles north), A* returns partials that end progressively closer but never arrive.
  • Deep-wilderness destinations{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:

  • Chain/segment long routes: re-issue build_route from each reached partial-path endpoint so a long journey walks as a sequence of collision-aware segments rather than one horizon-bounded search.
  • Raise @route_max_distance now that A* is much cheaper post-overhaul (refactor/pathfinding-perf), with a cost check at fleet scale.
  • Predefined trunk routes / a coarse waypoint graph for the common cross-map corridors (the Sinclair fenced-bridge seed_route precedent).

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 their path_goal).

Bots on long cross-map journeys wedge because coarse-route pathfinding is horizon-bounded. `Game.Bot.Navigation.build_route/2` runs 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`): - **Far travel toward a distant target** — e.g. a PKer at `(3107,3353)` with `path_goal` `(3107,3520)` (~167 tiles north), A* returns partials that end progressively closer but never arrive. - **Deep-wilderness destinations** — `{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: - Chain/segment long routes: re-issue `build_route` from each reached partial-path endpoint so a long journey walks as a sequence of collision-aware segments rather than one horizon-bounded search. - Raise `@route_max_distance` now that A* is much cheaper post-overhaul (`refactor/pathfinding-perf`), with a cost check at fleet scale. - Predefined trunk routes / a coarse waypoint graph for the common cross-map corridors (the Sinclair fenced-bridge `seed_route` precedent). 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 their `path_goal`).
Author
Owner

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-chokepointsWildernessDitch.crossable_approach/1 now picks a column clear on both sides. The truly-stuck bots remaining after that fix are the long-haul travellers tracked in this issue.

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/1` now picks a column clear on both sides. The truly-stuck bots remaining after that fix are the long-haul travellers tracked in this issue.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
BlackLobster/Server#188
No description provided.