New Version - December 1st (12/1)

Status
Not open for further replies.
I think this is reflecting what @CrazyG and @ElliotS were saying - Tall has always been better than Wide, but because the AI only got bonuses for Wide play, it wasn't apparent in @Gazebo's playtesting. Now the AI's bonus are indifferent between Wide and Tall, you can see how good Tall really is.

If you think that Polynesia is bad, try starting games with Arabia. I just quit a Spain game at turn 81 because he had built Stonehenge, the Pyramids, Mausoleum, and the Great Library already.

To reiterate, I debug most of the time with AI handicaps turned off. So this is an incorrect assessment of what I do.
 
Looks like the problem is food/production rewards for historic events.

Does the AI need these kind of boosts? I don't think the reward for city settling was a good choice either, giving a boost on era advance is fine because everyone gets those, but not all AI settle cities or build wonders, it encourages runaways

I could just take away the production and food handicap bonuses. Make it national yields only.

G
 
I could just take away the production and food handicap bonuses. Make it national yields only.

G
Do we have some data on how stonehenge specifically is performing when AI with bonuses get it? I know how much it can snowball for Arabia, whose payoff is much slower than what the AI gets (I think). What exactly does the AI earn for getting one of its bonuses?
 
My leading suspicion would be that the historic events from wonders snowball too hard, a concern I had before this patch was implemented. (Check the thread.)

I would still be wondering about great people. but here's my question:

@Gazebo Do you have information on how many historic events AI get on average by tall/wide and/or era? Also can you track how many of those are from great people/wonders, and/or compare the average to the winners of games? (IE if everyone else averaged a bonus every 4 turns and winner has 2 per turn it would be good to look into.)

I could just take away the production and food handicap bonuses. Make it national yields only.

G
Do you have the ability to make the bonus production apply to units or non-wonders only?
 
My leading suspicion would be that the historic events from wonders snowball too hard, a concern I had before this patch was implemented. (Check the thread.)

I would still be wondering about great people. but here's my question:

@Gazebo Do you have information on how many historic events AI get on average by tall/wide and/or era? Also can you track how many of those are from great people/wonders, and/or compare the average to the winners of games? (IE if everyone else averaged a bonus every 4 turns and winner has 2 per turn it would be good to look into.)


Do you have the ability to make the bonus production apply to units or non-wonders only?

There’s a whole log file dedicated to historic events. HistoricEventLog.

G
 
To reiterate, I debug most of the time with AI handicaps turned off. So this is an incorrect assessment of what I do.

Fair enough. I'm curious then - prior to this change, the handicaps were triggered largely by conditions more commonly met by wide Civs. Certainly, you would expect wide Civs to do better relative to tall Civs when handicaps are turned on relative to when they are turned off. Did you ever see any evidence of this? If not, what is the explanation?

I just don't understand how prior to now, you could feel that the Wide vs. Tall balance for AI was the same independent of the handicaps when the handicaps so clearly targeted Wide play! :confused: So I would be really interested in how your tests played out.
 
Do we have some data on how stonehenge specifically is performing when AI with bonuses get it? I know how much it can snowball for Arabia, whose payoff is much slower than what the AI gets (I think). What exactly does the AI earn for getting one of its bonuses?

See the difficulty thread.
 
Fair enough. I'm curious then - prior to this change, the handicaps were triggered largely by conditions more commonly met by wide Civs. Certainly, you would expect wide Civs to do better relative to tall Civs when handicaps are turned on relative to when they are turned off. Did you ever see any evidence of this? If not, what is the explanation?

I just don't understand how prior to now, you could feel that the Wide vs. Tall balance for AI was the same independent of the handicaps when the handicaps so clearly targeted Wide play! :confused: So I would be really interested in how your tests played out.

The balance is relatively fine - the reality is that snowball wide is still really powerful, and that’s usually who wins an AI game.

G
 
Right, but that's what I'm saying. With handicaps on, I would expect wide civs to snowball because they're triggering the handicaps much more frequently than tall civs are. When handicaps were turned off, were wide civs still running away with the same frequency as when they were turned on?
 
Right, but that's what I'm saying. With handicaps on, I would expect wide civs to snowball because they're triggering the handicaps much more frequently than tall civs are. When handicaps were turned off, were wide civs still running away with the same frequency as when they were turned on?

That’s what I’m saying. Yes. Wide was categorically better for the AI. And still is most of the time.

G
 
If I understand it correctly, previously, the bonuses for AI were like:
if EventX happens, AI gets iHandicap * iEra * (a number)
(iHandicap accounts for difficulty, iEra is the 1-1-2-3-4-... scaler)
Those events were mostly wide things: settling, capturing a city, ... Now it includes historical events. In theory, that alone would have made all tall civs behave stronger in our games. Wide civs now need to use their brute force to knee down tall civs.

But we've seen also a change for how it scales. Maybe a simple quadratic formula is not the best to keep the player's progression. In my school days, we learned that almost any function can be approached by a polynomial, so we'll get more accurate curves with a quadratic polynomial:
ax^2 + bx + c

A two grade polynomial can be set with three points. In our case, we can tune up the polynomial with three simple questions: Is AI much better than human in the early game? Mid game? Late game? By solving the inequality, the factors of the polynomial (a, b, c) can be precisely set. MS Excell has a function that automatically solves this.
 
Those events were mostly wide things: settling, capturing a city, ... Now it includes historical events. In theory, that alone would have made all tall civs behave stronger in our games.

Yep, both the formula and the prerequisites changed at the same time so tracking down the issue (especially in player vs AI games) won't be that automatic.
 
A two grade polynomial can be set with three points. In our case, we can tune up the polynomial with three simple questions: Is AI much better than human in the early game? Mid game? Late game? By solving the inequality, the factors of the polynomial (a, b, c) can be precisely set. MS Excell has a function that automatically solves this.
Silly me! It's actually easier.

If AI is stronger than player in all three points (early-mid-late game), then we decrease c. If AI is going stronger than the player every passing era, we decrease b. And if AI is stronger only in mid game, then we decrease a. And the opposite.

Because there's no set number of events that grants extra yields, it won't be easy to calculate exact values, but with this method we can converge to a good solution.

EDIT For reference, I'm talking about granting AI events : iHandicap * (a * iEra * iEra + b * iEra + c)
 
Last edited:
My leading suspicion would be that the historic events from wonders snowball too hard, a concern I had before this patch was implemented. (Check the thread.)

I would still be wondering about great people. but here's my question:

Great People generation and World Wonder spamming seem like two hallmarks of a Civ doing very well for itself. Having those trigger handicap yields would seem to be the basis for a "Making of a Runaway" Netflix series.

Is the purpose of the handicap triggers to make all the AIs more competitive? Or is it a mechanism to allow the top AIs to really push the player? I always assumed it was the former and the rest of my post is based on that goal. Curious if others assumed or prefer the latter design philosophy.

Handicaps on Era advancement is the trigger I like best since all AIs benefit. City Settling strikes me as neutral-ish; wide can be very strong but has downsides so handicaps maybe help smooth things out; make up for the occasional poor decision. All the rest of the triggers (winning wars, GA, GP generation, WW building) seem like win-more mechanics. Strong AIs get stronger while weak AIs fade away.

Is it possible and would it make sense to make the additional triggers more success-neutral? Some example might be triggering every X techs researched (globally if possible), every session of the World Congress, or every time a World Wonder is built (i.e. all AI benefit, not just the WW builder).
 
Aside from what you guys are talking about i had this happened just a few minutes ago. I saw a mayan settler unescorted running through my terrain. I walk up to him with my warrior then declare war on Maya. Then all of a sudden instead of getting only a worker in return i got 2 workers. I thought what the heck maybe i missed a hidden worker underneath the settler. So i reload to do it again. This time i first declare war and then move my warrior to the unescorted settler. Funny enough this time i get only a worker instead. So i reload again and do the same thing as the first time: i move first then declare war, and yes as you guessed allready 2 workers coming to my side.
 
Because there's no set number of events that grants extra yields, it won't be easy to calculate exact values, but with this method we can converge to a good solution.

EDIT For reference, I'm talking about granting AI events : iHandicap * (a * iEra * iEra + b * iEra + c)
@Gazebo thoughts? I find this to be a very solid idea. Moreover, i think that it is quite easy to take A, B and C from the .sql file. This is a very nice feature to add, cause this will be a way of performing personal tuning of difficulties. Also, as i said before, i think the exponent should also be a variable, as i see right now, it seems that it should be between 1,5 and 2.

This way every player here can play several games with different setups and we will come to final community formula, but we will leave a place for people to experiment with. For example i like Epic speed in terms of speed, but AI on Epic seems to be too easy
 
Alright, so I've reworked the difficulty model a bit. I like the polynomial concept, but it did require me to create more variables for the handicaps table. Which is fine, but it rules out a hotfix.

Anyways, here's the new function:

Code:
int iEra = GetCurrentEra();
    if(iEra <= 0)
    {
        iEra = 1;
    }
    int iHandicapBase = 0;
    int iHandicapA = 0;
    int iHandicapB = 0;
    int iHandicapC = 0;
    int iYieldHandicap = 0;
    CvHandicapInfo* pHandicapInfo = GC.getHandicapInfo(GC.getGame().getHandicapType());
    if(pHandicapInfo)
    {
        iHandicapBase = pHandicapInfo->getAIDifficultyBonusBase();
        iHandicapA = pHandicapInfo->getAIDifficultyBonusEarly();
        iHandicapB = pHandicapInfo->getAIDifficultyBonusMid();
        iHandicapC = pHandicapInfo->getAIDifficultyBonusLate();
        iYieldHandicap = iHandicapBase * ((iHandicapA * iEra) * (iEra + iHandicapB) * iHandicapC);
    }
    if (iYieldHandicap > 0)
    {
        bool IncludeCities = true;
        if (eHistoricEvent == HISTORIC_EVENT_GP ||
            eHistoricEvent == HISTORIC_EVENT_WONDER ||
            eHistoricEvent == HISTORIC_EVENT_DIG ||
            eHistoricEvent == HISTORIC_EVENT_TRADE_CS ||
            eHistoricEvent == HISTORIC_EVENT_TRADE_LAND ||
            eHistoricEvent == HISTORIC_EVENT_TRADE_SEA)
        {
            IncludeCities = false;
        }

        if (IncludeCities)
        {
            int iLoop;
            CvCity* pLoopCity;
            for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
            {
                if (pLoopCity != NULL)
                {
                    pLoopCity->ChangeJONSCultureStored(iYieldHandicap);
                    pLoopCity->changeFood(iYieldHandicap);
                    pLoopCity->changeProduction(iYieldHandicap);
                }
            }
        }

        GetTreasury()->ChangeGold(iYieldHandicap);
        ChangeGoldenAgeProgressMeter(iYieldHandicap);
        changeJONSCulture(iYieldHandicap);
        
        TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
        if(eCurrentTech == NO_TECH)
        {
            changeOverflowResearch(iYieldHandicap);
        }
        else
        {
            GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iYieldHandicap, GetID());
        }   
    }

Biggest changes:

Polynomial model (I need numbers for the difficulties - any ideas for starters? Haven't started testing it yet).
Only 'national' historic events give cities bonuses - otherwise they don't get any bonuses.
The science boost is now flat like the others, so it won't benefit leading AIs more than losing AIs.

G
 
Polynomial model (I need numbers for the difficulties - any ideas for starters? Haven't started testing it yet).
Only 'national' historic events give cities bonuses - otherwise they don't get any bonuses.
The science boost is now flat like the others, so it won't benefit leading AIs more than losing AIs.

Nice ones. No idea for starters (duh I'm useless) but a request: once you decide on some values, can you externalize them into .sql so we players can toy with them? If it's already like that I missed it.
 
I can't overstate how much I feel like this is going to be one of the best changes yet once the numbers are figured out. An AI that keeps pace (or appears too) is unheard of in my experience. Loving this.
Nice ones. No idea for starters (duh I'm useless) but a request: once you decide on some values, can you externalize them into .sql so we players can toy with them? If it's already like that I missed it.
This too if possible.
 
Status
Not open for further replies.
Back
Top Bottom