A gatherer walks past the site it is standing on two times in three #124

Closed
opened 2026-08-05 23:52:14 +00:00 by sickday · 0 comments
Owner

Bot.Goals.Fish's choosing_ground sorts the grounds it can work by distance,
takes the nearest three and picks one at random:

grounds
|> Enum.sort_by(&Sites.chebyshev(&1.position, snapshot.position))
|> Enum.take(3)
|> Enum.random()

The intent is fine — bots should not all pile onto one spot — but the ground the
bot is standing on gets no weight at all. A fisher spawned at a perfectly good
ground walks away from it two times in three, and fishing grounds are sparse
enough that the two runners-up are routinely hundreds of tiles off rather than
tens.

Observed

A harpooner and a cager spawned exactly on the Fishing Guild ground
(2598,3420) both set off east on the same tick, to a ground ~240 tiles away,
and wedged in the mountains without ever casting. The same pair spawned at
Catherby went to work immediately — the difference was only which of the three
the roll returned.

From the earlier net-fisher sitting: a fisher hiked past a spot 13 tiles away.

Why this is worth fixing rather than tuning

On its own it costs a bot some walking. Combined with the straight-line hop in
Bot.Travel it is the difference between a working bot and a permanently
wedged one, because the long trip it chose for no reason is exactly the trip
that wedges. The two together made a live sitting read as "the new kinds do not
work" when both kinds were fine — the fix for that sitting was to spawn a fleet
and keep whichever bots happened to roll the ground under their feet, which is
not a thing an operator should have to know.

Shape of a fix

Keep the spread, lose the pointless journey. Either:

  • Prefer the ground underfoot: if one of the candidates is within a short
    radius of the bot, take it rather than rolling; or
  • Weight the roll by distance so a ground ten times further is picked far
    less often than an equally-close alternative.

Bot.Goals.GatherAndBank picks sites the same way and deserves the same look —
tree and rock sites are dense enough that it has not bitten there yet, which is
luck rather than design.

`Bot.Goals.Fish`'s `choosing_ground` sorts the grounds it can work by distance, takes the nearest three and picks one at **random**: grounds |> Enum.sort_by(&Sites.chebyshev(&1.position, snapshot.position)) |> Enum.take(3) |> Enum.random() The intent is fine — bots should not all pile onto one spot — but the ground the bot is *standing on* gets no weight at all. A fisher spawned at a perfectly good ground walks away from it two times in three, and fishing grounds are sparse enough that the two runners-up are routinely hundreds of tiles off rather than tens. ### Observed A harpooner and a cager spawned exactly on the Fishing Guild ground (`2598,3420`) both set off east on the same tick, to a ground ~240 tiles away, and wedged in the mountains without ever casting. The same pair spawned at Catherby went to work immediately — the difference was only which of the three the roll returned. From the earlier net-fisher sitting: a fisher hiked past a spot 13 tiles away. ### Why this is worth fixing rather than tuning On its own it costs a bot some walking. Combined with the straight-line hop in `Bot.Travel` it is the difference between a working bot and a permanently wedged one, because the long trip it chose for no reason is exactly the trip that wedges. The two together made a live sitting read as "the new kinds do not work" when both kinds were fine — the fix for that sitting was to spawn a fleet and keep whichever bots happened to roll the ground under their feet, which is not a thing an operator should have to know. ### Shape of a fix Keep the spread, lose the pointless journey. Either: * **Prefer the ground underfoot**: if one of the candidates is within a short radius of the bot, take it rather than rolling; or * **Weight the roll by distance** so a ground ten times further is picked far less often than an equally-close alternative. `Bot.Goals.GatherAndBank` picks sites the same way and deserves the same look — tree and rock sites are dense enough that it has not bitten there yet, which is luck rather than design.
Sign in to join this conversation.
No labels
No milestone
No project
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
Revenant/Server#124
No description provided.