[A13] Pathfinding and equipment racks

Started by koisama, May 07, 2016, 12:58:29 PM

Previous topic - Next topic

koisama

Today I found my colonists strangely attracted to walking over equipment racks, which slows their movement.

Here are the screenshots:
http://i.imgur.com/glIPQvc.png
http://i.imgur.com/lYLa9HE.png
http://i.imgur.com/NZWgy2m.png

ison

@koisama and pestilenz, could you please upload the savefile? I couldn't reproduce the bug.

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

Amariithynar

I've noticed in arctic conditions I can clear a path along a wall of snow and concrete it for 100% movespeed and they'll still cross snowed on soil diagonally instead of walking over to the path that leads right to the door, which would be much faster; Maybe this is related?

milon

I reproduced it:



You can tell by the foot steps that Kazuki just walked over the southwest equipment rack, and Tail is about to walk over the northeast equipment rack.  See attached .zip with world & colony save.

At a guess, I'd say the pathing algorithm isn't considering everything on a tile that affects movement speed (or else isn't calculating the costs properly).  Tail is going to avoid the artwork, the silver, and the rock chunk, but she's not going to avoid the equipment rack.

[attachment deleted by admin - too old]

hwfanatic

#5
I think it may be a more general problem. Look at these guys intentionally avoiding a concrete pathway I have setup for them: http://i.imgur.com/XQW4aZv.png
Both drafted (Gallagher) and undrafted (Earl).

EDIT: This other screenshot may be an even better example, because of the unfinished section: http://i.imgur.com/odRxAwN.png

EDIT 2: At first glance, doesn't seem to affect paved tiles: http://i.imgur.com/G1M6eOU.png

matthiaskrgr

#6
I had similar issues where colonists would walk through crops although I had a paved way directly next to it.

EDIT: added screenshot

EDIT2:
It also seems a bit odd that the path from A to B often differs from the paths from B to A,

[attachment deleted by admin - too old]

hwfanatic

#7
They also seem to ignore cleared snow: http://i.imgur.com/JIZm6FJ.png
Am I supposed to clear where they walk, or are they supposed to walk where it is clear? https://imgflip.com/memegenerator/Futurama-Fry

ison

There was a bug with path costs on cells with snow. Fixed.

@milon I think that it's legitimately possible for it to be the best path available. Tail is about to walk over the equipment rack because otherwise she would have to take a longer path, so it's possible that it was the best choice even considering the fact that equipment rack slows movement a bit. Perhaps we could make equipment rack slow movement even more, so pawns would avoid walking over them.

So the only pathing weirdness (except for the issue with snow) I see here is this:
Quote from: matthiaskrgr on May 28, 2016, 09:50:34 AM
I had similar issues where colonists would walk through crops although I had a paved way directly next to it.

EDIT: added screenshot

EDIT2:
It also seems a bit odd that the path from A to B often differs from the paths from B to A,

Is it possible that there was a snow at these cells since loading the game? If not, then could you please attach the savefile?

matthiaskrgr

Nope, no snow.
In the attached savefile you only need to select all the pawns, I already sent them on their paths.
It is odd that a lot of them get different paths although they all walk through the same bottlenecks (1x1 squares) which *should* narrow down the optimal path.

[attachment deleted by admin - too old]

ison

I see, these paths are not optimal.

Tynan, should pawns always choose the best path available?

Tynan

No, our pathing algorithm by design does not attempt to find a perfect optimal path - just a good-enough one. That's how A* works. Finding perfect paths is too CPU-heavy.

I think this is working okay; it's not a serious issue or even a bug by the basic definition.
Tynan Sylvester - @TynanSylvester - Tynan's Blog