Caveman 2 Cosmos

I wonder if the difficulty level has something to do with the reason the ai's have built tribes and deleted them. I just tested this with immortal difficulty and just checked the world builder and saw 2 ai's with 2 cities. It looks like at the level the ai has no problem, at least early on, founding new cities. No one had reached sedentary lifestyle either. Maybe my noble difficulty game played like it did because i did not turn WFL and TD on.
 
This means that optimally, you'd have to program and fine tune a separate AI for each difficulty level. Which is a lot of extra work. Isn't it better to keep the production to research ratio the same for the AI for all difficulty levels, and dump the variation in difficulty on the player instead? That way you'd only have to program the AI once and it should work the same for all difficulty levels. That makes fine tuning the AI a lot easier.
We tried that remember? You were one of the voices of dissent that didn't like how many turns you had to take to build or research, saying that game difficulty shouldn't be another gamespeed adjustment in feel.
 
We tried that remember? You were one of the voices of dissent that didn't like how many turns you had to take to build or research, saying that game difficulty shouldn't be another gamespeed adjustment in feel.

hmm yeah I'm mixing up two things here.
1) the ratio of tech speed to hammer cost
2) the absolute tech speed and hammers cost (which is adjusted by game speed).

I didn't say that "game difficulty shouldn't be another game speed adjustment in feel", I'm fine with that. I did say that the ratio of tech speed to hammer cost should be roughly equal for all difficulties. With relatively some extra hammers on lower difficulty levels to compensate for more wasteful playing.

For the AI, a fixed ratio of tech speed to hammer cost would make it easier to optimally fine tune the AI. The alternative is to optimize the AI for higher difficulty levels, and accept that the AI plays suboptimal on lower difficulty levels, which is what jshetley is complaining about.

What complicates it extra is that the slower your game speed, the more time you have to hunt, which increases early game tech production, but this has diminished returns on the slowest difficulty levels as you run out of new myths. But this effect vanishes in later eras.
 
I didn't say that "game difficulty shouldn't be another game speed adjustment in feel",
Then it was Toffer that made that point. I think your point was, putting the handicap against the player rather than giving a bonus to the AI on harder difficulties makes it far too long to research and construct and train for the player that it's then boring. For that and for the fact that I confirmed that both points were valid when we were testing the method of giving a player the malus rather than the AI a boost, we declared it a failed experiment and went back to giving the AI a boost instead.

I did say that the ratio of tech speed to hammer cost should be roughly equal for all difficulties.
That is the case either way. The ratio is constant. I believe it is anyhow. There are probably benefits that the AI is not getting enough to keep up on easier settings and that's just a matter of how it all plays out in the wash that it tends to make it harder for them to spread faster on easier settings. It would take a lot of auditing to see how it happens exactly.
 
That is the case either way. The ratio is constant. I believe it is anyhow. There are probably benefits that the AI is not getting enough to keep up on easier settings and that's just a matter of how it all plays out in the wash that it tends to make it harder for them to spread faster on easier settings. It would take a lot of auditing to see how it happens exactly.
It is constant for players on Noble and higher handicap.
Ai gets stronger reduction on construction costs than tech costs on higher handicaps.

I made table some time ago.
Here are AI modifiers for units, buildings and techs.
In brackets I added ratio of unit and building cost modifier to tech modifier.
Prince ---- 90 92 95; (0.95, 0.97) - Close to current build costs.
Monarch - 80 84 90; (0.89, 0.93)
Emperor - 70 76 85; (0.82, 0,89)
Immortal - 60 68 80; (0,75, 0,85)
Deity -------- 50 60 75; (0,67, 0,80)
Nightmare - 30 44 65; (0,46, 0,68) - Easy to expand high and wide for AI.
Compared to old system handicaps got harder except for tech cost on deity and nightmare.

This means effectively lowered construction cost globals for units and buildings.
And we know, that low construction cost is good for everyone (balance is other matter).
AI will build more buildings and units, when they are researching things.
Also this helps boost research rates too.

If building/unit costs gets increased, then things get easier for players.
Units, building and tech cost reduction steps are in 10/8/5 steps per handicap increase.
I added my Excel spreadsheet.

Maybe tech global is too low or construct global is too high for Noble AI?
On other hand StrategyOnly plays on Warlord, and in his savegame all AIs expanded.

I guess someone is efficient.

I'll test game on Noble/Blitz/Standard.
During my test some AIs are wasting time on process and lose scouts/wanderers to animals.
They should always build all buildings, if their cost is less than 25% of current production rate, and if they doesn't worsen properties and its maintenance isn't too high.
Exception would be resource producers, if they don't have given resource yet.

This brute force solution should help AIs especially on higher handicaps and later eras, where are lengthy building chains.
And since that brute force solution would look only for current production, buildings, that are buildable now, properties and resources it shouldn't slow down this game too much.
Also its better to waste turn on 4 cheap buildings than on process.
That is when you reach Classical era, then you should have all buildings from Prehistoric era where it is possible.

Arrived to 100th turn.
AIs reached Ancient Era, but they didn't use tribe to build cities.
I guess they don't want to waste time on tribes on Noble/Blitz/Standard combo.

I added autosave on 150th turn.
Will do Nightmare autorun test.
On this handicap AI will train/build/research things 3.33x/2.27x/1.54x faster than player.

Most of AIs reached Ancient Era on 50th turn and built two cities.
It appears player civ is treated as player during autorun, so basically I'm testing 6 AIs and there are 7 civs in total.

AIs build multiple cities on 130 something turn then game froze.
 

Attachments

Last edited:
It is constant for players on Noble and higher handicap.
Ai gets stronger reduction on construction costs than tech costs on higher handicaps.


I'll test game on Noble/Blitz/Standard.
During my test some AIs are wasting time on process and lose scouts/wanderers to animals.
They should always build all buildings, if their cost is less than 25% of current production rate, and if they doesn't worsen properties and its maintenance isn't too high.
Exception would be resource producers, if they don't have given resource yet.

This brute force solution should help AIs especially on higher handicaps and later eras, where are lengthy building chains.
And since that brute force solution would look only for current production, buildings, that are buildable now, properties and resources it shouldn't slow down this game too much.
Also its better to waste turn on 4 cheap buildings than on process.
That is when you reach Classical era, then you should have all buildings from Prehistoric era where it is possible.

Arrived to 100th turn.
AIs reached Ancient Era, but they didn't use tribe to build cities.
I guess they don't want to waste time on tribes on Noble/Blitz/Standard combo.

I added autosave on 150th turn.
Will do Nightmare autorun test.
On this handicap AI will train/build/research things 3.33x/2.27x/1.54x faster than player.

Most of AIs reached Ancient Era on 50th turn and built two cities.
It appears player civ is treated as player during autorun, so basically I'm testing 6 AIs and there are 7 civs in total.

This looks very interesting here as it applies to my issue. I got the same results with testing a noble/small/blitz game. No one had a 2nd city. On my immortal test 2 of the ai's indeed had 2nd cities when I checked it out. I wonder if the ai will eventually start settling cites on noble difficulty.
 
This looks very interesting here as it applies to my issue. I got the same results with testing a noble/small/blitz game. No one had a 2nd city. On my immortal test 2 of the ai's indeed had 2nd cities when I checked it out. I wonder if the ai will eventually start settling cites on noble difficulty.
Eventually it should - on 150th turn on Blitz/Noble they all had two cities.

In my test turns are slower on Nightmare than on Noble too.
 
Eventually it should - on 150th turn on Blitz/Noble they all had two cities.

In my test turns are slower on Nightmare than on Noble too.
I'm playing a new game with ver38.5 now using a huge map, noble difficulty, and snail speed. This game seems to going differently than the one I started last week with the ai keeping pace with me so far on the scoreboard. No one I know about has hit tribalism yet so I don't know how city building will go. Maybe deleting the cache did indeed change a few things. I also have WFL and TD on this time so that is also helping the ai I assume.
 
I'm playing a new game with ver38.5 now using a huge map, noble difficulty, and snail speed. This game seems to going differently than the one I started last week with the ai keeping pace with me so far on the scoreboard. No one I know about has hit tribalism yet so I don't know how city building will go. Maybe deleting the cache did indeed change a few things. I also have WFL and TD on this time so that is also helping the ai I assume.
Looks like @Thunderbrd should implement feature, that makes cache invalid every time DLL is updated, so this cache is automatically removed after every update.

This mod loads within minute without cache.
 
Looks like @Thunderbrd should implement feature, that makes cache invalid every time DLL is updated, so this cache is automatically removed after every update.
The one for C2C already is and the other is outside my knowledge of how to touch with code in progress.
This mod loads within minute without cache.
That depends a lot on the computer. My wife's takes about 30 minutes. Literally. And we used to play on systems slower than hers is now.
I also have WFL and TD on this time so that is also helping the ai I assume.
Well, true that I'm using that myself with no tech handicaps for humans as well.
Ai gets stronger reduction on construction costs than tech costs on higher handicaps.
Well that should be made to be the same ratio on all game difficulties. The higher handicaps are working better right now so perhaps base the ratio on them and even it out across the rest.
 
Well that should be made to be the same ratio on all game difficulties. The higher handicaps are working better right now so perhaps base the ratio on them and even it out across the rest.
@Toffer90 did that ;)
For example unit and tech cost modifiers for AI would be same as building costs?

On noble its 1:1:1
If I used Nightmare ratio of 0.46x/0.68x/x, then unit and construction cost globals would be lowered so you get Nightmare boost on all handicaps.

I'll align unit/building/tech modifiers to values of building cost modifiers and multiply unit/building globals by Emperor unit/building to tech cost ratio.
Prince ---- 92 92 92; (0.95, 0.97) - Close to current build costs.
Monarch - 84 84 84; (0.89, 0.93)
Emperor - 76 76 76; (0.82, 0,89) <------ Unit/Building globals will be multiplied by those values - midway between Noble and Nightmare
Immortal - 68 68 68; (0,75, 0,85)
Deity -------- 60 60 60; (0,67, 0,80)
Nightmare - 44 44 44; (0,46, 0,68)

I added excel file with handicap calculations, that compares values to old system.

Here are changes to globals.
Code:
    <Define>
        <DefineName>UNIT_PRODUCTION_PERCENT</DefineName>
        <iDefineIntVal>70</iDefineIntVal> - now 57
    </Define>
    <Define>
        <DefineName>BUILDING_PRODUCTION_PERCENT</DefineName>
        <iDefineIntVal>70</iDefineIntVal> - now 62
    </Define>
    <Define>
        <DefineName>UNIT_PRODUCTION_PERCENT_SM</DefineName>
        <iDefineIntVal>50</iDefineIntVal> (With SM units have cost of 71% compared to playing without SM) - now 41
    </Define>
    <Define>
        <DefineName>PROJECT_PRODUCTION_PERCENT</DefineName>
        <iDefineIntVal>50</iDefineIntVal> - now 45
    </Define>
    <Define>
        <DefineName>TECH_COST_MODIFIER</DefineName>
        <iDefineIntVal>400</iDefineIntVal>
    </Define>

I will upload saves of Noble/Emperor/Nightmare on 150th turn. (Blitz/Standard)

That depends a lot on the computer. My wife's takes about 30 minutes. Literally. And we used to play on systems slower than hers is now.

It sounds like hard drive needs serious defragmention and probably it has a lot of bloatware in background
Also Debug mode slows down loading too.
I have two 70 GB HDDs from my previous computer.
HDD is what impact most when game is loading.
 

Attachments

Last edited:
It sounds like hard drive needs serious defragmention and probably it has a lot of bloatware in background
Probably, but then the computer is about 7 years old now too and is just getting a bit old, maybe a bit more.
 
Probably, but then the computer is about 7 years old now too and is just getting a bit old, maybe a bit more.
Is it laptop?
Laptops are generally slower.
What are its specs?
7 year old cheap laptop + debug mode probably would give 30 minutes loading times, especially if it its in power saving mode.

Still it sounds like laptop with bloatware slowing HDD and fragmentation issues.

------------------------------
On 100th turn on Nobe/Standard/Blitz all AIs reached ancient era, but only one built second city.
This is with changes to handicaps and globals.

150th turn/Noble - 4 AIs have 2 cites, rest of them have 1 city.
150th turn/Emperor - 5 AIs have multiple cities, one has only one city.
Not counting myself, as player under AI autorun still acts as a player, just with everything automated.
150th turn/Nightmare - someone has 10 cities and most of civs reached Medieval era!
I have Tech Diffusion enabled in all my tests.

I'll comment out all processes, that convert :hammers: to things and test Noble.
I disabled processes, and turns last around 7 seconds in beginning with 7 AIs.
They are now forced to build things. They can disband units if they want gold.

150th turn, Noble, only null process - everyone had at least 2 cities
Will disable null process - AIs were using one too - they preferred to do nothing over building units and buildings.
150th turn, Noble, no processes altogether.
Situation is bit better as AI couldn't even waste time on processes.

Settlers are 5x - 10x more expensive than units in similar columns....
Tribe, Settler, Pioneer and Colonist costs 72:hammers:
In Tribalism buildings cost 24:hammers:

That is with Nightmare (shouldn't change things for me)/Blitz/Standard and with changes to globals, that I did.
Even at end of Ancient era buildings are cheaper than settler.
 

Attachments

Last edited:
7 year old cheap laptop + debug mode probably would give 30 minutes loading times, especially if it its in power saving mode.
It's not a laptop and its not running the debug dll. It's an 8 yr old system and I can't remember the specs but it's on Windows 7 and she defrags every week. There could be some spyware running in the background as she does coupon, but she does regular debug searches and anti-spyware software searches. Literally when the future stuff was added this cycle the mod went from a 10 min load time to 30. We wait it out to play every night. Other than the couponing stuff, she runs nothing on that system that isn't on mine as well and mine takes about 5 minutes.
 
On older computers, running several spyware and antivirus programs together can slow down a system considerably. I did that once and decided to de-install most of them because the system became unbearably slow. I even went so far as to suspect that the anti-virus programs may have been keeping each other busy by constantly scanning each other's scanning activities.
 
It's not a laptop and its not running the debug dll. It's an 8 yr old system and I can't remember the specs but it's on Windows 7 and she defrags every week. There could be some spyware running in the background as she does coupon, but she does regular debug searches and anti-spyware software searches. Literally when the future stuff was added this cycle the mod went from a 10 min load time to 30. We wait it out to play every night. Other than the couponing stuff, she runs nothing on that system that isn't on mine as well and mine takes about 5 minutes.
Mine is 4 years old, and it can start game within 40 seconds (initial load to main menu, it takes more time to generate Standard map on World map script), if I start it for second time after booting computer.
And that is without caching.

I'm playing directly from SVN.

I didn't feel any difference in loading speed when future stuff was added.
Maybe leaving caching on (this one in INI file) ironically slows down loading stuff?

4 years of difference shouldn't be 30x loading speed difference for this mod.
 
Last edited:
@Toffer90 @Thunderbrd so I should do this or not?
That is change this (and lower handicaps appropriately)
Unit/Building/Tech cost modifiers
Prince ---- 90 92 95; (0.95, 0.97) - Close to current build costs.
Monarch - 80 84 90; (0.89, 0.93)
Emperor - 70 76 85; (0.82, 0,89)
Immortal - 60 68 80; (0,75, 0,85)
Deity -------- 50 60 75; (0,67, 0,80)
Nightmare - 30 44 65; (0,46, 0,68) - Easy to expand high and wide for AI.

to this
Prince ---- 92 92 92
Monarch - 84 84 84
Emperor - 76 76 76
Immortal - 68 68 68
Deity -------- 60 60 60
Nightmare - 44 44 44

and change construction globals so ratio for Emperor is preserved?
Code:
    <Define>
        <DefineName>UNIT_PRODUCTION_PERCENT</DefineName>
        <iDefineIntVal>70</iDefineIntVal> - now 57
    </Define>
    <Define>
        <DefineName>BUILDING_PRODUCTION_PERCENT</DefineName>
        <iDefineIntVal>70</iDefineIntVal> - now 62
    </Define>
    <Define>
        <DefineName>UNIT_PRODUCTION_PERCENT_SM</DefineName>
        <iDefineIntVal>50</iDefineIntVal> (With SM units have cost of 71% compared to playing without SM) - now 41
    </Define>
    <Define>
        <DefineName>PROJECT_PRODUCTION_PERCENT</DefineName>
        <iDefineIntVal>50</iDefineIntVal> - now 45
    </Define>
    <Define>
        <DefineName>TECH_COST_MODIFIER</DefineName>
        <iDefineIntVal>400</iDefineIntVal>
    </Define>

Banning AI from processes and adding arbitrary incentive for cheap buildings (<25% of current production in city) should help AI on Noble too.
Also fixing settler costs would help AI too - currently whole settler line costs 3x of standard buildings in Tribalism techs on Noble/Standard/Blitz.
 
@Toffer90 @Thunderbrd so I should do this or not?
That is change this (and lower handicaps appropriately)
Unit/Building/Tech cost modifiers
Prince ---- 90 92 95; (0.95, 0.97) - Close to current build costs.
Monarch - 80 84 90; (0.89, 0.93)
Emperor - 70 76 85; (0.82, 0,89)
Immortal - 60 68 80; (0,75, 0,85)
Deity -------- 50 60 75; (0,67, 0,80)
Nightmare - 30 44 65; (0,46, 0,68) - Easy to expand high and wide for AI.

to this
Prince ---- 92 92 92
Monarch - 84 84 84
Emperor - 76 76 76
Immortal - 68 68 68
Deity -------- 60 60 60
Nightmare - 44 44 44

and change construction globals so ratio for Emperor is preserved?
It's ok by me at first glance, but I'm unsure why you feel the change is necessary.

Is it related to the complaint about AI expanding too slowly when playing on Noble difficulty?
I don't think this change would fix that issue as it doesn't change much for for the AI when playing on Noble difficulty.
Feels more like an AI code/priority issue in the dll that makes AI unwilling to expand as much as it should on all handicaps.

This means that optimally, you'd have to program and fine tune a separate AI for each difficulty level. Which is a lot of extra work. Isn't it better to keep the production to research ratio the same for the AI for all difficulty levels, and dump the variation in difficulty on the player instead? That way you'd only have to program the AI once and it should work the same for all difficulty levels. That makes fine tuning the AI a lot easier.
I disagree that there is any need for seperate AI's, the AI just has to commit to expanding if there are good spots to settle, it feels its current cities are adequately defended, and its economy can handle expansion, regardless of how many buildings it could potentially build in the time span it takes to train one Settler and its escorts. (Leader personality should influence when those points are fulfilled and thus how fast it expands. Create some variations between teams)
If it expands too slowly on Noble difficulty then it also expands too slowly on all the higher difficulties too imo.
If the case is, right now, that the AI only train settlers after they have built almost all buildings available first, then it is not prioritizing correctly on any difficulty at the moment.
 
Last edited:
Feels more like an AI code/priority issue in the dll that makes AI unwilling to expand as much as it should on all handicaps
Our game on Emperor they are sprouting like weeds. It seems to be that all reports of slow growth are on easier game handicaps. And tbh, I'm not looking into it. Not right now.
I disagree that there is any need for seperate AI's, the AI just has to commit to expanding if there are good spots to settle, it feels its current cities are adequately defended, and its economy can handle expansion, regardless of how many buildings it could potentially build in the time span it takes to train one Settler and its escorts. (Leader personality should influence when those points are fulfilled and thus how fast it expands. Create some variations between teams)
If it expands too slowly on Noble difficulty then it also expands too slowly on all the higher difficulties too imo.
If the case is, right now, that the AI only train settlers after they have built almost all buildings available first, then it is not prioritizing correctly on any difficulty at the moment.
The hold up seems more to be that they are not economically strong enough to spread because they aren't as well established on easier gamespeeds when they hit tribalism and don't get there until later. That's about the only reason they would disband a settler which they've been doing, training them then disbanding them.
 
It's ok by me at first glance, but I'm unsure why you feel the change is necessary.

Is it related to the complaint about AI expanding too slowly when playing on Noble difficulty?
I don't think this change would fix that issue as it doesn't change much for for the AI when playing on Noble difficulty.
Feels more like an AI code/priority issue in the dll that makes AI unwilling to expand as much as it should on all handicaps.
Yes, it is related to AI being slow on lower handicaps.
This change was to unify building/unit/tech costs.
I also lowered global, so it would be ratio like on emperor.
For now I'm not changing things.

AI was only marginally faster on Noble.
I guess banning processes, so AI can't use them, would be good way to prevent AI from wasting turns.
With that AI expanded on Noble slightly better.
 
Back
Top Bottom