So job weights, they are interesting. A huge amount of importance is placed on the "individual" - traits and strata (ironic, given the game uses planned economies, but I digress). Below, I look at how these job weights work to allocate pops - and why they fail to work when the number of jobs exceeds the number of pops, and how to fix this, by making pops think about national [resource] income, instead of (just) thinking about their own trait-suitability for a job.
Each job has a "base weight" value it pulls off, based on a static value (e.g. 1000 for rulers, 5 for criminals, 10 for any specialists, ive inserted foundry and artisan workers as an example below to indicate that their base weight is that of a specialist - and yes, clerks do have a relative negative weight - pops want to be criminals more than clerks, who can blame them lol).
But then, each job has "sub-weights" - factors (multiply base weight by X if Y is true) or additors (add to base weight by Z if K is true) etc. These largely boil down to one of 4 things
1 for a slave pop (10 > 20, as slaves have a factor of 2x)
2 for a slave + robust-trait pop (10 * 2 * 10 (2x for slave, 10x for robust)
So this is how, and why, some pops will prioritise certain jobs over other pops, based on their traits. There is no mystical AI at work, it is simply a giant conditional probability tree, with the pop picking the "most highly weighted" job (either 100% the time, or like 95% the time from what I can see).
But... Why go through all this effort?
So what do I mean by this? Well its simple. Job weights are all handled on the "individual level" - in the "pop scope" for modders out there. But its easy to make a pop ask... what can I do for my country?
First, for reference, This is what the vanilla Artisan job weights look like
And this is what they could look like (see my 4 new blocks at the bottom) if they took your national (CG) income into account. In short, if youre short of CGs staffing artisan jobs should be a priority, whilst if you have 51+ CG income, stop staffing artisan jobs (unlike humans who will setup trades, or move pops around, this is needed as this way unemployed AI pops should go and find work elsewhere, i chose 50 CG income as the breakpoint as thats what the lategame AI economic plan targets)
But does this work?
Yes, with some very quick testing. I have created a rough map filter that shows national cg income for each nation in observer mode.
Scale: grey = <10 CG income, red is 10-20, orange is 20-30, green is anything more than that, basically, i need to make it a smother scale
Start of test
3 years later
See how the empire in the top left is very green and became less green over time(it produced fewer CGs)? This is because, it started with +65cg output [this is the one i'd been playing], in the next frame it had dropped to +47 CG output [adhering to my ~50CG limit for AI nations] but as a trade off that empire increased alloy output by 20 (by me manually checking) This is because there were more jobs than pops to work them all, so the pops re-shuffled themselves over to forge jobs once the 50-CG cap had been hit and they didnt need to be artisans.
You also see several nations have become lighter shades of red, or moved in to orange [meaning higher monthly CG income] - these were the ones with excess industrial capacity but insufficient pops to work all jobs (so there was room for pops to immediately jump to working as artisans). This indicates that pops understood their national income weights and moved to CG production as needed.
Countries that remained in grey (i.e. no CG output improvement) Lacked extra industrial capacity (i.e. they didnt have many extra free industrial jobs for pops to move between). With more time most of the galaxy would become green (high positive CG income).
TLDR:
The above evidence is illustrative of the fact that these income-adjusted pop-job weights DO work to fix the AIs shortcomings with resource production IF it has more jobs than pops. if it has less (or parity) jobs than pops, the issue remains with it picking and choosing the right districts/buildings - which it usually does an OK job at - if it is able to have a population that intelligently assigns itself to jobs that best boost their nation.
So why not post this in the 3.0.3 beta threads?
Simple, pdx want to test their current changes, and have asked that people dont test with mods or non-vanilla setups, which is fine and good for controlling data incoming on the changes they've already made.
But, hopefully the devs will see this and start to think about making pops work the jobs that are best for their country, not just what is best based on their traits. Prioritising National income levels is more important than dogpiling a job, just because you've got the right traits for it (especially for AI nations that cant react/disable jobs like players can).
Each job has a "base weight" value it pulls off, based on a static value (e.g. 1000 for rulers, 5 for criminals, 10 for any specialists, ive inserted foundry and artisan workers as an example below to indicate that their base weight is that of a specialist - and yes, clerks do have a relative negative weight - pops want to be criminals more than clerks, who can blame them lol).
But then, each job has "sub-weights" - factors (multiply base weight by X if Y is true) or additors (add to base weight by Z if K is true) etc. These largely boil down to one of 4 things
- species traits (e.g. smart pops want to be scientists)
- social class (e.g. academic privilege wants to be scientists)
- slavery (more manual tasks)
- Are you already in your job (to stop pops jumping around too much I guess).
- There are a few other things like are you voidborne, or is this a base energy/min/food job, but the above 4 (particularly #1 and #3) come up the most.
1 for a slave pop (10 > 20, as slaves have a factor of 2x)
2 for a slave + robust-trait pop (10 * 2 * 10 (2x for slave, 10x for robust)
So this is how, and why, some pops will prioritise certain jobs over other pops, based on their traits. There is no mystical AI at work, it is simply a giant conditional probability tree, with the pop picking the "most highly weighted" job (either 100% the time, or like 95% the time from what I can see).
But... Why go through all this effort?
- Sure I get the idea behind selecting for traits, you individually make jobs efficient by matching the best pop (though not really always the case when you factor in strata limits and edge cases I wont go into, here).
- But this effectively creates an NP complete situation with diminishing returns (do you really care if your charismatic slaves are working as entertainers or in the mines, when you have your 15th colony, so long as amenities are positive and the planet is stable? No, probably no)
- This works fine for rulers (they all have 1000 weight, and there are not many to begin with, so they fill fast, and not too many traits matter for ruler jobs)
- Likewise, this tends to work OK for workers, as you (pre 3.x) usually have enough to meet your base income needs
- BUT this is actually quite bad for specialists. Specialist jobs compete to produce the 4 most vital (and hardest to evaluate based on circumstance) resources in the game - Admin Cap, Science, Consumer Goods and Alloys. Without a good balance of all 4 you lose. Pre 3.0 this wasnt much of an issue, but population issues in 3.x have started to reveal the cracks in job allocation.
So what do I mean by this? Well its simple. Job weights are all handled on the "individual level" - in the "pop scope" for modders out there. But its easy to make a pop ask... what can I do for my country?
First, for reference, This is what the vanilla Artisan job weights look like
Code:
weight = {
weight = @specialist_job_weight
modifier = {
factor = 2
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 5
has_job = artisan
}
modifier = {
factor = 10
has_job = artisan
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 1.5
has_trait = trait_void_dweller_1
}
And this is what they could look like (see my 4 new blocks at the bottom) if they took your national (CG) income into account. In short, if youre short of CGs staffing artisan jobs should be a priority, whilst if you have 51+ CG income, stop staffing artisan jobs (unlike humans who will setup trades, or move pops around, this is needed as this way unemployed AI pops should go and find work elsewhere, i chose 50 CG income as the breakpoint as thats what the lategame AI economic plan targets)
Code:
weight = {
weight = @specialist_job_weight
modifier = {
factor = 2
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 5
has_job = artisan
}
modifier = {
factor = 10
has_job = artisan
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 1.5
has_trait = trait_void_dweller_1
}
# if low on CGs get artisans in the factory
modifier = {
factor = 100
owner = { has_monthly_income = { resource = consumer_goods value < 6 } } #default production is 6 min = 6 cgs
}
# if low on CGs get artisans in the factory
modifier = {
factor = 20
owner = { has_monthly_income = { resource = consumer_goods value < 12 } } #default production is 6 min = 6 cgs
}
# if low on minerals, but have enough CGs, reduce artisans
modifier = {
factor = 0.5
owner = {
AND = {
has_monthly_income = { resource = minerals value < 6 }
has_monthly_income = { resource = consumer_goods value > 12 } #default production is 6 min = 6 cgs
}
}
}
# There is literally no point in running a surplus this big, as this is what the "default" AI Econ plan targets.
modifier = {
factor = 0.001
owner = {
AND = {
is_ai = yes #only AI-nation pops should cut back at 50+ CGs, some humans may want more, for some reason.
has_monthly_income = { resource = consumer_goods value > 50 }
}
}
}
}
But does this work?
Yes, with some very quick testing. I have created a rough map filter that shows national cg income for each nation in observer mode.
Scale: grey = <10 CG income, red is 10-20, orange is 20-30, green is anything more than that, basically, i need to make it a smother scale
See how the empire in the top left is very green and became less green over time(it produced fewer CGs)? This is because, it started with +65cg output [this is the one i'd been playing], in the next frame it had dropped to +47 CG output [adhering to my ~50CG limit for AI nations] but as a trade off that empire increased alloy output by 20 (by me manually checking) This is because there were more jobs than pops to work them all, so the pops re-shuffled themselves over to forge jobs once the 50-CG cap had been hit and they didnt need to be artisans.
You also see several nations have become lighter shades of red, or moved in to orange [meaning higher monthly CG income] - these were the ones with excess industrial capacity but insufficient pops to work all jobs (so there was room for pops to immediately jump to working as artisans). This indicates that pops understood their national income weights and moved to CG production as needed.
Countries that remained in grey (i.e. no CG output improvement) Lacked extra industrial capacity (i.e. they didnt have many extra free industrial jobs for pops to move between). With more time most of the galaxy would become green (high positive CG income).
TLDR:
The above evidence is illustrative of the fact that these income-adjusted pop-job weights DO work to fix the AIs shortcomings with resource production IF it has more jobs than pops. if it has less (or parity) jobs than pops, the issue remains with it picking and choosing the right districts/buildings - which it usually does an OK job at - if it is able to have a population that intelligently assigns itself to jobs that best boost their nation.
- Whilst ive not looked into it yet, it may be possible to flip colony specs (factory / forge) based on country income, too, to further help the AI figure out how to get an output of 6~50 CGs per month (using my earlier values)
So why not post this in the 3.0.3 beta threads?
Simple, pdx want to test their current changes, and have asked that people dont test with mods or non-vanilla setups, which is fine and good for controlling data incoming on the changes they've already made.
But, hopefully the devs will see this and start to think about making pops work the jobs that are best for their country, not just what is best based on their traits. Prioritising National income levels is more important than dogpiling a job, just because you've got the right traits for it (especially for AI nations that cant react/disable jobs like players can).
Last edited:
- 29
- 11
- 6
- 1
- 1