A site can be paired with a bank it cannot walk to #243
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?
Bot.Sitespairs a gathering site with the nearest bank bychebyshev/2inside the same map area, and nearest-by-distance is not the same question as
can a bot walk there. A bank sealed in a small room is caught now; a bank on
the far side of a river or a gate is not.
Measured
A net fisher spawned at the Lumbridge-side spot
{0, 3239, 3145}, whosederived bank is Al Kharid at
{0, 3269, 3164}— 30 tiles bychebyshev/2,and on the other side of the river:
Nothing walkable connects them: crossing wants the toll gate, which the route
planner will not open. The bot failed its leg five times,
Bot.Travel.recover/2relocated it to a bank, and it spent roughly ninety seconds cycling before it
happened to re-roll a ground on its own side of the water and carried on.
What already covers half of it
Bot.Sites.enclosure/1(added with the bank-stand fix) runs a bounded3,000-tile fill from each bank's stand at derivation. A fill that saturates is
the open world and pairs with anything; one that stops short is a pocket, and
only a site standing inside it may have that bank. That catches the Cooking
Guild — fourteen tiles behind a door — and twenty-four others.
It cannot catch this one. The fill saturates on both banks of a river, so
both sides look like the same open world to it. The rule is "not shut in a
small room", not "reachable from here".
What would actually answer it
Connectivity between the site and the bank, which is a component identity
rather than a distance. Ideas, cheapest first:
pass over the collision map, and every consumer gets it — including
nearest_bank/1, which is asked at runtime and today can still hand awedged bot a bank across a river.
found, accepting a bounded search per site (~900 of them at derivation).
Both want a decision about doors: a gate a bot could open makes two components
one, and nothing opens a door out in the open world today —
Bot.Obstacle.between/2asks whether the bot is shut in rather than whetherthe destination is, so outside a sealed region the fill hits its budget,
answers not shut in, and no door is ever tried. Whatever labels components
has to say what it assumes about doors.
Related, and what it costs today
Sites whose only bank in range is unreachable are worked and then abandoned,
which reads as a bot that wandered off. The wedge is survivable — the goal
re-rolls a ground eventually — but it burns a recovery relocation each time,
and
Bot.Travel.recover/2relocating into a place it cannot leave is its ownhazard.
Fixed on main:
Bot.Sitesnow pairs a site with a bank only whenBot.Route.reachable?/3finds a walkable route, so a bank across a river or a toll gate is no longer paired. The runtime half,nearest_bank/1still answering by distance, is carried over on forge.home.arpa as https://forge.home.arpa/Revenant/Server/issues/45.