New Hotfix Version (12-15)

Status
Not open for further replies.
How sure are we that the handicap is definitely not being given on the settling of the first city, and the log isn't catching that? The earliest a human player as a non-religious Civ can reach a Pantheon is turn 31 - a 5 turn Shrine by settling a Forested Hill and working at least a 1-prod tile with the first citizen. You then get 2 Faith per turn, and need 50 Faith, so 25 more turns, and can reach the Pantheon at the start of the next turn - that's 31. I've ignored Religious City-States and Faith Ruins for the time being.

After observing the first 30 turns of 20 Deity games, I have never seen an AI found a Pantheon later than turn 26. On average, the 7th Pantheon was founded by turn 22.

Now, some of this is attributable to Religious City-States, which can give up to 8 Faith on a first encounter, sure. That helps explain the difference between my latest observation and my earliest observation. But it can't explain why the latest AI founding (turn 26) is so early compared to a human. The two turn-26 observations were both from isolated AI that couldn't reach City-States. That implies they were solely relying on a Shrine. But a Shrine gives 2 Faith per turn, which implies they had to have completed their Shrine on turn 1 to reach a Pantheon by that point.

The only way they can do that... is if the first settled City is still giving the handicap yield, as it gives enough Production to finish the first Shrine instantly.

That's the best I can work out. @ElliotS is right that the opener does count as a policy, but just won't display until a second is taken (I think this is stupid and ought to be changed, btw, but that's a matter from another thread). But that still implies that the opener is being reached... almost instantly.

As though the handicap was being triggered instantly... which is the same explanation for why Shrines are being built instantly.

Can you double-check the code for this @Gazebo? Code is not my forte so I wouldn't know how... :( but it very much looks to me like the very first city settled is still triggering the handicap yields, which I think everyone agreed it shouldn't be.
 
How sure are we that the handicap is definitely not being given on the settling of the first city, and the log isn't catching that?
I see this when settling city: if(MOD_BALANCE_CORE_DIFFICULTY && !owningPlayer.isMinorCiv() && !owningPlayer.isHuman() && bInitialFounding && !isCapital())
Unless isCapital() is somehow erronous, this prevents 1st city from getting the bonus.

Edit.
Also, all other bonuses are given to Player under this condition:
if (MOD_BALANCE_CORE_DIFFICULTY && !isMinorCiv() && !isHuman() && getNumCities() > 1)
So, actually until you settle 2nd city, there shouldn't be any. Well, idk if this is as intended, but that's in the code.
 
It just doesn't look to me like it's working. We can all agree from the pictures I'm showing that the AI is triggering the handicap within the first 10 turns of the game, even if I can't pinpoint it precisely. What else could it be? It's really important we figure it out because IMO it's straight-up breaking Deity. I can't get a Pantheon of any use, I can't get a Religion, even under the best possible circumstances I could never dream of catching up to the AI's cultural output, and in Modern Era their Science output is obscene. I think the only possible victory condition right now is either Diplomatic or maaaybe Scientific if the AI chokes on building the Spaceship parts which it sometimes does.
 
The part that is most confusing to me is this piece of code:

else if (eHistoricEvent != NO_HISTORIC_EVENT_TYPE)
iYieldHandicap /= 2;

What is a NO_HISTORIC_EVENT_TYPE for this purpose? Would that be the city founding idea? Are there others?

The key question to me is...what is the list of all events that trigger this fuction, historic or otherwise?


So since I'm not as familiar with Mod Code (and I'm sure some others aren't as well), I wanted to see if I can break it down to even more of a layman's term:

Determining the Yield Handicap: There are 3 "dials" if you will (A,B,C). A increases with Era bonus * Era bonus. B increases with Era Bonus. C does not increase. These together form the yield handicap.
The specific formula: Handicap Base * (A * Era * Era + B * Era + C) / 100.

Applying the Yield Handicap: The handicap is applied in the following ways:

1) A new era is reached: Gain double the Yield Handicap to the following:
a) Total Culture
b) Total Research
c) Golden Age Points
d) The culture stored for each city (for border expansion)
e) The food stored for each city.

2) A new city is founded or acquired in combat: Gain the Yield Handicap to the following:
a) Total Culture
b) Total Research
c) Golden Age Points
d) The culture stored for each city (for border expansion)
e) The food stored for each city.

3) You gain a GP, complete a wonder, finish an archaeological dig, or complete a trade route: Gain half Yield Handicap to the following:
a) Total Culture
b) Total Research
c) Golden Age Points
Note this one does not effect stored culture or food as far as I can tell.
 
Can I ask, why is this how the handicap is done in the first place? It seems that it just magnifies AI runaways even further. This is especially true when an AI hits a new era. An AI that follows a tech path to get to a new era quicker is greatly rewarded compared to an AI that stays in one era longer...even if that AI gets more various events.

Wouldn't it be cleaner and easier to code to give AIs benefits every X number of turns? That way certain strategies aren't rewarded more than others?
 
It just doesn't look to me like it's working.
The log entry is unconditional from what I see. If you have AI logging enabled, all Handicap Bonuses go to the log immediately after triggering, no matter the reason. It must be something else.
 
For the AI to seem realistic, we need to remove handicaps in the opening stages. Do we really not know where they are coming from?
 
Following my analysis of logs, I also think that Great Person events heavily influence Handicap Bonuses.
The sample here is 139 bonuses, out of which 89 came from GPs (18 from Digs). Best AIs got 23 and 26 of those, and it accounted for 41% and 66% of all yields from handicap.
 
Applying the Yield Handicap: The handicap is applied in the following ways:
It also adds production IIRC.

The two turn-26 observations were both from isolated AI that couldn't reach City-States. That implies they were solely relying on a Shrine. But a Shrine gives 2 Faith per turn, which implies they had to have completed their Shrine on turn 1 to reach a Pantheon by that point.
The AI gets a discount on buildings so if they settle on forest they should be able to build it turn 1. Try a few games with 0 city states and record pantheon timings. If they range between 26-31 with a few earlier from ruins or second cities there's no problem code-wise.

I'm going to start another thread on AI shrine balance.
Following my analysis of logs, I also think that Great Person events heavily influence Handicap Bonuses.
The sample here is 139 bonuses, out of which 89 came from GPs (18 from Digs). Best AIs got 23 and 26 of those, and it accounted for 41% and 66% of all yields from handicap.
But the Great Person bonuses were from all over the game, and the digs were in a short time and only by two civs. This is a crazy power spike.
 
But the Great Person bonuses were from all over the game, and the digs were in a short time and only by two civs. This is a crazy power spike.
Not entire game, I have just a 60-turn sample. They got Archeology somewhere mid that, and started digging immediately ofc :)
It is a spike, I agree. It wouldn't be a problem if those digs were spread out in time, because they are limited. But AI is going for them like crazy.
I've seen the code and there's a counter for each event. So, there could be a simple solution without actually giving up entirely the Dig bonus - limit it to N first Digs (e.g. 3? 5?).

Ideal solution would be to spread them over time, but that would require storing also the turn at which they happen. Much coding, not worth it I think.
 
In one turn, they complete the opener AND the first policy AND the second policy. That's obscene!
Nope, the opener is 1st policy, but it isn't shown (for reasons...)
Then 2nd policy and bam... the opener is suddenly shown, so it adds up to 2.
Weird, but I think it is also how vanilla works.
 
The AI gets a discount on buildings so if they settle on forest they should be able to build it turn 1. Try a few games with 0 city states and record pantheon timings. If they range between 26-31 with a few earlier from ruins or second cities there's no problem code-wise.

This would work as an explanation if every single Deity AI settled on Forest. But they don't. So how to explain how even the non-Forest Deity AI hit Shrines at t26 at the latest?
 
Can I ask, why is this how the handicap is done in the first place? It seems that it just magnifies AI runaways even further. This is especially true when an AI hits a new era. An AI that follows a tech path to get to a new era quicker is greatly rewarded compared to an AI that stays in one era longer...even if that AI gets more various events.

Wouldn't it be cleaner and easier to code to give AIs benefits every X number of turns? That way certain strategies aren't rewarded more than others?
I’d like to echo this. On the surface, it seems that a scaler at regular intervals would be easier to manage and balance. Historical events are far more common in later eras, so that’s another variable to manage. Is there a concrete advantage to the historical event based approach?
 
I’d like to echo this. On the surface, it seems that a scaler at regular intervals would be easier to manage and balance. Historical events are far more common in later eras, so that’s another variable to manage. Is there a concrete advantage to the historical event based approach?

This is how it was done in the old Communitas mod, which I imagine is one of the original sources for VP.
 
Can I ask, why is this how the handicap is done in the first place? It seems that it just magnifies AI runaways even further. This is especially true when an AI hits a new era. An AI that follows a tech path to get to a new era quicker is greatly rewarded compared to an AI that stays in one era longer...even if that AI gets more various events.
Wouldn't it be cleaner and easier to code to give AIs benefits every X number of turns? That way certain strategies aren't rewarded more than others?
That post inspired me to think about an alternative approach, that would be self-adjusting to the game situation and transparent for any strategy AI could go with. I need few minutes to gather my thoughts...

Edit after few minutes. New thread here
 
Last edited:
I've been noticing that too, @Questdog . It's like what I ws saying to @ElliotS earlier. I think something is triggering the handicap payouts which should not be, at a stage very early in the game, although I'm not sure what. It's more easily noticeable on Ethiopia because of their UA, but I've seen other Civ waltzing around at very low turn counts with 2+ policies - we're talking 20 turns or less.

Does anyone have a list of what counts as a historic event?

EVERY difficulty trigger is in the log I mentioned above. Every historic event is in the historic event log. There’s no secrets here.

G
 
EVERY difficulty trigger is in the log I mentioned above. Every historic event is in the historic event log. There’s no secrets here.

G

:( Do you know how the Deity AI are hitting 2 Policies before I can even hit one, then? I genuinely can't explain it...
 
Yes it does. It just doesn't show up until they pick a second policy.

See:



Lastly @Gazebo :
How do you feel about these? I'm just wondering how to proceed on the discussion.
  • AI gets 50% culture compared to other yields.
  • Digs are not counted for Handicap bonuses (leads too easily to snowballs)

Digs are not as heavy as you think. No opinion re : culture.

Here's a good one. I met Venice very early and was capable of observing them.



Here's me meeting Venice on turn 7. They already have 3 techs - I know one is Agriculture, but that still implies they made it through 2 techs in under 7 turns. Is @Gazebo sure he removed Pottery?

On turn 8, 9, 10, no real change. They got 2 more POPs in their cap in those turns, which is... fast, but whatever. Then, suddenly, turn 11...



In one turn, they complete the opener AND the first policy AND the second policy. That's obscene!

Turn 12, I meet Greece. Didn't take a screenshot (apologies), but he has 5 techs and 2 policies. On turn 12!

This is an enormous problem for human players. Culture begets more culture. Before you have your opener, culture is limited to the Palace, the Monument (which won't come online for a while), and maybe a Ruin or two. Compare that to an AI that has Progress' opener from turn 8, especially given how fast the AI gets new pops.

Morever, whatever is triggering the handicap is making other stuff near impossible too. Unless you find a Friendly Religious City-State or a Faith Ruin, you will be last to a Pantheon. Every single time. Doesn't matter if you started on a Forested Hill and get 6 Faith off the Vatican or whatever.

They aren’t completing both. EUI is just not showing that they already had the opener.

How sure are we that the handicap is definitely not being given on the settling of the first city, and the log isn't catching that? The earliest a human player as a non-religious Civ can reach a Pantheon is turn 31 - a 5 turn Shrine by settling a Forested Hill and working at least a 1-prod tile with the first citizen. You then get 2 Faith per turn, and need 50 Faith, so 25 more turns, and can reach the Pantheon at the start of the next turn - that's 31. I've ignored Religious City-States and Faith Ruins for the time being.

After observing the first 30 turns of 20 Deity games, I have never seen an AI found a Pantheon later than turn 26. On average, the 7th Pantheon was founded by turn 22.

Now, some of this is attributable to Religious City-States, which can give up to 8 Faith on a first encounter, sure. That helps explain the difference between my latest observation and my earliest observation. But it can't explain why the latest AI founding (turn 26) is so early compared to a human. The two turn-26 observations were both from isolated AI that couldn't reach City-States. That implies they were solely relying on a Shrine. But a Shrine gives 2 Faith per turn, which implies they had to have completed their Shrine on turn 1 to reach a Pantheon by that point.

The only way they can do that... is if the first settled City is still giving the handicap yield, as it gives enough Production to finish the first Shrine instantly.

That's the best I can work out. @ElliotS is right that the opener does count as a policy, but just won't display until a second is taken (I think this is stupid and ought to be changed, btw, but that's a matter from another thread). But that still implies that the opener is being reached... almost instantly.

As though the handicap was being triggered instantly... which is the same explanation for why Shrines are being built instantly.

Can you double-check the code for this @Gazebo? Code is not my forte so I wouldn't know how... :( but it very much looks to me like the very first city settled is still triggering the handicap yields, which I think everyone agreed it shouldn't be.

The code is working fine.

I’d like to echo this. On the surface, it seems that a scaler at regular intervals would be easier to manage and balance. Historical events are far more common in later eras, so that’s another variable to manage. Is there a concrete advantage to the historical event based approach?

Regular interval bonuses don’t provide the right
kind of challenge. In higher level play having historic events drive handicaps makes it such that a few key big player civs appear that the player has to deal with. That’s more interesting and dynamic than all civs being mediocre.

That post inspired me to think about an alternative approach, that would be self-adjusting to the game situation and transparent for any strategy AI could go with. I need few minutes to gather my thoughts...

What? No. That sounds too complicated.

G
 
Status
Not open for further replies.
Back
Top Bottom