Pathfinding issue?

Started by nightbringer57, May 09, 2014, 03:45:31 PM

Previous topic - Next topic

nightbringer57

Pathfinding is probably still WiP, but I thought I may report this, just in case.


in this situation, my cook goes for the nearest potato pile, whatever the real distance (including walls, etc) is. So, she walks a lot more and a lot more slowly through the whole potato stockpile.
Not that bad of a problem, though :p
Obviously, she should choose the pile which is nearest to the door.

Coenmcj

Yeah I've noticed this aswell tends to be a bit obnoxious when they don't choose the path of least resistance, but straight at the nearest target.

Also...  nice potato lights. :)
Moderator on discord.gg/rimworld come join us! We don't bite

SSS

This is most annoying for me with stonecutting. They seem to love picking stones far away from the table.

This has be exasperated with my most recent colony, which is in the middle of the map and enclosed on all sides. If I open only one "gate", they'll try to walk aaaaaaaaaaall the way around the colony to get a stone. If I don't realize what they're doing, I'm dealing with a starving, tired colonist on the brink of mental collapse by the time they get back. (Needless to say, I've started opening multiple gates.)

Coenmcj

Quote from: SSS on May 09, 2014, 09:43:56 PM
This has be exasperated with my most recent colony, which is in the middle of the map and enclosed on all sides. If I open only one "gate", they'll try to walk aaaaaaaaaaall the way around the colony to get a stone. If I don't realize what they're doing, I'm dealing with a starving, tired colonist on the brink of mental collapse by the time they get back. (Needless to say, I've started opening multiple gates.)

This ^ has almost led me to insanity myself once or twice... Especially when they'll path around the entirety of the fortress just to get to a location technically 4 metres away, but in essence is about 200.

This and the fact that if they were already pathfinding to their targets when a wall or obstacle that would offer a faster route is demolished (through any means) they won't recalculate their path, they'll keep going along their original one until you draft/undraft them.

Rimworld pathfinding is so much fun.
Moderator on discord.gg/rimworld come join us! We don't bite

Neone


Coenmcj

"Refactored region-graph item finding and reachability checking to more clearly handle various cases of different characters being willing/able to pass through various kinds of doors."
Cheers Neone
Moderator on discord.gg/rimworld come join us! We don't bite

Tynan

Yaay! Two weeks of work to fix this (among other issues, of course).

However, in this case it probably wouldn't make a difference because the regions are big enough that the cook would probably process the whole potato pile in one region and thus take the closest one. This is a difficult case because to get the "right" answer the cook would have to check distance from the door.

Which is actually possible, now that I think about it, if they order the items by distance from the previous region... *starts frantically scribbling notes*

For cases like the stonecutting mentioned above, the regions thing should really help. However, if the stone is far enough away (about 40 cells path distance) they'll drop the region algorithm and switch back to the old global search method there too.
Tynan Sylvester - @TynanSylvester - Tynan's Blog