Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: Job Priorities Discussion  (Read 34471 times)

Granite26

  • Bay Watcher
    • View Profile
Job Priorities Discussion
« on: August 29, 2008, 02:37:33 pm »

So far, here's what's come up:

The major 'problem' is that dwarves don't always do things in the order we want them to.  While this is usually possible to micromanage, it takes away some of the fun of playing large fortresses. These fall into two catagories.  Dwarf priorities and Task priorities.

Issues:

    Dwarf priorities
        Skilled Dwarves will perform low skill tasks(hauling) rather than their assigned tasks.  When these tasks are removed, they grow bored or are idle. (As there aren't enough skilled tasks to keep them occupied)
        Fish, meat, skins, fat all spoil.  There is no way to make sure that these jobs get accomplished in a timely manner if the dwarf(s) with these jobs are also performing other labours.
        Rare and unusual jobs (like architecture) don't get enough use to keep them busy.  It's usually going to be a side job.  There's no way to keep these dwarfs occupied without massive micromanagement.
        Eating.  Military dwarves will decide if they are hungry or not when put on duty.  If they are, they'll eat before heading out.  That's backwards.  On-Call dwarves should eat when nothing else is up, but be willing to go hungry when the emergency fires are lit.

    Task priorities
        Certain order important tasks are done in the wrong order (usually mechanics).  Sometimes you want to build the windmills and mechanisms before you build the axels.  Also useful for build from the inside out type tasks. (No walling yourself in)
        No way to specify 'deep' exploratory mining versus the rooms you need now.
        Pull that lever NOW.  Sometimes there are fort emergencies.  At the extreme level, this includes the desire to have a civilian run across 1/7 magma while be chased by a werewolf  in order to pull the fortress lockdown before he's gibbed.  At a more sane level, just being able to say 'grab the closest dwarf and assign them this job' would solve a lot of heartache.
        Naturally low priority tasks may stagnate
        Cooking.  There's food ready to be cooked, but the cook is resting, partying, hauling rocks, or hunting for vermin.
        Miners will occationally grab jobs across the map from them rather than two squares from them.  Conversly, a miner will decide to work right next to the other miners, claiming an important square for the duration of his trip across the map.

There are a number of suggested fixes discussed below.
        List all open jobs in the jobs screen in order of priority, and allow users to find and change individual jobs
        Skilled versus unskilled.  Dwarves do skilled tasks first, then unskilled.
        Allow user to set priorities, either by number, or high/mid/low for a dwarf
        Allow user to set priorities, either by number, or high/mid/low for a specific job
        Allow user to set priorities, either by number, or high/mid/low for a job types.
                    Profiles could be saved by Dwarf Job Profile
        'Do Now' Toggle (on job screen) that grabs the nearest available (reassignable) dwarf and makes them do it.
        Refactor code to make the behaviors 'correct' without giving player controls (I.E. hardcode solutions to the big problems)
        Allow dwarves to 'steal' jobs from others when they are literally right there.  (Mining right next to it).  This is especially useful if one is traveling, and the other is using the high priority 'grab contiguous square' command.
        Economic Simulation:  Dwarves are already encouraged to do some jobs over others by the differing pay rates.  Allow dwarves to be responsive to this

This has been discussed as far back as 2006, but seems to require a major rewrite for the way tasks are assigned to dwarves.  That means a lot of work with 'only' the benefits listed above.


At least partially justified by: New Round of Top  Suggestions Polls.
« Last Edit: March 06, 2009, 09:58:34 am by Granite26 »
Logged

Granite26

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #1 on: August 29, 2008, 02:37:54 pm »

This is to discuss the Job priorities suggestion from the current poll.

I did a search through the forum, and there's a lot of people who have said the same things.

It would be nice if A: I could set a dwarf to do his primary job all the time, only hauling rocks (or whatever) if he has nothing else to do.  B: I could tell the dwarves that this lever needs to be pulled RIGHT NOW.

The down side to this is that it would require a major overhaul of the job/labour/task system.  On the other hand, it is currently the top vote getter in the poll.  I'd like to get what everybody thinks on paper.  Why do you like the idea?  What problems will it solve? 

On a more technical side, how could it be resolved in a world where jobs pick dwarves?
« Last Edit: August 29, 2008, 02:44:32 pm by Granite26 »
Logged

LegacyCWAL

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #2 on: August 29, 2008, 03:35:44 pm »

Uh...which poll?  Because the one at the top of this forum has it in fifth.  Even if you eliminate the ones that have either had work done or else been temporarily kludged into existence, it's second or third at best :-\


At any rate, yes, it would be nice if you could tell a dwarf to prioritize his "real" job over hauling.  I'd also like if you could prioritize refuse hauling / dumping to take care of stuff that would make a miasma before worrying about that one turtle shell sitting in the dining room.

The lever thing would be nice, but waaaay low on the list of priorities, if it's even on there at all.


The only way I can think of to implement A is to put jobs in a sort of list by priority, and the higher-priority job gets to choose a dwarf first.  For example, if there's a Brew job and a Haul Wood job and a brewer with wood-hauling enabled becomes available, the brew job would see the brewer and set him to brewing before the hauling job ever gets a chance to check for available dwarves.
Logged
HIDE THE WOMEN AND DROWN THE CHILDREN, THE BARON HAS ARRIVED.

Granite26

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #3 on: August 29, 2008, 04:09:03 pm »

The poll that is stickied has been dumped and locked.  There's a new one floating around.

Anyway, I would think that the solution to both problems is really the same.

Currently it appears that there is a big list of jobs, ordered by nothing in particular.  Every so often (we'll call this job cycle) the jobs will reach out and assign themselves to idle dwarves.  The order they do this in is unknown.  Otherwise unoccupied dwarves will pick an idle task (drooling, I guess).

Anyway, there is no valuation cycle for prioritizing tasks.  Adding a value for the task itself and a value for what the dwarf wants to do (both what you set and the dwarf's personality) would solve this, but be a major headache for finding tasks.  (Since you'd have to sort rather than the top of the pile method)

If you didn't want to do all that, the lever issue could be changed in the (j) menu by simply listing the jobs by priority (its queued, so a FIFO list works just fine) and then allowing people to move them up in the list(or cancel them, for hauling tasks, etc).

Captain Xenon

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #4 on: August 29, 2008, 04:15:31 pm »

looking at the problem backwards- what if we just add a new menu tab to dwarves under[p]references for 'all dwarves' tasks? so we can tell m. Broker not to harvest plants or collect webs, even though its set for 'all dwarves' to do so. This should be significantly easier to code. this way, you just set it so a dwarf's only task is your priority. he wont take time off for other jobs, which can be life+death.

also, it may help if construction had an on/off toggle on each dwarf. if i need my legendary mason working on crafting doors, i dont want him doing the constuction i sent some peasants out into the goblin ambushes to work on.

Logged

Veroule

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #5 on: August 29, 2008, 04:56:34 pm »

The way it currently works is that the jobs look at the list of idle dwarves.  The job then picks the closest dwarf with the appropiate labor.

First way to adjust it within the existing code is improve meeting areas.  I don't actually use any meeting areas since I realized that it was the source of animal caused slowdowns.  If meeting areas could define types and jobs then I would use them.  Being able to define a location as the metal workers area helps to ensure an idle metal worker is close by his workshop.

The second way which I actually think is much better is to adjust the manner in which jobs are cycled through.  I know there is some specific order to it, but I haven't been able to divine it through examination of the behaviors.  The job cycle should do skilled labors (meaning those that a dwarf can gain a skill in) and then unskilled labors.  This small change alone tends to make sure the skilled dwarves are doing skilled jobs first.

Another change is to make unskilled jobs check to see if the idle dwarf has active skills.  When they do it skips them initially.  If it doesn't find any dwarves aceeptable during this first pass then it would try again with those that were skipped.
Logged
"Please, spare us additional torture; and just euthanise yourselves."
Delivered by Tim Curry of Clue as a parody of the lead ass from American Idol in the show Psych.

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: Job Priorities Discussion
« Reply #6 on: August 29, 2008, 06:56:59 pm »

Quote
but I haven't been able to divine it through examination of the behaviors.

Well Fishing is obviously at or near the top of the list we can be sure of that, a fisherdwarf never dose anything but fish though the fact that their are always a surplus of available fishing spots certainly helps.
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

Othob Rithol

  • Bay Watcher
  • aka Dark Snathi, Rain & Tom Bombadil
    • View Profile
Re: Job Priorities Discussion
« Reply #7 on: August 30, 2008, 10:55:49 am »

From my perspective most of my labor gripes revolve around having to make a dedicated skilled group (with only their professional labors on) and a hauler group (peasants). Otherwise my armorsmith will spend all day carrying stone crafts to the stockpile instead of making copper caps like I told him to.
But I would like him to haul if he has nothing to do.

I think (but don't know) that the jobs list is run as a single cycle, FILO. What could help would be a separation between "skilled" labors and hauling. First run the "skilled" list of jobs from start to finish, and then run the hauling list. So my armorsmith catches the MAKE COPPER CAPS before he even knows about HAUL REFUSE.

I know that won't please most people, but it would please me.

BTW- just drop this into the intro so peeps can get to the new "poll" until it is stickied:
Code: [Select]
[size=3][color=red]Support the [url=http://www.bay12games.com/forum/index.php?topic=23687.0][u]New Round of Top  Suggestions Polls[/u][/url].[/color][/size]
You can remove any tags you don't like, but that is what I have on my threads.

LegacyCWAL

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #8 on: August 30, 2008, 11:09:09 am »

Yes, linking to said new poll would definitely help.  It's hard to realize that there's a new poll "floating around somewhere, god knows where" when there's a bolded, stickied one at the top of the forum.
Logged
HIDE THE WOMEN AND DROWN THE CHILDREN, THE BARON HAS ARRIVED.

isitanos

  • Bay Watcher
  • Seasonal river flood nostalgic
    • View Profile
Re: Job Priorities Discussion
« Reply #9 on: September 03, 2008, 11:06:34 am »

Some kind of fine-grained digging and building priorities would be useful to make sure channeling or walling happens without dwarves getting stuck, stuff collapsing, and walls/channels made in the wrong order, thus blocking the way to other build/dig spaces.

Also, it might be slightly off-topic, but I'd also like an option to specify occasionally on which adjacent square a dwarf must stand to perform a job (No, you idiot! Stand on the INSIDE of the wall when you're building the last tile!!!).
Logged

Shurikane

  • Bay Watcher
    • View Profile
    • http://www.shurikane.com
Re: Job Priorities Discussion
« Reply #10 on: September 30, 2008, 09:21:05 am »

Another improvement to this:

Dwarves build structures on solid ground first, then build above open space.

Had a situation where one dwarf had decided to build a pillar standing on nothing.  Guess the results.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #11 on: September 30, 2008, 09:22:30 am »

Goodness Id love to be able to build whole buildings in one command
Logged

Tack

  • Bay Watcher
  • Giving nothing to a community who gave me so much.
    • View Profile
Re: Job Priorities Discussion
« Reply #12 on: September 30, 2008, 09:40:02 am »

First, there's a hotkey mod that allows that.

Anyway. I believe that you should just have on the "q" menu, suspend/repeat and urgent. Just toggle on urgent and it'll cancel the nearest available (and skilled) dwarf's current job and assign that one. Therefore if a lever needs pulling, the planter walking right past it will pull it, instead of a carpenter getting it halfway across the base. Yet, if set to a "make lavish meal" then the nearest dwarf with cooking toggled will be conscripted, instead of a peasant trying to cook.

I also say that fish cleaning should have priority over fishing, and butchery should have priority over hunting. Also, corpses in refuse should gain prority. As in, say a hunter kills an errant wolf on the way to another wolf, which he'll actually haul straight to the butchers. The innocent bystander wolf will be picked up by a peasant or planter or something and taken to the refuse stockpile. Now, the order to butcher it appears immediately and automatically, but very low priority. As it gets closer to rotting, the order becomes higher priority, before finally becoming urgent. This would also fit into the civilisation, because if meat needed cutting up before it rotted, that'd take priority.

Anyone see any problems with that idea?
Logged
Sentience, Endurance, and Thumbs: The Trifector of a Superpredator.
Yeah, he's a banned spammer. Normally we'd delete this thread too, but people were having too much fun with it by the time we got here.

Granite26

  • Bay Watcher
    • View Profile
Re: Job Priorities Discussion
« Reply #13 on: September 30, 2008, 10:09:42 am »

First, there's a hotkey mod that allows that.

Anyway. I believe that you should just have on the "q" menu, suspend/repeat and urgent. Just toggle on urgent and it'll cancel the nearest available (and skilled) dwarf's current job and assign that one. Therefore if a lever needs pulling, the planter walking right past it will pull it, instead of a carpenter getting it halfway across the base. Yet, if set to a "make lavish meal" then the nearest dwarf with cooking toggled will be conscripted, instead of a peasant trying to cook.

I also say that fish cleaning should have priority over fishing, and butchery should have priority over hunting. Also, corpses in refuse should gain prority. As in, say a hunter kills an errant wolf on the way to another wolf, which he'll actually haul straight to the butchers. The innocent bystander wolf will be picked up by a peasant or planter or something and taken to the refuse stockpile. Now, the order to butcher it appears immediately and automatically, but very low priority. As it gets closer to rotting, the order becomes higher priority, before finally becoming urgent. This would also fit into the civilisation, because if meat needed cutting up before it rotted, that'd take priority.

Anyone see any problems with that idea?

It's a good default for the current system as it now exists.  I guess I just feel that if you are going to go to all the trouble to code priorities, why not take a few extra minutes to expose the settings to users?  I'll add this to the top as 'reformat to behave intelligently' and 'do now' toggle.

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Job Priorities Discussion
« Reply #14 on: September 30, 2008, 12:09:53 pm »

I like both the idea of intelligent defaults (like making sure the fish you caught don't rot) and being able to set priorities for tasks overall. After all, I may have a situation where I want to change the defaults.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One
Pages: [1] 2 3 4