Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Data on histfig professions in v0.47.XX  (Read 1757 times)

Nilsolm

  • Bay Watcher
    • View Profile
Data on histfig professions in v0.47.XX
« on: August 08, 2021, 08:06:47 am »

Originally posted on reddit, I wanted to get some input on this from here as well, in case I am misinterpreting something.

It seems that the job distribution of histfigs is completely buggered in the current version. Specifically, there are way too many animal caretakers and herbalists in the histfig pool. The cause of this appears to be that something is wrong with how jobs are selected by people in elven settlements. If you look at any forest retreat in legends mode, you'll see that people only ever take those two jobs (apart from the odd performer, scout and scholar). This doesn't seem right of course, because people should be able to have more varied professions according to the raws:
Code: [Select]
[SCOUT]
[SCHOLAR:PHILOSOPHER]
[SCHOLAR:ASTRONOMER]
[SCHOLAR:NATURALIST]
[SCHOLAR:GEOGRAPHER]
[PERMITTED_JOB:BOWYER]
[PERMITTED_JOB:ANIMAL_CARETAKER]
[PERMITTED_JOB:WOODCRAFTER]
[PERMITTED_JOB:WEAVER]
[PERMITTED_JOB:CLOTHIER]
[PERMITTED_JOB:HERBALIST]
[PERMITTED_JOB:TRADER]

So I tried have a closer look at some relevant data to try and work out what might be happening. I wrote two scripts (see below) to extract what data is needed and to make a few hideous looking plots. Specifically, what is interesting is:
  • what professions are the most frequent (I removed soldiers and some other non-relevant jobs from the list here), and
  • what new jobs people take most frequently. Whenever people become adults or have a change of heart, there is a change_hf_job-type event with a new_job value.

Then I had a look at four worlds: two with the default raws and two with modified raws. For the latter, I just removed animal caretaking and herbalism as permitted jobs from the elves.

Default raws, 250 years of history

Histfig professions: https://i.imgur.com/6qocGqb.png
New_job values: https://i.imgur.com/oGGlVnG.png

As you can see, something isn't right. There are way too many animal caretakers and herbalists. Those jobs are way more common than they should be. Most of this seems to stem from people taking those jobs in elven settlements.

Default raws, 500 years of history

Histfig professions: https://i.imgur.com/wECYyCj.png
New_job values: https://i.imgur.com/o4pIfL5.png

Same situation, except it seems to be even more extreme. The longer the world history, the more the job distribution seems to skew towards those two professions.

Modified raws, 250 years of history

Histfig professions: https://i.imgur.com/ZN2AvuU.png
New_job values: https://i.imgur.com/tD6abIU.png

Now, removing those two lines from the raws seems to solve the problem of animal caretaking and herbalism being overrepresented. However, there is something else not right here. Look at the discrepancy for the remaining permitted jobs. Clothier, weaver and bowyer are very low on the list of new_job values, and woodcrafter does not even seem to appear once. Despite that, those professions seem unusually common.

Modified raws, 510 years of history

Histfig professions: https://i.imgur.com/uvSRm93.png
New_job values: https://i.imgur.com/DZfpByO.png

Again, same situation. People don't really become clothiers etc. that often, but those jobs are still some of the most frequent ones.

Conclusion

Something seems to be wrong with the elves. I don't really know why though. I don't remember this being an issue before 47.01 (although I still need to look at some 44.12 data). I combed through the devlogs, but I didn't see anything obvious that might be causing this. My guess is that it's related to the guilds.

Scripts

Here are the scripts I used, in case someone wants to give it a try as well.

DFHack script to export the relevant data:
Spoiler: exportjobdata.lua (click to show/hide)
This is based on the exportlegends script. I basically just ripped out the parts that I needed. Call it from legends mode and it creates a job_data.xml in the main DF folder.

Python script to parse the xml and plot the data:
Spoiler: plotdata.py (click to show/hide)
Run this in the folder where job_data.xml is located. Requires matplotlib. It created two plots: one for the job distribution and one for the frequency of new_job values.
Logged

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: Data on histfig professions in v0.47.XX
« Reply #1 on: August 08, 2021, 09:08:50 am »

For reference, this had also been touched upon in the Future Of The Fortress thread. Toady suspects elves dominate performance skills and thus lure dwarves and/or histfigs into elven society, thereby setting off the skew you've described here.

Do professions have any inherit bias for/against?

Nilsolm

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #2 on: August 08, 2021, 10:00:29 am »

I know, that discussion is partly what prompted me to look into this in the first place.

I'm not sure about that performer explanation though. Based on what I've seen here, dwarves flocking to elven sites for one reason or the other is part of the problem, but it doesn't seem to be the whole story. There is something that makes everyone predisposed to taking up animal caretaking and herbalism over all other professions. Taking away those two from the elves still appears to lead to elven professions being disproportionately common, but they don't completely dominate the histfig pool anymore. So there is probably some kind of bias involved, but I don't quite understand how.

My guess is that job selection in elven sites is bugged somehow. One way to confirm this would be to completely change up the elves' permitted jobs and see how that affects things. I'll try that later.
Logged

DwarfStar

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #3 on: August 08, 2021, 10:09:49 am »

It sounds like there is a self-reinforcing effect, that causes any popular profession to become more popular with time. I would guess that existing workers somehow can cause other citizens to take the same profession. Maybe lineage? (If animal caretakers’ kids are more likely to become animal caretakers.) I guess there needs to be an “economics” term to increase demand for less popular jobs.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #4 on: August 08, 2021, 11:25:51 am »

If guilds were modeled in settlements other than dwarven ones, establishment of guilds would train kids in those professions (it happens in your own fortress: kids mooding in forges). However, I don't think guilds do affect things elsewhere.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #5 on: August 08, 2021, 11:34:23 am »

In general, though, quite a lot of our own ancestors were taking care of animals or harvesting plants.

Not that it invalidates the assessment, or complaint. As a world develops, perhaps metalworkers should beget more metalworkers, frexample, taking from the pool of excess and uninclined-to-inherit-the-agricultural-profession offspring - or some sort of dominant/recessive geneology-of-career-tendency to skew things from cross-lifestyle family pairings.

Supply/demand is the ultimate arbiter. Though surely the intention is that you're not going to get anywhere as many high-skill armourers immigrating as farmers, and for the current (apparent) likelihood to hold true there must still be an agrarian-bias to to the greater world (obv. taking into account who is likely to up sticks from their original settlement, and who may not). A different mix in town-sized places, and yes I could see armourers as most prolific in any place with castle qualities.  Entertainers might fill in the slack (a la Civilization's "neither scientist (research) nor tax-collector (gold)" basic trimvirate of resource-farming where happiness is the thing you are forced to at least partially make your 'production' aim) or have true value (culture, plus information?) but I find that to be the hardest justification.

Except with elves. Being above it all (literally, as well as figurativel) I can imagine their renaissance being much in advance of the humans or dwarves. A glorified pastoral/poetic mix (give or take extreme environmentalist/cannabilistic attitudes when such harmonies are disturbed in front of them) might be acceptable. Leading only to questions as to how these may (cult-like) attract more followers of such an inclination than a dwarven attitude of industrial perfection (in all things, including arable farming). So tweaks and overhauls might be useful, but not necessarily upon the initial premise.


(How a player skews their own embark, or if an Adventurer decides to go off and kill everyy cheesemaker in the land for whatever reason, is of course still the choice of the one in charge of the game. I'm trying to address here the abstracted NPC issues, and then mostly in the zero-player proportion of the game, before particularly forceful gaming might propogate cultural shifts all across the post worldgen landscape. "Send me all your best architects, upon pain of pain!", perhaps, as a demand of tribute once the ability is there to back up that 'promise'.)
Logged

Nilsolm

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #6 on: August 08, 2021, 02:16:41 pm »

It sounds like there is a self-reinforcing effect, that causes any popular profession to become more popular with time. I would guess that existing workers somehow can cause other citizens to take the same profession. Maybe lineage? (If animal caretakers’ kids are more likely to become animal caretakers.) I guess there needs to be an “economics” term to increase demand for less popular jobs.

That would be an interesting factor to look at. I briefly skimmed one of the legends.xml files I used, but I didn't see any obvious connection between lineage and profession. I could probably get some actual data on this, but I'd have to modify the scripts accordingly.

If guilds were modeled in settlements other than dwarven ones, establishment of guilds would train kids in those professions (it happens in your own fortress: kids mooding in forges). However, I don't think guilds do affect things elsewhere.
 
You're right. Guilds apparently do not exist anywhere outside of dwarven settlements as of now, except for the occasional guildhall built by dwarves in non-dwarven sites they conquered.

In general, though, quite a lot of our own ancestors were taking care of animals or harvesting plants.

Not that it invalidates the assessment, or complaint. As a world develops, perhaps metalworkers should beget more metalworkers, frexample, taking from the pool of excess and uninclined-to-inherit-the-agricultural-profession offspring - or some sort of dominant/recessive geneology-of-career-tendency to skew things from cross-lifestyle family pairings.

snip

Certainly, some bias in the job distribution would be reasonable, considering the real-world time period the game is based on. This is more about those two specific professions being overrepresented to such a degree that I'm fairly certain it's not intended. And getting swamped by animal caretaker/herbalist migrants seems to be a common complaint nowadays.

In fact, I got some data from v44.12 for reference. Default raws, 250 years of history:

Histfig professions: https://i.imgur.com/SZBLv8F.png
New_job values: https://i.imgur.com/2uFnSlQ.png

Herbalists and animal caretakers are near the top again, but so are all the other elven jobs this time.  It seems fairly reasonable overall and much more in line with what you get in 47.05 by modifying the raws.
Logged

DwarfStar

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #7 on: August 08, 2021, 10:50:55 pm »

(Maybe you're already doing this but) It would be interesting to hear what distribution you get with v44.12 at 500 years. If we're right that something only in the new version is causing existing workers to "breed", then we should expect the distribution to not have shifted significantly in any direction.
Logged

Nilsolm

  • Bay Watcher
    • View Profile
Re: Data on histfig professions in v0.47.XX
« Reply #8 on: August 09, 2021, 04:01:00 pm »

Here is v44.12 world at 550 years:

Job distribution: https://i.imgur.com/HLYlfKM.png
New_job values: https://i.imgur.com/eIgBCHl.png

Overall very similar to what you get with 250 years. Those extra 300 years don't seem to make a difference.

Not really sure where to go from here though. Maybe look at all the minor releases since 47.01? I skimmed through all the changelogs, but nothing in there seemed particularly relevant. Or I could change up elven permitted jobs completely and see what happens. Maybe that'll help narrow things down a bit.
Logged