Data-driven tech cost scaling for later eras

L. Vern

Warlord
Joined
Sep 5, 2022
Messages
106
Location
Ontario, Canada
Hello all,
for the purposes of tuning some technology cost-scaling numbers I wrote a small framework to automate the process of running autoplay games and saving their logs, as well as some pandas code to aggregate the information contained therein.

In base VP, as many would predict, the technology progression after industrial gets a bit fast:
download.png


After using some math that considers the effective spt based on turns to research against tech cost to come up with some new cost numbers and running some more games, the new distribution looks like the following:
download (1).png


While the data above is from AI only games, the later era tech scaling felt a lot nicer to me the few games I've tried, it is nice not having 3 successive military unit upgrades in the same war and not have the last eras fly by in 20 turns. I also played with culture victory disabled as it usually happens long before the last few eras get to be experienced.

If you wish to try it out, the values to put at the end of
Code:
MODS\(2) Vox Populi\Balance Changes\Tech\TechCostChanges.sql
are:

Code:
-- Medieval Era
UPDATE Technologies SET Cost =   500 WHERE GridX =  5; -- Originally 500
UPDATE Technologies SET Cost =   700 WHERE GridX =  6; -- Originally 850
-- Renaissance Era
UPDATE Technologies SET Cost =  1750 WHERE GridX =  7; -- Originally 1800
UPDATE Technologies SET Cost =  2400 WHERE GridX =  8; -- Originally 2500
-- Industrial Era
UPDATE Technologies SET Cost =  3600 WHERE GridX =  9; -- Originally 3500
UPDATE Technologies SET Cost =  5150 WHERE GridX = 10; -- Originally 5500
-- Modern Era
UPDATE Technologies SET Cost =  8100 WHERE GridX = 11; -- Originally 7500
UPDATE Technologies SET Cost = 11000 WHERE GridX = 12; -- Originally 9000
-- Atomic Era
UPDATE Technologies SET Cost = 14500 WHERE GridX = 13; -- Originally 9500
UPDATE Technologies SET Cost = 17700 WHERE GridX = 14; -- Originally 10000
-- Information Era
UPDATE Technologies SET Cost = 21250 WHERE GridX = 15; -- Originally 11000
UPDATE Technologies SET Cost = 26000 WHERE GridX = 16; -- Originally 12000
UPDATE Technologies SET Cost = 27150 WHERE GridX = 17; -- Originally 13000
-- Future Tech
UPDATE Technologies SET Cost = 31699 WHERE GridX = 18; -- Originally 14000

N.B:
* All games were standard size communitas with default map options, emperor difficulty, no tech trading, and no ancient runes with cultural and diplomatic victories disabled
* Only costs after classical were adjusted, resulting in a slightly shorter medieval and renaissance and longer rest of the game to make the average turns/technology more consistent
* Average turn of science victories in this configuration increased from 411 to 456
 
A similar thing should be possible for policy cost scaling too, right?
Your other post proved how dominant Culture victories were (and it has also been under discussion in 'General Balance'), so could a renewed policy cost scaling help balance them in a data-driven way? (I haven't really finished enough games to determine the main reason for culture victory being so dominant, so I could be completely off here.)
 
A similar thing should be possible for policy cost scaling too, right?
Your other post proved how dominant Culture victories were (and it has also been under discussion in 'General Balance'), so could a renewed policy cost scaling help balance them in a data-driven way? (I haven't really finished enough games to determine the main reason for culture victory being so dominant, so I could be completely off here.)
A completely different issue you're talking about.
Culture victory actually doesn't only come from policy but also from tech (with later building exponentially pumping up tourism output) which makes pin-pointing the correct scaling value very difficult (due to many contributing elements), and changing policy cost scaling can also mess with trees that have nothing to do with culture victory at all (which are the majority).
It's better to fix culture victory with elements that only affect itself (like tourism output or influence level) instead.
 
Did you test with tech trading on and research agreements?

I have usually leave research agreements off now, which sucks because I like more diplomatic options. However, research agreements speed up the already too fast mid-late and late tech unlocking.
 
A completely different issue you're talking about.
Culture victory actually doesn't only come from policy but also from tech (with later building exponentially pumping up tourism output) which makes pin-pointing the correct scaling value very difficult (due to many contributing elements), and changing policy cost scaling can also mess with trees that have nothing to do with culture victory at all (which are the majority).
It's better to fix culture victory with elements that only affect itself (like tourism output or influence level) instead.
Yes culture is also in some cases heavily influenced by UA's or UB's, the simulation shows Arabias GP bonus on historic with Bazaar is ... lets settle for very very strong.
Just rolling trade routes for victory is not very complicated.
Add some other historical bonuses (wonders, war victories etc) and you're hopefully home free.
 
Hello all,
for the purposes of tuning some technology cost-scaling numbers I wrote a small framework to automate the process of running autoplay games and saving their logs, as well as some pandas code to aggregate the information contained therein.

In base VP, as many would predict, the technology progression after industrial gets a bit fast:
View attachment 638720

After using some math that considers the effective spt based on turns to research against tech cost to come up with some new cost numbers and running some more games, the new distribution looks like the following:
View attachment 638721

While the data above is from AI only games, the later era tech scaling felt a lot nicer to me the few games I've tried, it is nice not having 3 successive military unit upgrades in the same war and not have the last eras fly by in 20 turns. I also played with culture victory disabled as it usually happens long before the last few eras get to be experienced.

If you wish to try it out, the values to put at the end of
Code:
MODS\(2) Vox Populi\Balance Changes\Tech\TechCostChanges.sql
are:

Code:
-- Medieval Era
UPDATE Technologies SET Cost =   500 WHERE GridX =  5; -- Originally 500
UPDATE Technologies SET Cost =   700 WHERE GridX =  6; -- Originally 850
-- Renaissance Era
UPDATE Technologies SET Cost =  1750 WHERE GridX =  7; -- Originally 1800
UPDATE Technologies SET Cost =  2400 WHERE GridX =  8; -- Originally 2500
-- Industrial Era
UPDATE Technologies SET Cost =  3600 WHERE GridX =  9; -- Originally 3500
UPDATE Technologies SET Cost =  5150 WHERE GridX = 10; -- Originally 5500
-- Modern Era
UPDATE Technologies SET Cost =  8100 WHERE GridX = 11; -- Originally 7500
UPDATE Technologies SET Cost = 11000 WHERE GridX = 12; -- Originally 9000
-- Atomic Era
UPDATE Technologies SET Cost = 14500 WHERE GridX = 13; -- Originally 9500
UPDATE Technologies SET Cost = 17700 WHERE GridX = 14; -- Originally 10000
-- Information Era
UPDATE Technologies SET Cost = 21250 WHERE GridX = 15; -- Originally 11000
UPDATE Technologies SET Cost = 26000 WHERE GridX = 16; -- Originally 12000
UPDATE Technologies SET Cost = 27150 WHERE GridX = 17; -- Originally 13000
-- Future Tech
UPDATE Technologies SET Cost = 31699 WHERE GridX = 18; -- Originally 14000

N.B:
* All games were standard size communitas with default map options, emperor difficulty, no tech trading, and no ancient runes with cultural and diplomatic victories disabled
* Only costs after classical were adjusted, resulting in a slightly shorter medieval and renaissance and longer rest of the game to make the average turns/technology more consistent
* Average turn of science victories in this configuration increased from 411 to 456
You should make a proposal with your numbers.
 
Really cool man nice work.

Thing is it is a bit better to have the later eras take fewer turns as turns take much longer in real time to complete. I think some sort of gradual decrease in tech turns over the eras would be good, or cross reference it with how many units/cities players have as that's what dictates the real time a turn takes to complete
 
Nah, that doesn't make any sense. It'd be a nightmare to include real time for era length calculation.
 
Really cool man nice work.

Thing is it is a bit better to have the later eras take fewer turns as turns take much longer in real time to complete. I think some sort of gradual decrease in tech turns over the eras would be good, or cross reference it with how many units/cities players have as that's what dictates the real time a turn takes to complete
The later eras are still fewer and fewer turns per tech in the rescaled version, but the drop-off isn't as steep. The scaling was adjusted so that each tech after Modern takes 1 fewer turn than the era before it.
 
Nice!
Out of curiosity, what is the meaning of the crosses outside of the boxplots? Anomalies?
 
Wow ~30 turns for an atomic era tech in one case
 
Do these costs include all AIs, or like the top 3 or so AIs?

It might be a mistake to include all AIs, as no ones cares about the schlub at the bottom that's basically out of the game. Turn Times should be relevant to "competitive" civs, which I think top 3 in score is a reasonable indicator.
 
@L. Vern pdan and I think Classical can also use an adjustment, especially T2 as it's visible in the graph. What would be the adjusted cost for it?
Depends on what you want the target length to be. I originally used this config:

Python:
avg_tech_turns_lut = {}
# Medieval Era
avg_tech_turns_lut[5] = 6
# Renaissance Era
avg_tech_turns_lut[7] = 8
# Industrial Era
avg_tech_turns_lut[9] = 8
# Modern Era
avg_tech_turns_lut[11] = 7
# Atomic Era
avg_tech_turns_lut[13] = 6
# Information Era
avg_tech_turns_lut[15] = 5
# Spaceship tier
avg_tech_turns_lut[17] = 4

If you want to fill it out for earlier eras I can run it again off of 2.7 data, of which I have about 80 games now
 
Do these costs include all AIs, or like the top 3 or so AIs?

It might be a mistake to include all AIs, as no ones cares about the schlub at the bottom that's basically out of the game. Turn Times should be relevant to "competitive" civs, which I think top 3 in score is a reasonable indicator.
I originally did have a version where I filtered out all the civs that didn't make it to atomic/info tier but it changed the results very little, mostly just removing outliers
 
Top Bottom