View Issue Details

IDProjectCategoryView StatusLast Update
0001903Dwarf FortressDwarf Mode -- Jobs, Generalpublic2010-06-09 06:45
ReporterShaggy Frog Assigned Touser6 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version0.31.03 
Summary0001903: Stone underneath workshops preferred to stone next to workshops
DescriptionWhen choosing stone for a workshop task, stone directly beneath the workshop on a lower Z-level is preferred over stone immediately next to workshop, regardless of real distance.
Steps To Reproduce1. Build a stone-using workshop and set a stockpile of stone next to it.
2. Dig out a tunnel directly beneath workshop (miners need to leave stone behind)
3. Start a task to build something with stone
4. Dwarf will choose tile directly beneath the workshop on a lower Z-level instead of taking the stone that is actually closest
Additional InformationIf you dig a second tunnel after the first, the stone in the second tunnel will be used after the stone in the first tunnel is used up.

My guess is that the dwarf is calculating the path to the nearest stone but ignoring the fact that stone at a deeper Z-level may not actually be closer to stone at the same Z-level but a different X/Y position. (i.e. pathfinding is broken)
TagsNo tags attached.

Activities

user6

2010-05-16 14:23

  ~0006807

The intended behavior is that it calculates the straight-line distance to the items, since the real pathfinding distance is expensive to calculate when there are many candidate items.

If they're preferring items that have a greater straight-line distance than the ones next to the workshop, then that's a bug and it would be helpful to upload a save demonstrating the problem to http://dffd.wimbli.com/

(also, make sure your [z] -> Stones settings aren't preventing them from using the ones next to the workshop)

Shaggy Frog

2010-05-16 14:40

reporter   ~0006808

Well this intended behaviour is clearly sub-optimal and actually very annoying.

The real pathfinding distance shouldn't be complicated to calculate at all. Using iterative-deepening depth-first search should be very quick -- since there's probably a stockpile of stone next to a workshop, it should find a candidate stone very, very quickly.

I think it would be overkill to upload a save demonstrating the problem since it's trivial to reproduce.

The stones settings are not preventing the dwarf from using the nearby stone.

user6

2010-05-16 15:07

  ~0006809

Last edited: 2010-05-16 15:08

Well this intended behaviour is clearly sub-optimal and actually very annoying.

The real pathfinding distance shouldn't be complicated to calculate at all. Using iterative-deepening depth-first search should be very quick -- since there's probably a stockpile of stone next to a workshop, it should find a candidate stone very, very quickly.


I agree, but that places this report in Suggestions territory (currently we're still using the forum for suggestions, not the tracker). There are already a couple threads on this topic:

http://www.bay12forums.com/smf/index.php?topic=31585.0 (this is probably the one to bump)
http://www.bay12forums.com/smf/index.php?topic=23548.0

Feel free to reopen this report if it turns out there's a real bug (i.e., if they're preferring items that have a greater straight-line distance than the ones next to the workshop).

Issue History

Date Modified Username Field Change
2010-05-16 14:11 Shaggy Frog New Issue
2010-05-16 14:23 user6 Note Added: 0006807
2010-05-16 14:40 Shaggy Frog Note Added: 0006808
2010-05-16 15:07 user6 Note Added: 0006809
2010-05-16 15:08 user6 Note Edited: 0006809
2010-05-16 15:08 user6 Status new => resolved
2010-05-16 15:08 user6 Resolution open => no change required
2010-05-16 15:08 user6 Assigned To => user6
2010-06-09 06:45 Toady One Status resolved => closed