Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Stockpile Pathfinding  (Read 721 times)

cyclotis04

  • Bay Watcher
    • View Profile
Stockpile Pathfinding
« on: October 17, 2009, 12:44:24 am »

I've been playing DF for about a month now, and the biggest irritation to me is the path finding algorithm for (most noticeably) stockpiles. (I know there's a lot of path finding discussions, but I haven't had time to read through the hundreds of pages of suggestions, so if this has been covered, forgive me.) It appears to me that Dwarfs don't take any obstacles into account when trying to place items into stockpiles. They simply pick the closest stockpile, disregarding walls, floors, etc., to the item. For example, whilst tunneling under a mountain (side view):

Spoiler (click to show/hide)

A dwarf picking up the stone 'o' will haul it to stockpile B because it is only 'two' steps away, even tho the Dwarf must carry the stone over stockpile A. This drives me crazy, and seems to negate any purpose of traffic designations. This problem may exist in other path finding, but is made obvious by Dwarfs carrying items over the stockpile they should be storing them in. Also, Dwarfs will place items in the free stockpile square 'closest' to the item they picked up, resulting in items being shoved all against one wall, even when (for example) the access stairway is in the center of the nearly empty stockpile.
« Last Edit: October 17, 2009, 12:00:56 pm by cyclotis04 »
Logged

Foa

  • Bay Watcher
  • And I thought foxfire was stylish in winter.
    • View Profile
Re: Stockpile Pathfinding
« Reply #1 on: October 17, 2009, 01:21:55 am »

One, use teletype tags.

Spoiler: Fixed (click to show/hide)


Two, that is very true, when it comes to pathfinding they ignore any, and every obstacles in the way.
They always take the most direct way to the destnation, instead of the fastest way.

I've had dwarves take the route through the outer curtain courtyard route ( with it's many hazards ) rather than the unlocked bypass, because when the task was first registered, it used an 'a to b' waypoint plotting system instead of using an active waypoint map navigation and take the shortest route!
« Last Edit: October 17, 2009, 01:24:06 am by Foa »
Logged

Sunken

  • Bay Watcher
  • Wabewalker
    • View Profile
Re: Stockpile Pathfinding
« Reply #2 on: October 17, 2009, 01:37:56 am »

It's not so much about pathing itself as about choosing your destination in the first place. Pathing, once the destination is picked, is optimal (though not necessarily optimized!) AFAIK.

I think the discussions about hierarchical pathfinding will have as a spin-off effect that it will become cheap enough to actually search for the best destination at the same time as pathing. At least, I hope so.
Logged
Alpha version? More like elf aversion!