AI: Why is it so hard to improve?

eXeel

Chieftain
Joined
May 21, 2007
Messages
79
Hello,

I've played Civ since the beginning and when I started thinking about how to optimize my play, I quickly rose to the hardest of difficulties.
In Civ 5 I played Emperor/Deity.

Now in civ 6 I startede at Prince, to learn the game, but quickly move upwards after 1-2 games.
What saddens me is, the AI feels the same:

  • Don't attack cities optimally (move in slowly, take lot of hits before attacking)
    • Sometimes doesn't even attack cities though outnumbering the enemy, focusing units on the other side
  • An army of 3-4 times the size will lose to me
  • Declares was with 1-3 other nations on you (to even up the lack of combat skill or?)
  • Gets extra units to make them harder to beat
Why is it so difficult to at least make them play 80% of us? It is the combat part that is the worst. They really, really suck.
Have Firaxis or who develops it now, admitted they don't have the skill to make it better or do they feel it improves? It is the main aspect I need changed.
 
Funnily enough, in my last 2 games on emperor I had my capital taken, which i eventually took back but harmed me greatly and I had my slowest victories in these games. Second game I had 3 archers and a warrior on the defense, they rushed my capital with a varied combination of chariots/warriors and 1 slinger quite early. So the AI already is capable of taking cities, not so much in defending them once taken over however, they could have crushed me completely in the second game but didn't send any reinforcements.

I've had moments of AI doing the right things and i can't help but cheer for them :goodjob: If only they would happen more often and with more prolonged threat. The AI though again are absolutely useless on water maps.
 
Funnily enough, in my last 2 games on emperor I had my capital taken, which i eventually took back but harmed me greatly and I had my slowest victories in these games. Second game I had 3 archers and a warrior on the defense, they rushed my capital with a varied combination of chariots/warriors and 1 slinger quite early. So the AI already is capable of taking cities, not so much in defending them once taken over however, they could have crushed me completely in the second game but didn't send any reinforcements.
So... the AI had you over a barrel, and still lost. That just supports the point that the AI isn't very good.
 
Civ AI has been effectively torpedoed since the introduction of 1UPT. In Civ IV I remember being scared %^$# of Monarch level armies.
That is mostly because the civ4 AI at monarch effectively got a 100% bonus to its combat strength. (More precisely, its bonuses meant it could field stacks which are at least twice as big as the human player.) The civ4 AI was also pretty horsehocky.
 
no adjustments needed :)
another "The AI is pretty bad"-thread? How refreshing! :D

Agreed, the AI should be more agressive and if it isn't it should withdraw instead of waiting to get slaughtered. It should be possible to pose a real threat. It doesn't at the moment (or at least it seldom does...). It should get improved...
Will it? Yeah! Will it be tomorrow? Nah!
Will it be by the devs or the community? I don't know - A bit by the devs. A bit later and more thoroughly by the community, that's my guess.

Does the game suck because of the AI issues? Maybe for you but not for me, although I agree it could be better... Personally I'm quite sure they (Firaxis) or the modders (not me - I'm too thick for that) will help us out... Next time wait before getting the game and you'll be fine! :)

P.S.: Thank you for the opportunity - I will now happily copy/paste this, maybe do a few adjustments and post it elsewhere, where they deal with the same topic...
 
That is mostly because the civ4 AI at monarch effectively got a 100% bonus to its combat strength. (More precisely, its bonuses meant it could field stacks which are at least twice as big as the human player.) The civ4 AI was also pretty ****.
Not sure about that 100% bonus. It was more the stacks that were impressive. Had a game once where Justinian on Monarch slammed some 40 plus cavalry into one of my outer cities close to his borders. He basically declared on me and since that city was within 2 tiles of his border his cavalry slammed into it the same turn. Had to go back 10 turns and mass produce machine gun units. 10 turns later he still did the exact same thing, only this time against my 10-15 machine gun units. Very close call and epic battle.
 
The problem with the argument that ending 1UPT has caused the AI issues is that it forgets every other strategy game that can shift multiple units and still have decent AI. So if..big if...that is the case it isn't because of 1UPT, but because the AI programmers they have are unable to do it as good as others in the field.
 
I'm the AI-developer for "Dominus Galaxia" and before have worked on the AI of "Pandora: First Contact" (my AI was only added after release, Patch 1.6.0 and above, so if you only know the game from it's release, it did not contain my AI back then and is much better now!)

To make a good AI you need 3 things:

Dedication, Skill and Time. Oh, and a working Observer-Mode of course.

If the AI of a game is particularly bad, at least one of those was absent.

Assigning just some random programmer near the end of the project, after he finished his other tasks, is not going to give you a good AI.

AI-development should be started as soon as the game is somewhat playable and the person who does it should have volunteered for it and should not have any other tasks.

Was this the case with Civ 6? I doubt it.

If it was and the person also is somewhat good at the game, you should already end up with a decent AI.
The more help you can afford to give them, you should. So if you have any hints for what the AI can do better or know of any cool tricks the AI should use, tell them!

From what I read about Civ 6 AI, the main issue probably are bugs in it. Things to sometimes work but other times not work, often are an indicator for that.

My AI also had plenty of bugs over the time and finding them requires to constantly play or observe. If you see a behavior, that shouldn't be as it is, you have to log what the AI "thinks" before doing it to figure out what goes wrong.

Not attacking a city, when it is clearly what should be done sounds like a prime-example for such a bug. Some calculation probably gives a faulty result and thus leads to wrong behaviour. Should not take much longer than a few hours to find and fix it.

To me the question is not: "Why is it so hard to improve?" but instead: "Have they even tried?"
I always was and still am very open about what I've been doing with my AI. There's a lot of posts from me in the respective steam-forums describing algorithms and approaches in detail and even asking for player feedback on certain things.
Where are those posts from Civ6 AI-devs?
I'm even willing to share some of my algorithms which I think can easily be tewaked to apply to other games. I'd like to play other games from time to time. But they are mostly spoiled for me when I run into bad AI and know I can't do anything to make them better. :(
 
I can't find a direct quote anymore, only text quotes, but the primary reason for the bad AI, Sid Meier thinks you all are losers, doesn't want to hurt your feelings and lets the AI let you win.

http://venturebeat.com/2010/03/12/quotes-from-sid-meiers-keynote-gdc-speech/

In games, you always win. I never get complaint letters from fans and gamers saying, ‘I win too much.’ This is fundamental to entertainment; the player is looking for a satisfactory conclusion.”

“There is a basic dichotomy in games: When you reward players for winning a war and give them 100 gold pieces, the player never really questions rewards. If something bad happens, if there is a setback to the player, the react much differently. They complain the game is broken, the AI is cheating, or something in the game is wrong. You have to be careful with setbacks. It’s important to explain why these things happen, and how to avoid these things in the future. If gamers believe the game is cheating, of you haven’t explained something well, the will leave. I see a big value is replayability. Whenever there is an opportunity to plant the seed of replayability, you’re on your way to a satisfied customer.”

So basically it's a choice for him to see threads where players feel all superior and brag about how they thrashed the "dumb AI" and threads where players feel all butthurt about being beaten by a "cheating AI" give the game bad publicity and leave. And this thread proves Sid Meier is 100% correct in dumbing down the AI just so you could win.
 
I'm the AI-developer for "Dominus Galaxia" and before have worked on the AI of "Pandora: First Contact"...
It's really good to have the point of view of someone who really knows what he's talking about. There are some many people thinking any 1st year computer sciences student would create abetter AI in 1 month. Improving the AI have been done with mods for Civ5 so obviously it is possible,.
Something that have been pointed before thought is that it's much easier to create a good AI for a mod where you know exactly what it need to do than create an AI that's generic enough to work with the base game, expansions and mods. Do you think this could also explain why the AI tends to be bad on Vanilla release : they don't exactly know what they want it to be able to do yet.

I'm not totally convinced by "the AI is dumbed voluntarily so people can win against it" argument. There is a reason Civ has 8 difficulty levels. They want to give casual players the ability to play easy games and power gamers some challenge. It's much easier to dumb down a strong AI by giving it penalties on easy difficulties than making a dumb AI competent on higher difficulties. They could easily win on both fronts with a good base AI.

With a professional AI programmer now on board, i hope once we get the full SDK complete with the game source code, you'll join the modders and help us get the better AI you want as much as we do :)
 
I think that Sid quote that is posted above is important to consider.

We're a bunch of nerds who play this game for hours on end and then come to message boards to talk about it. Probably not the average user.

To the average user, the AI very well may be difficult. We don't know.

Should it improve? Certainly. Are there other factors to consider? Definitely.
 
Not sure about that 100% bonus. It was more the stacks that were impressive.

The AI in civ4 did not build big stacks because it was playing smart or well. It build big stacks because it got bonuses to production, gold, upgrade costs, and in particular, unit upkeep. At monarch, the AI got a 50% discount on unit upkeep. Consequently, this bonus alone allowed it to field stacks that were twice as big as the player. The threat that the civ4 AI posed had nothing to do with it playing well, but with it gettting bonuses that were well suited to improving its play.
 
I'm not totally convinced by "the AI is dumbed voluntarily so people can win against it" argument.
One of the main mechanisms that get proposed for this that the people in charge are satisfied with the dumb AI, and don't give their programmers what they need to make the AI better.
 
Great to have an AI programmer comment. I was always under an assumption it was more complicated than just blood sweat and tears but he is implying that's the majority and maybe explains why its not there yet.

i also think it answers this post so well. Its hard to improve because it takes time and money.
 
I agree that priorities are a large part of it - as noted, a lot of gamers don't necessarily one a 'challenging' AI. If you read steam reviews, for instance, a lot of the complaints the mention the 'AI' are actually complaints about the diplomacy system (and how most of the computer never likes them), not the AI abilities to build cities/wield an army.

I think though, even those that don't want a super-challenging AI at least want an AI that feels like a challenge - not the current obvious mess.

I think 1UPT in and of itself is not the issue - as has been pointed out, the majority of strategy games do 1UPT when it comes to battles (a lot of them, Endless Legend for example, have separate 'world' screens that are not 1UPT and battle screens that are 1UPT - something Civ has steadfastly avoided). It's the density of units to spaces (something the world vs battle screen split avoids) - making movement a mess that's a challenge for the players and even more so for the AI. It's why the barbarian is almost 'better' - it really only has a few units and can just beeline.
 
The AI in civ4 did not build big stacks because it was playing smart or well. It build big stacks because it got bonuses to production, gold, upgrade costs, and in particular, unit upkeep. At monarch, the AI got a 50% discount on unit upkeep. Consequently, this bonus alone allowed it to field stacks that were twice as big as the player. The threat that the civ4 AI posed had nothing to do with it playing well, but with it gettting bonuses that were well suited to improving its play.
The point is that the AI had much less to consider before 1UPT was introduced. It just built a huge stack and threw it at the player. With 1UPT the AI will never be able to match the human player when it comes to coordinating a cohesive attack on a city (making sure all units attack at the same time, enter the firing zone at the same time). It has to take into account the unique terrain surrounding of each city, which units will optimally fit where and how to avoid exposing a specific weak but important siege unit to attacks for example. The point is it simply can't do all those things as well as the human player.

If the AI has a stack on the other hand, it doesn't have to worry about the above details, it just throws the stack against the city. Hence the AI was much more of a challenge during wartime. And I loved it.
 
With 1UPT the AI will never be able to match the human player when it comes to coordinating a cohesive attack on a city (making sure all units attack at the same time, enter the firing zone at the same time).

Perhaps the AI will never be at a human-level, however Vox Populi for Civ 5 has shown that the AI can be taught to competently understand 1UPT.

G
 
The point is that the AI had much less to consider before 1UPT was introduced. It just built a huge stack and threw it at the player. With 1UPT the AI will never be able to match the human player when it comes to coordinating a cohesive attack on a city (making sure all units attack at the same time, enter the firing zone at the same time). It has to take into account the unique terrain surrounding of each city, which units will optimally fit where and how to avoid exposing a specific weak but important siege unit to attacks for example. The point is it simply can't do all those things as well as the human player.

If the AI has a stack on the other hand, it doesn't have to worry about the above details, it just throws the stack against the city. Hence the AI was much more of a challenge during wartime. And I loved it.
But with stacks the AI has to deal other details such as stack composition and order of attack. The civ4 was pretty bad at both (certainly out of the box, the Better AI modders did a good job overtime improving stuff like this), witnessed by you defeating a stack that outnumber you 4 to 1. Just letting it build bigger stack compensated for this to some degree.
 
Top Bottom