View Issue Details

IDProjectCategoryView StatusLast Update
0001074Dwarf FortressPathfindingpublic2014-05-19 16:39
Reporterking doom Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version0.31.02 
Summary0001074: Dwarves choose far-away stones instead of nearby ones
DescriptionI've noticed that all the dwarves I have that use rock to craft - masons and stonecrafters and mechanics, will ignore available stone in the tile next to their workshops to run across the fort and grab stone that my miners have just dug out. The stone next to the workshops is not forbidden, hidden, locked away, unavailable or economic rock they have been told not to use, nor have the stockpiles next to the workshop emptied, it is filled with the same rock they are spending five minutes running across the fort to grab.
Steps To ReproduceBuild a workshop that uses stone to make goods. Make a stone stockpile next to it. Set the workshop on repeat, then on the other side of the fort start your miner digging. The dwarves using the workshop will ignore the nearby materials to gather newly mined stone.
Additional InformationThe location of the dwarf when he begins the task has no bearing on the rock he selects, he will always go for the freshly dug rock. I've seen dwarves come off a break and fixate on freshly dug rock despite the workshops and rock stockpile being between them and the miners, so it isn't a case of finish task>grab nearest rock>take to workshop.
Tagscrafting, pathfinding, Save Included

Relationships

has duplicate 0003742 resolveduser6 Dwarves use random stones 
related to 0007208 assigneduser6 Workers will grab the resources closest to them when they take the job rather than the resource closest to workshop 

Activities

Draco18s

2010-04-13 06:27

reporter   ~0003242

Are the miners directly below the shops?

king doom

2010-04-13 06:52

reporter   ~0003246

No, the miners are several Z levels further up and quite far away from a horizontal standpoint as well, the rock stockpiles are closer.

Zeffrin

2010-04-13 06:59

reporter   ~0003247

I've noticed this too, but in my case maybe they were closer to the other rock through the ground, but they walk past rocks on the same level and the next to get to the one which has just been dug out

user6

2010-04-13 08:28

  ~0003258

Last edited: 2010-04-13 08:55

This one's been suspected for forever but Toady's never gotten a reproducing test case. If the behavior in your save survives through a save/load AND reproduces in 31.03 (which came out last night: http://www.bay12games.com/forum/index.php?topic=54115.0), then please upload it.

Kumquat

2010-04-26 16:11

reporter   ~0005199

Last edited: 2010-06-14 23:53

Something like this happened to me too. I dug down 50 levels deep in search of lava and some dorfs came and picked up the freshly mined rock into a stockpile, while the upper levels and the mineshaft were still loaded with loose rock.

UPDATE: I suspect the actual problem is that stockpiles are filled newest-stockpile-first, newest-item-first. Crafters looking for material go for the nearest applicable, but stockpile filling goes for the newest.

user6

2010-07-16 09:10

  ~0010424

Reminder sent to: king doom

Do you have a save demonstrating this problem?

king doom

2010-07-16 11:52

reporter   ~0010441

I've tried to obtain one, but it's inconsistent - occasionally the dwarves will take stuff near to them, occasionally they will take stuff from miles away. From the look of it, they don't seem to take travel across Z-levels into account, the 'find a rock' pathfinding seems to work as though the entire fort was a single totally open level and just finds a rock as the crow flies, then the dwarf wanders across the level he's on, donw three flights of stairs, across half of that level and grabs a rock right under the area the workshop is, but three floors down, rather than getting a rock on the same z level six tiles away.

kwieland

2010-07-16 14:16

reporter   ~0010448

I was under the impression that when the job is issued (for example make a mechanism) that the dwarf looks for the closest rock to where they are at that time, which could be miles away from the workshop. Does that explain your observations? Also, z-levels only count as one square, so if you have a stone 15 layers deep that is equivalent to 15 tiles in x or y away. Obviously the actual pathing time would be quite a bit different for those two cases.

Rafal99

2010-07-16 15:26

reporter   ~0010453

Last edited: 2010-07-16 15:53

My bet is that all the rock that is close to his workshop is already tasked for constructions. Only the newest rock is not.
Had same thing happen in my fortress where mason complained about no non-economic rock while there was about 100 boulders stockpiled in his burrow. The problem was they all were tasked for wall building already.

Are you building anything from the type of rock in question?

king doom

2010-07-23 05:59

reporter   ~0010865

I use rock blocks for construction, and I have all the spare rock my miners dig up hauled and dumped into one tile set so that all my workshops are equally spaced around it (and yes, I unforbid the stuff after it's been dumped) so that I avoid the problem Rafal99 mentioned - I hate seeing rocks cluttering my fort waiting to be used in something, so I don't use them. I tend to work one floor at a time, so there's always at least ten screens worth of rock sitting in the heap, waiting to be used, but they still run off across the map for freshly mined stuff randomly.

Rhenaya

2010-08-03 21:58

reporter   ~0011469

just wanted to report this same issue, as it gets annoying.

just an example:

build a mason workshop and but a neat obsidian stockpile, with 100 obsidian stones clearly not used in another job, right next to it...
mason workshop and stockpile is 15 tiles away from mason, who is in the dining hall idle
3 z level below the dining hall is a microline mining going on.

he will then run the 50 tiles around to get down to that 3 z level microline stone (or whatever), just because it was near him as he started construction, to haul it back, were you actually wanted obsidian stuff made from the workshop.

this is seriously annoying and a behaviour changed from

as you see footkerchief you wont need a save demonstrating, you can easily reproduce that behaviour, it works with all jobs. like the furnace operator will get a fresh stone out of the cavern if it was less tiles from him as the smelter stockpile.

the only workaround so far would be to put all dwarfs into a burrow, but thats just more annoying and genereates lots of error messages.

Rhenaya

2010-08-03 22:08

reporter   ~0011470

or in short: dwarfs that start a job at a workshop will look for the next material near their actuall place on which they picked the job, instead of near the workshop, of course if you produce 10 things at once, only the first one will be picked from afar, as the next ones will be likely near the workshop anyway

user6

2010-11-29 18:44

  ~0014305

http://dffd.wimbli.com/file.php?id=3500
twilightdusk posted this save at duplicate report 0003742:0014301

FlyingBishop

2011-01-04 19:40

reporter   ~0014787

The big thing is it would be nice if they used pathfinding instead of direct as the ghost-travels distance. I've got a large magnetite cluster that spans several z-levels, and a smelter plopped right in the middle of the cluster. Rather than picking up the magnetite right next to the shop, dwarves climb down the stairs and pick up one that's "closer" when you compute the distance, but neglect the stone on the same level.

But I guess that may be a tradeoff until we get a pathfinding algorithm that's cheap enough to call every time someone gets materials for a job.

kwieland

2011-03-24 17:00

reporter   ~0016534

Here is another save. For this save there is a siege operator on z=119 (hotkey F6). He will go to z=139 (+20) and then another 10 or so in the x and y direction. However, there is a granite rock <8 tiles away from the catapult on the same z level. If you turn off the catapult on Z=89 and disable the other siege operator, it is more evident. http://dffd.wimbli.com/file.php?id=4025

Orkel2

2011-03-25 13:04

reporter   ~0016588

Happening to me too. Dwarves go deep into the caverns to get rocks for stuff like crafts or stone pots, whereas there's perfectly usable stone in the level right below them.

grayfox

2012-06-08 06:43

reporter   ~0022912

This bug was only a little bit annoying before. It was tolerable, but now it's completely frustrating. It's ruining minecarts, at least for the purpose of stone hauling (probably not other items though). Most of the time, a dwarf goes 10 miles away, walking past stone that's clearly only a few tiles away (literally, only about one or two tiles from the stockpile), walking past the stop where the stone is supposed to be delivered, only to grab stone presumably from where he was standing when he decided to take the job.... and take it all the way back past the destination.

johndough

2014-05-19 08:01

reporter   ~0024762

This bug is still present: https://www.dropbox.com/s/w98xh1t15ul2jad/masonbug.zip

In that save the doctor working as a mason will always run into the mountain to fetch stone to build a floor, despite the same stone type being available in a stockpile next to the building site.

Quietust

2014-05-19 11:40

reporter   ~0024763

Last edited: 2014-05-19 11:43

johndough: what you're seeing is totally unrelated to this bug report and is behaving exactly as expected, because you designated the floors for construction (and told it which exact stones to use for each tile) before you designated the stockpile and allowed it to fill, and as long as the stones are linked to the "construct building" jobs, they will never be stockpiled.

johndough

2014-05-19 16:39

reporter   ~0024765

Quietust: The stockpile to the left most certainly wasn't designated after the floor construction.

Issue History

Date Modified Username Field Change
2010-04-13 03:29 king doom New Issue
2010-04-13 03:33 king doom Tag Attached: crafting
2010-04-13 03:33 king doom Tag Attached: pathfinding
2010-04-13 06:27 Draco18s Note Added: 0003242
2010-04-13 06:52 king doom Note Added: 0003246
2010-04-13 06:59 Zeffrin Note Added: 0003247
2010-04-13 08:28 user6 Note Added: 0003258
2010-04-13 08:55 user6 Note Edited: 0003258
2010-04-26 16:11 Kumquat Note Added: 0005199
2010-06-14 23:53 Kumquat Note Edited: 0005199
2010-07-16 09:09 user6 Tag Attached: AWAITING UPDATE
2010-07-16 09:10 user6 Note Added: 0010424
2010-07-16 11:52 king doom Note Added: 0010441
2010-07-16 14:16 kwieland Note Added: 0010448
2010-07-16 15:26 Rafal99 Note Added: 0010453
2010-07-16 15:31 Rafal99 Note Edited: 0010453
2010-07-16 15:53 Rafal99 Note Edited: 0010453
2010-07-23 05:59 king doom Note Added: 0010865
2010-08-03 21:58 Rhenaya Note Added: 0011469
2010-08-03 22:08 Rhenaya Note Added: 0011470
2010-11-29 07:33 user6 Relationship added has duplicate 0003742
2010-11-29 07:40 user6 Summary Dwarves only use the freshest rock! => Dwarves choose far-away stones instead of nearby ones
2010-11-29 18:44 user6 Note Added: 0014305
2011-01-04 19:40 FlyingBishop Note Added: 0014787
2011-03-24 17:00 kwieland Note Added: 0016534
2011-03-25 13:04 Orkel2 Note Added: 0016588
2011-03-28 06:36 user6 Relationship added has duplicate 0004373
2011-03-28 06:36 user6 Relationship deleted has duplicate 0004373
2012-06-08 06:43 grayfox Note Added: 0022912
2013-09-23 09:11 user6 Tag Detached: AWAITING UPDATE
2013-09-23 09:12 user6 Tag Attached: Save Included
2014-05-19 08:01 johndough Note Added: 0024762
2014-05-19 11:40 Quietust Note Added: 0024763
2014-05-19 11:43 Quietust Note Edited: 0024763
2014-05-19 16:39 johndough Note Added: 0024765
2014-07-13 09:14 user6 Relationship added related to 0007208