Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Manager that manages, commander that commands  (Read 1448 times)

Deboche

  • Bay Watcher
    • View Profile
Manager that manages, commander that commands
« on: September 06, 2014, 10:07:14 pm »

How about instead of assigning roles to each individual dwarf, we have the manager take care of it all?

First we would need to assign each job a priority level in the nobles screen - manager settings. Something like this:

Dedicated - A dwarf is assigned to this task and has no other tasks whatsoever - For miners, craftsdwarves and so on

Primary - A dwarf can only have one primary job assigned to him or her. So if farmer and plant gatherer are both primary, he can only take one of those two

Secondary - Same as primary, but a dwarf can take one primary and one secondary skill. He also prioritizes the primary skill. So you can have someone be:
Primary Weaponsmith
Secondary Furnace Operator

Tertiary - All the skills anyone can do such as hauling, feed patients, animal care, architecture. They are assigned to all non-dedicated dwarves

This way, you'd just toggle the priority levels of the jobs, the manager would go to his little study and assign dwarves to jobs based on their skills and how important the jobs are on the chain. You can still change it manually or assign dwarves in the manager screen, like such:

Miner - 3 - Dedicated (Assigns 3 dwarves to dig and do nothing else)
Carpenter - 1 - Primary - Assigned: Urist McBedMaker
Bowyer - 1 - Secondary - Assigned: Urist McBedMaker

And as migrants come in, the manager automatically makes the more skilled ones take the jobs they're better at and gives the others other jobs. A number will tell you how many dwarves are only assigned tertiary jobs so you know how many you have to spare for the military

Similarly, the recruiting for the army could be done the same way. Nobles screen - militia commander or captain settings.

Recruit squad of 9 hammerdwarves
No dedicated skills
No primary skills above competent
etc

And he would go and select 9 dwarves that fit whatever filters you chose, and take the best hammerdwarves first, then the best fighters and so on. If he couldn't get a whole squad filled due to your filters, he would wait until the next migrant wave or child to come of age.
Logged

bluephoenix

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #1 on: September 07, 2014, 03:04:21 am »

That would actually be pretty useful, being able to assign jobs to be filled with existing or migrant dwarves (a setting maybe?).
This would solve a lot of the tedium of having to assign jobs to that wave of 20 dwarves that just migrated to your fortress.
Logged

Deboche

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #2 on: September 07, 2014, 11:56:10 am »

Exactly, also dead dwarves would be automatically replaced
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #3 on: September 07, 2014, 04:11:23 pm »

Several of these categories are redundant as currently described. I don't see a clear difference between dedicated and primary? Nor primary and secondary, maybe but you already described two tasks in primary. Is the only difference random number generator vs list?

In general it sounds a lot like dwarf therapist being added to game which is a fantastic yet oft repeated suggestion.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Deboche

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #4 on: September 07, 2014, 04:18:37 pm »

Dedicated is someone with a single labor, not even hauling enabled.

Primary is one job the dwarf does. If two jobs are tagged primary, he can't have both.

He can have one primary and one secondary and all tertiaries, not two primary or two secondary.

This goes beyond the therapist to a degree where you don't even need to look at dwarves' skills, replace dead dwarves or assign jobs to new ones. Same for military.

You just say: I want 2 miners, 1 mason, 2 farmers, 1 cheeser/milker, 1 shearer/spinner etc and the manager assigns the best dwarves for those positions. Same thing with the army. You assign a noble and tell him: recruit 9 marksdwarves to your squad and he takes care of it.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #5 on: September 07, 2014, 07:27:29 pm »

Okay that makes more sense to me now, but still a bit confused.

If you are just saying "I want 3 miners and 2 farmers" then where does the primary/secondary thing come into the equation?

From what you just said, it makes good sense to me now how primary, secondary, etc. works if you were manually assigning them, but I don't understand how the manager would auto-assign these from the type of instructions you described.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

bluephoenix

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #6 on: September 07, 2014, 08:41:20 pm »

I am guessing that if you say "I want 2 miners dedicated, 1 miner tertiary and 2 farmers tertiary"
It will assign 3 migrants as miners, 2 get all labours removed and get mining assigned, 1 just gets mining enabled and nothing else done to him and if there are not enough migrants it will give him the farming profession as well.
Then it will assign that last farmer profession to another migrant. Without changing any of his other jobs.

So now you have 3 miners, one who is also a farmer plus one extra farmer who also has his professions he originally had when he arrived at the fortress.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #7 on: September 07, 2014, 09:28:04 pm »

1) How do you know how many to request primary, tertiary, etc. if you aren't even looking at their skills? Or even in general?
2) Why would it only select migrants? And you describe the manager breaking your orders, how does it know when to do that versus warn you, etc.?

Whole system still very confusing. But seems pointed in a useful direction.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

EinsteinSatDown

  • Bay Watcher
  • Return to the Corn Fields
    • View Profile
Re: Manager that manages, commander that commands
« Reply #8 on: September 08, 2014, 03:03:03 am »

This idea may very well work.
 I imagine that, once a manager is appointed, a new screen would have to be made available to enact the changes.
Perhaps the efficiency and accuracy with which the manager assigns these tasks will be dependent on his organizer skill.

In turn, this can lead to the de-implementation of the labour profile, thus making your dwarve's labour designations solely depend on the manager and the orders that you relay to him/her.

While this may not be practical for a player who wishes to have his/her dwarves  labour in precision(As do I), it will certainly add
a level of abstraction and difficulty to the game.

This idea may need some tweaking, but it would be interesting to see the end result.
Logged

Deboche

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #9 on: September 08, 2014, 04:15:16 am »

I am guessing that if you say "I want 2 miners dedicated, 1 miner tertiary and 2 farmers tertiary"
It will assign 3 migrants as miners, 2 get all labours removed and get mining assigned, 1 just gets mining enabled and nothing else done to him and if there are not enough migrants it will give him the farming profession as well.
Then it will assign that last farmer profession to another migrant. Without changing any of his other jobs.

So now you have 3 miners, one who is also a farmer plus one extra farmer who also has his professions he originally had when he arrived at the fortress.
The way I saw it, tertiary is for labours like hauling and recover wounded that everyone does so if you assign mining to tertiary, it'll make everyone who's not a woodcutter or hunter a miner.

If you want 3 miners and one of them farms and a farmer who keeps his other jobs, you'd choose:
2 miners dedicated
1 miner primary Assign: Urist McDigger
1 farmer secondary Assign: Urist McDigger
1 farmer primary

1) How do you know how many to request primary, tertiary, etc. if you aren't even looking at their skills? Or even in general?
2) Why would it only select migrants? And you describe the manager breaking your orders, how does it know when to do that versus warn you, etc.?

Whole system still very confusing. But seems pointed in a useful direction.
1) The point isn't what skills are available, it's what you want. You want 2 miners, one woodcutter and so on and the manager will automatically assign the best people for the jobs.
2) It doesn't select only migrants, it works on everyone in the fortress. And it doesn't break your orders, I never said such a thing...
I imagine that, once a manager is appointed, a new screen would have to be made available to enact the changes.
While this may not be practical for a player who wishes to have his/her dwarves  labour in precision(As do I)
The screen would be accessible through pessing "s" in the nobles screen, like you do for the bookkeeper.
You can always do it manually, even if it's just by assigning the dwarf like I described.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #10 on: September 08, 2014, 03:33:44 pm »

Quote
The point isn't what skills are available, it's what you want
What I'm asking is how would you know that you want "a miner that does farming on the side on Tuesdays and occasionally threshes on a full moon" blah blah? That seems really bizarre to decide you want ... well ever. But especially without even looking and seeing that a guy has natural mining and farming skills, or something.

I can imagine there being some really cool potential algorithms to optimize this sort of thing, but as a manually declared wish, I don't see it getting used very much, nor do I see how a simple algorithm could meaningfully assign primary/secondary/tertiary all on its own.

I think a lot more detail needs to be specified to make this really a powerful suggestion that it probably could be. I'll take a crack at it.

The first step is really more clearly specifying exactly what problem(s) we want to solve.  What are they?

In my experience, labor issues include:

1) Skilled labor and grunt labor being the same permission, which is a problem when you have a bunch of masons for a megaproject, but then have difficulty cultivating any of them as a skilled mason for furniture. This can be solved by annoying workshop permissions, but it is clumsy.

2) Figuring out who is best for a job is extremely tedious with the current UI. And even with a better UI, it would probably still be tedious and not require much intelligence therefore not very fun.

3) Actually changing anything is mechanically tedious as well, with multiple submenus and no boolean options for "everything but this" etc.

4) Priorities are clunky -- It's inefficient to have one priority level for a job for everyone ever. It would be more efficient to have different guys have different priorities for the same job type.

5) Newer players often can't figure out how to even do certain things due to the job for it being not turned on for anybody, very frustrating. Even for experienced players, it is tedious and easy to overlook until 3 months pass by and the job is still unfinished.



What type of algorithm or changes would solve as many of these as possible?

1) Split apart everything that depends on skill level versus everything that doesn't (or only matters for speed). Those two types of tasks (or three types if you count speed-relevant as a third category) should never exist in the same permission in the first place.

2) Turn on completely self-sufficient basic labor managing logic by default (with an ini option for advanced players who don't even want to bother turning it off at the start of the game). It works like so:

2a) Pick two people in the fort at any given time and keep them on file as the best two dwarves for each given job type that depends on skills. This is a customizable parameter (player can set to = 3 or 1 or whatever), but 2 by default. Every time somebody dies or new migrants arrive or skills change, re-sort the list.
2b) Turn off permissions for everything by default while the labor AI is on.
2c) Whenever a job exists waiting for a worker that requires skill, the labor AI searches its list for one of the two people who are most skilled at that thing. If both are available, it randomly chooses. If one is available, it chooses them. If zero are available, it waits for a day or two, then chooses another available person on a one-time basis.
2d) Whenever a job exists waiting for a worker that does NOT require skill, the labor AI searches for an available worker OTHER THAN anybody who might currently be needed for skilled jobs, OR anybody who has very recently done a skilled job. It prefers these types of unskilled workers first, and searches in reverse order to (2c).
2e) Permissions are turned off right after any job is completed then re-considered again only as needed.
2f) The labor AI keeps track of how "stale" each job is, and also has a default level of basic importance (assigned in the RAWs). The priority of a specific job is based on both its baseline importance and its staleness (gradually gets more important over time as it is ignored).
2g) The labor AI can take into account human overriding details, like "turn off/on X job completely for now for anybody" or "force this one particular dwarf to have exactly the permissions I specify for now" etc. This could include the OP's primary/secondary levels as well.
2h) Whenever the labor AI is disabled, it returns the whole fort to whatever it's original permissions were. If it has been on the whole game so far, it just gives the skilled job permissions to the people on its skilled lists, and then makes sure all remaining permissions are available to other people, with slight variability in priority graded across people (so somebody might have cleaning a bit higher than corpse hauling, somebody else vice versa, to ensure a dwarf or two in the forst always has time for certain job types).

3) Add a therapist-like UI for advanced manual control. Again, including the OP's praimry/secondary distinctions for the truly micromanaging folks. And also convenient booleans in general like "turn on/off everything EXCEPT this" (both fort-wide and for a dwarf) or "copy this other guy's permissions for a start" or template shortcuts, etc.

4) Put all of this stuff for either (2g) or (3) in a single screen with fewer submenus and also mouse-compatibility.

5) Include a pivot chart of all the dwarves in your fort sortable by skill in different skill areas, as well as total for groups of related skills like fighting and armor and weapon, etc. Allow this to be viewed split-screen on one side while permissions assignment is on the other at the same time.

6) Also add (5) as a split-screen to any other page where you need to select dwarves for jobs, like choosing a baron or other nobles or choose military recruits, and so on.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

breadman

  • Bay Watcher
    • View Profile
Re: Manager that manages, commander that commands
« Reply #11 on: September 10, 2014, 12:30:33 pm »

I like the idea of having job settings managed through the manager settings option on the nobles page.  Separating skilled and unskilled portions of the same labor type has been proposed before, and is still a good idea.  Prioritizing stale jobs could certainly be useful if handled carefully.  Beyond that, I'm dubious about the actual proposals here.

I'd prefer to see the whole labor toggling per dwarf disappear, along with the notion of jobs choosing dwarves.  (It makes sense if you have a slew of idle dwarves ready to tackle every jobs as it becomes available, but in that case, you're not concerned about labor optimization.)  Instead, a dwarf ready to choose what to do should select among available jobs according to manager settings, personal preferences, job distance, and job staleness.

For each job type, the manager should be able to set a global priority, a maximum number of dwarves allowed to do it at once, and a staleness multiplier.  (The staleness multiplier should be shown in vague terms like "high" or "low"; its main purpose is to indicate that older food-hauling jobs, for example, are much more important than older stone-hauling jobs.)  It would be nice if non-labor jobs, such as "trade at depot" or "attend meeting" or perhaps even "sleep", could also be prioritized here.

Many dwarves, particularly those who prefer familiar routines and those who dream of mastering a skill, will prefer to do jobs that use a skill they've developed, prioritizing such jobs above others that have a higher global priority.  (Those who like to try new things could actively seek something they haven't done yet.)  A dwarf who finishes a task may prefer one of the same type, particularly if it requires a tool, perhaps depending on focus and single-mindedness.  Closer jobs are preferred over those far away, except by wasteful dwarves.  Getting to work with a favorite material might be an incentive.  If no available job is sufficiently attractive, lazier dwarves might idle for a bit hoping for something better to come up.

Yes, this can make dwarves less likely to progress toward higher skill levels; this can be mitigated by using the workshop profiles and/or adding another option to set the minimum skill required to accept a given type of job.  In general, though, dwarves should spend much less of their time idle, because they're each allowed to do almost everything.  Allowing the player to assign global priorities should make the fort run more smoothly.

Programming shouldn't be too hard, but getting the dwarf-specific priority adjustments balanced could be tricky.  The "closeness" bit might be nasty, though, particularly if a dx+dy+N*dz heuristic doesn't produce the desired results.
« Last Edit: October 02, 2014, 04:02:58 pm by breadman »
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?