Game AI difficulty... bad approach?

Ninakoru

A deity on Emperor
Joined
Nov 14, 2002
Messages
658
Location
Madrid, Spain, Europe
I've been thinking with some of the usual posts talking about:

- How you will not finish industry policy branches, the game is usually over before that.
- How the AI is so stupid that makes more war-oriented policies and branches less useful.
- How the game is easier at lower speed just because the AI is not able to spam units to renew the front lines making conquest much more easy.
- How the game can't be hard enough because the 1UPT makes the AI unit spam useless when there's a point where the active field is already filled with units and more units only mean units waiting to be killed.

I think one of the root problems would be how the difficulty handicaps are set:

- Free starting units and techs.
- Food, maintenance, happiness and worker rate bonuses.
- Cheaper units and buildings.

The problems i see in this are:

- The AI tech advantage give diplo and science wins an edge over the other winning options, specially hampering culture vic, domination can't be compared in the same terms. Each free tech will reduce the winning time 6 turns aprox., and force the player to focus more on science, if only to catch up and keep the AI literacy. Is not a culture victory problem, but a culture problem at a whole, as you will get less policies through it.

This is part of the reason player are pretty much forced to NC rush turns 80-100 in higher diff levels, and the reason most desired classical-ancient wonders are out of reach. With a good start place and some luck and focus you can sometimes beat the AI on the wonder race but is not worthy at all. There is a standard consensus: dont build wonders, do infrastructure and units instead, and steal those wonders later, but this kills part ancient wonder benefit that is maximized if you get them early, not to mention something that should be only applied to military-oriented strats is imposed due to how difficulty works.

- All the boosting based solely on production and economy, does nothing to the battles, other than letting the AI field more units and build them faster. Because of this nature, you will leech this boosts either by trades or by conquering better cities, making the games to last much less turns the higher the difficulties. A faster science makes everything speed up, and culture/religion is not affected by growth bonus unlike other resources.

What I miss is:

- Why not some combat bonuses for the AI against player civs? Due to 1UPT, quality reign over quantity.

If we think about it, what is more dangerous for a Player, an incoming AI army of 6 infantry and 6 siegue units, or 4 infantry and 4 siegue with a 50% combat bonus?

With the AI player fielding more powerful units, military branches would have more sense.

So if we tweak the following difficulty handicaps:

- Remove the free techs for the AI.
- Give to the AI an increasing combat bonus vs players (maybe something like 10% on king, 15%, 25% and 40% on deity)
- Reduce unit maintenance bonuses in proportion to combat bonus (or something like a plain 15% in all above prince diffs).
- Reduce building and unit production bonuses a bit, in order to balance things out (or maybe leaving it as it is).

We get on harder diffs:

- A harder to handle AI at war.
- A bit longer games.
- More presence for religion and culture.
- More freedom in the player science focus.

Well, is just me or anyone else did came to similar conclusions?
 
I think an outright combat bonus vs. the player would be a hard pill to swallow for most players. If you really want to give them a combat advantage, maybe let their units start with 15 or 30xp (So one or two promotions) would be the better route to go. A flat 50% advantage could leave the human player helpless, especially later in the game when that 50% is quite large. With bonus promotions at least that unit would be vulnerable in some terrains.

sadly this difficulty balance problem isn't unique to civ, but all strategic/tactical games in general. The computer simply can't think like a human can, especially if you don't want it to have massive CPU reqs. That said I think there is definately room to improve civ, and if we could find good enough improvements than maybe some of the current bonuses you mentioned, such as techs, could be reduced/removed.

For example I don't think that the AI has the ability to remember anything from the turn before, so it will keep suiciding units into the same choke point or ambush indefinately, and that's just one of several problems that arise from this. If the AI could "remember" certain things, like unit locations, we might see an improvement in their ability to fight both humans and other AIs. However I'm no programmer so I have no idea how difficult such a think would be to implement.
 
For the policies opening in Industrial era: It has nothing to do with AI handicaps and everything to do with not being able to start those policies until you reach the Industrial era. (Combined with default of save policy being off; if it were on you could actually finish Order or Autocracy but would be foregoing a more useful tree.) But they are being turned into Ideologies in BNW which will eliminate the problem.

Combat bonuses: AI gets a massive combat bonus already, but its only against the barbs. (The human also gets a bonus against the Barbs at all levels below Diety, but the AIs is larger at all levels, including Settler.)
It doesn't appear possible to add other bonuses in XML. (You could add a new column, but the code isn't going to know it exists)

Unit Maintenance bonuses: AI actually already gets a massive bonus here; in part since they play on Chieftain which increases the fixed number portion, but they also get an increasing unit supply bonuses as the player moves up in difficulty.

The rest of the proposed handicap changes appears doable.
 
I think an outright combat bonus vs. the player would be a hard pill to swallow for most players. If you really want to give them a combat advantage, maybe let their units start with 15 or 30xp (So one or two promotions) would be the better route to go. A flat 50% advantage could leave the human player helpless, especially later in the game when that 50% is quite large. With bonus promotions at least that unit would be vulnerable in some terrains.

Well, I was talking about 40% in the highest difficulty. Is easy to overcome this bonus, just the general and a dual terrain tipe promotion nets you 45%, something you will get most of the time (then you have room to get more bonuses with flanking, the third terrain bonus, morale, discipline, damaged bonuses...). I am specifically talking about trading quantity with "quality".


I don't think that the AI has the ability to remember anything from the turn before, so it will keep suiciding units into the same choke point or ambush indefinately, and that's just one of several problems that arise from this. If the AI could "remember" certain things, like unit locations, we might see an improvement in their ability to fight both humans and other AIs. However I'm no programmer so I have no idea how difficult such a think would be to implement.

Yeah I also think there's plenty of room to improve. This is specially damaging with the AI null ability for air warfare and to handle submarines. The AI also doesn't count the risk of embark near ranged/siegue units, and sometimes don't attack at all while repositioning its troops.


For the policies opening in Industrial era: It has nothing to do with AI handicaps and everything to do with not being able to start those policies until you reach the Industrial era.

Yeah, you're right. Giving 20 more turns to policies has nothing to do with when you have access to those branches.

Combat bonuses: AI gets a massive combat bonus already, but its only against the barbs. (The human also gets a bonus against the Barbs at all levels below Diety, but the AIs is larger at all levels, including Settler.)
It doesn't appear possible to add other bonuses in XML. (You could add a new column, but the code isn't going to know it exists)

Yeah, I also looked into that, there's a unit training % but is always at 50, I don't know what it is for. To apply such change some lua coding and some good internal mechanics knowledge is necessary, things i do not have.

Unit Maintenance bonuses: AI actually already gets a massive bonus here; in part since they play on Chieftain which increases the fixed number portion, but they also get an increasing unit supply bonuses as the player moves up in difficulty.

Yeah, the general idea is to balance it out so computer has less units but more powerful. This is a loud thought more than enything, free techs disturn game progression so much, AI already have growth and happiness bonuses to aid their BPT, and due to the extreme importance of the tech progression in everything, this is a glaring issue to my understanding. Things like NC rush or beelining education are standards to any strategy, we see it at normal but I thing it is a difficulty handicap design flaw, and should be optional.

For example, yesterday I played a Deity game and gone construction before writing, something should be doable ni any difficulty... I falled so behind in tech and with an error accepting a pace treaty for all my money and luxuries thinking it was his payment, totally ruined the game. Well yeah, was my fault, but I should have gone writing much earlier. Looking at it, there wasn't another option, and that is somewhat a flaw.
 
As for certain war/production policies not being worth it, I kind of disagree. People have their finger on the scale when it comes to the benchmarks used to measure effectiveness in Combat. For Sci/Culture victories, anything that lowers the victory turn is seen as "worth it". Meanwhile, people invest in units and warmonger policies only to the point that they can start capturing AI cities, then anything else is seen as not "worth it".

Take the earlier-turn measure. The thing is that you can score up a Domination win much easier and quicker by favoring production and combat bonuses than you would have by favoring the standard infrastructure things. So, both combat and non-combat choices all pass the earlier turn test for effectiveness.

Or take some other measure, like games won v. games lost. Because combat policies allow quicker and earlier conquest, it necessarily follows that there is some non-zero quantity of games that you would've otherwise lost, that instead you win because you made those choices. Maybe this amount is small, but for non-combat choices, it's the same. When you win Culture or Science on T300, you're losing instead of winning that quantity of games that the AI would've won between T300 and, say, a normal victory at about T400. If you're winning on T300, the number of victories you're snatching from the AI on Emperor is very, very small, but they're still there. You can win Sci victories without Rationalism or any Policy/Tech slingshot, just like you can win Domination without Honor/Autocracy. After a certain point in either route, there's overkill. People just have their eyes closed when it comes to Science/Culture overkill, and Combat overkill is more obvious, provided a player actually makes Combat choices and gets to see the overkill. The problem is when they don't, then win a much slower, less focused Domination win, and then say to themselves, "blaah, blaah, who needs Autocracy?"

As an anecdotal aside, I remember a game where I was playing on a Huge Continents map, going for a Domination win on Immortal. I dominated my continent as the Dutch, set up an enormous Commerce-based Puppet Empire, built Big Ben and went on to a 600 gpt income by the time my Great Admiral found the other continent. There I found a runaway Iroquois with about 25 cities, and a runaway China with about as many. I stole a Navy with Sea Beggars, conquered a foothold on each end of the continent, and went Autocracy for Militarism. By the Atomic Era, I had enough gold to buy a Bomber and a Tank at a 60% discount each turn, which I pummelled down China's and Iroqouis' throats at the same time, trying to outrun their 1400AD Apollo project. The reason I remember is because I DIDN'T get there. I remember thinking to myself that I couldn't have orchestrated a faster Domination win with either more tech focus or military focus, and would've lost by more with other policy choices for the same VC. The problem was going Domination on a Huge Map. But that's just one example of how the combat and production oriented policies really do a lot of work, it's just behind the scenes and you barely notice them until you're beaten.
 
As to overkill for science; since I've now officially won as every civ I just declare victory, quit, and start a new game if I get so far ahead that the AIs have no shot at catching up. Early Industrial era is the soonest I'd make such a call.
From experience if Korea and/or Persia is in the game I'll stay in longer just to be sure.

I'm not much into Domination, I'd have a tendency if I found it iffy to switch back to my tried and true Science victory approach, using the cities I kept to produce somewhat more science than I'd otherwise have.

I also found Culture victory rather boring; but Firaxis is already addressing that with BNW.

I am though working on my own mod. (XML only). It's kind of the opposite approach since I'm sticking with XML, but what I'm doing is:

1: Most ancient buildings maintenance free; Classical & beyond largely unaffected.
2. Small counter esponige bonus for Castles. Counter bonus increased for Constables, Police Station, and especially in the city that's built NIA.
3. Building a Temple doubles religious pressure of the majority religion present. Grand Temple triples religious pressure (compared to base).
4. AI on Prince level.
5. Minimum city placement on the same landmass increased by 1. (I wish I could apply that across different land masses as well, but not possible in XML.)
6. AI Happiness on even standing; AI combat bonus against barbs reduced to Prince level; AI on unit maintenance cost even standing; AI growth even standing.
7. Instead, Human gets an increasing research penalty as the level goes up above Prince. (AI researches at default rate for the world map). (AI also starts with the normal free techs & units for its level.)

Of note, if it were possible in XML to change the national wonder requirement from 100% of all cities to instead a flat fixed number of four, I'd do that as well. (This would shake up the early game; replacing the 2 city NC [and sometimes 1 city NC] with a race to build 4 cities & libraries so that the NC could be started. And in later game if the player had extra happiness and saw an open city spot he would have one less disincentive to founding a new city.)
 
As for certain war/production policies not being worth it, I kind of disagree. People have their finger on the scale when it comes to the benchmarks used to measure effectiveness in Combat.

Well, military policies are less appreciated because they are not needed. Is not that you can already own the AI with or without those policies, the problem is that the benefit from a better empire will also affect your military, and you can archieve victories in less time with good empire building. More money and a better production due to a better empire, affect military, not counting the CRUCIAL aspect of the science, very hard to keep up in higher difficulties. Military doesn't affect science other than with conquest, but again: you can already do that without military.

This doesn't happen in multiplayer, where an extra power (discipline, promotions, damage+ when damaged...) in combat could mean the difference between being able to take a city or not, or being able to repel a superior attack (in units) or not. In MP, those military policies are more valuable. While making AI as smart as a human player is impossible (while there's many room to improvement), making their units more dangerous and harder to kill through a combat bonus is a way to tweak things to get that edge in a very different way, because with more numbers things doesn't change as much due to 1UPT.
 
Ninakoru, last year, I was thinking the same way as you:

http://forums.civfanatics.com/showpost.php?p=11683924&postcount=9

And even tried to mod it in (though, I was less experienced back then):

http://forums.2kgames.com/showthread.php?124479-Mod-AI-Combat-Bonus

Though, I don't believe any of the other AI bonuses should be removed. I think the combat bonus should supplement all the other bonuses the AI already receives.

I also initially thought of ramping-up the bonus from King (10%) to Deity (40%). But, while tinkering with it long ago, I came to the conclusion that those values would be too high since the bonus scales off of all the other increasing bonuses already.

I was thinking either a bonus which increases in smaller increments, like King (10%) to Deity (25%); or a single value across all difficulties, like 20%, would work better. But, I was never able to get it working so I could playtest things and just abandoned it.
 
The Age of Empires series, in the first and second instances, is acclaimed for an A.I. system that has no cheats and is somewhat of a challenge to players up to a veteran skill level. It merely has inhuman APMs, but Human players can learn to replicate some of the micro tricks.

This game has more than war in it, but there are only two realms of idiocy for the A.I.: Making the tech/build choices, and war. War shortcomings should be boosted with war cheats. Tech/build idiocy should be boosted with elements that forgive bad tech and build.
The second would be reduced costs (not for SPs, though - that throws off the balanced meters only further). The first would be... war boosts. :duh:

Spoiler rant on happiness :

Neither of these makes the happiness boosts make sense. A.I. already has the reduced food bucket. If this were present or not, the A.I. should still have to build the colosseums and pick the happiness religions. Why, shouldn't the a.I. be better at this than a Human? With mathematical power it could calculate to a certainty exactly when it needs the happiness. And it doesn't get golden ages... so... the designers thought the A.I. needed growth benefits?
Yes it builds awful cities, but it already will grow more than the player, sooner, and it doesn't utterly fail at tile improvements. Maybe try giving all the civleaders a second personality that actually values winning over its 'flavours'? I mean, when you play a continents game, and Oda and Harun each get their own continent, and in 1550 Oda somehow has less citizens combined than your OCC, is just in renaissance, and hasn't even covered his continent, you just wonder what the hell could be that wrong with him.
 
Thanks for sharing that Barathor, maybe I will take some time to make such bonus work.

I conceive the idea not supplemental but as another AI bonus, and a big one. If you simply add it, you are raising difficulty by a lot (I have that impression too).

My idea is that if you add 20% bonus to AI units, to balance it out you should cut their production by 10%, assuming the computer averages their production half buildings half units. I fear if I only lower units production but I keep building production, computer building choices would be altered.
 
I like this idea. Maybe also boost their city defenses. I like the idea of giving their units autopromotions starting at Emperor. That would help them quite a bit, I think. Cool idea.
 
Well, military policies are less appreciated because they are not needed. Is not that you can already own the AI with or without those policies, the problem is that the benefit from a better empire will also affect your military, and you can archieve victories in less time with good empire building. More money and a better production due to a better empire, affect military, not counting the CRUCIAL aspect of the science, very hard to keep up in higher difficulties. Military doesn't affect science other than with conquest, but again: you can already do that without military.

This doesn't happen in multiplayer, where an extra power (discipline, promotions, damage+ when damaged...) in combat could mean the difference between being able to take a city or not, or being able to repel a superior attack (in units) or not. In MP, those military policies are more valuable. While making AI as smart as a human player is impossible (while there's many room to improvement), making their units more dangerous and harder to kill through a combat bonus is a way to tweak things to get that edge in a very different way, because with more numbers things doesn't change as much due to 1UPT.

Well, I'm not sure. Just apply the reverse logic and see if it holds. Sure, Military is best alongside Science and Infrastructure. But where is Science and Culture without military? You tend to get opportunistically ganged up on if you fall behind in military as well, and then you lose de facto if you are far enough behind. You also can't expand your territory without military, and if you don't expand your territory your Science, Culture and progress on other VC's likewise fall behind what they would've been. The only diffrerence is that it's easier to remedy lags in military strength than it is lags in Science and Culture. These are linear and cumulative, while military is not.

Of course, military objectives are smaller in scope for a Culture game where you need Puppets only for the GPT. But Culture and even Science are also secondary for Military VC's. You need just enough culture to grab the desired military and production policies. You need just enough tech so you have Range 3 Artillery/Battleships and/or Bombers by the time the AI threatens a Spaceship. Likewise, a few CB's and Swords might be enough to satisfy the military objectives of a Science win. It doesn't mean that military wasn't needed. One's primary, one's secondary.

But the fact that one facet of empire building goes hand and hand with another doesn't indicate that one of them is unimportant. Civ V is an empire building game. It's meant to play out like that, really.


I mean, I don't think that giving the AI flat bonuses is going to do a lot for gameplay. Basically, you either have the investment in military to beat a Diety AI to a Domination win, or you're going for some other VC and don't care. And making Domination wins numerically harder is questionable, since they already made cities quite a bit stronger. It's only led to the exploitation of specific tactical holes that pretty much turn Domination into a race rather than a battle of the minds. Which is ok by me because, hey, all the other VC's are pure races as well.
 
Well, I'm not sure. Just apply the reverse logic and see if it holds. Sure, Military is best alongside Science and Infrastructure. But where is Science and Culture without military? You tend to get opportunistically ganged up on if you fall behind in military as well, and then you lose de facto if you are far enough behind. You also can't expand your territory without military, and if you don't expand your territory your Science, Culture and progress on other VC's likewise fall behind what they would've been. The only diffrerence is that it's easier to remedy lags in military strength than it is lags in Science and Culture. These are linear and cumulative, while military is not.

Military might is not essential for science/culture games below Deity. It's a good thing to have, but you can still win quickly without one. I think my two best SV games came when I was 7/8th in the soldiers demographic and I didn't take over any cities. That's not saying that my games couldn't have been faster if I had a military. Just saying that science is all-important for domination whereas the opposite is not true.
 
The only diffrerence is that it's easier to remedy lags in military strength than it is lags in Science and Culture. These are linear and cumulative, while military is not.

Yeah, this is the issue. While you can manage the game with much inferior military numbers, if you produce less science, there's no trick here, you will lag behind yes or yes. I don't lower the importance of military, In fact is the most deciding factor, but is not counted as a resource, because is more a tool than a resource.
 
Agree with the OP's diagnosis of the problem but highly disagree with the proposed solution of giving the AI a flat rate combat edge. This replaces one problem with another, and the new problem is something more annoying and something that was already fixed, decades ago:

Maybe dating myself here, but does this expression ring a bell? - "OMG, my (expletive deleted) battleship lost to a settler!!!" Back in the days of Civ1, we called it "RNG's revenge", and it was much more annoying to deal with than any of Civ 5 "AI incompetency issues" described above. It was a more-frequent-than-you-would-think occurrence where, due to behind-the-scenes dice rolling, units could lose to units they were designed to defeat (pikes vs. knights), units losing to obsolete units (Conscripts vs. phalanx), and the infamous most extreme of examples (battleship vs. settler). This problem has been diminished over the decades, the final step of which being changing units HP's from 10 to 100. By giving the AI a flat-rate combat edge, we'd essentially be trying to reintroduce the original problem.

The problem is that we are all Tiger Woods, and the AI is Stephen Hawkings, and while playing golf, finding it doesn't matter if Hawkings' handicap is 10 or 100. The solution is to try to find a way for the competition to be fun for Tiger (Stephen and AI's don't need fun), not level the playing field by making golf as annoying for Tiger as possible.
 
Top Bottom