Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008784Dwarf FortressDwarf Mode -- Jobs, Assignment of Jobspublic2015-02-03 13:162015-02-03 13:16
Assigned To 
PlatformPCOSWindowsOS Version8.1
Product Version0.40.24 
Target VersionFixed in Version 
Summary0008784: Job distance calculation gives too high priority to different Z level
DescriptionIt seems job distance calculation for miners (at least) changed between 0.40.19 and 0.40.23. Now (0.40.24), if you designate digging of a number of rooms above each other connected by a staircase to the side, the miner will dig a couple of tiles, run to a different level, dig a couple of tiles... Thus spending most of the time running back and forth.
Additional InformationI assume the behavior is a result of a distance comparison that ignores the actual path in order to reduce the CPU cost. However, since dwarves basically cannot climb (and certainly not through rock), equating Z level distance with X/Y distance generally leads you astray.

I'd suggest the following modification:
Make the basic check if there is a Z level difference between the target and the destination, and if so, add a fixed "level change cost" (probably somewhere in the range 10-100 tiles, I'd guess around 30) to the computed distance to handle that vertical distance usually results in the use of stairs somewhere off to the side. This level hysteresis should cost almost nothing in CPU terms.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-02-03 13:16 PatrikLundell New Issue

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker