Let's discuss AI

Ankh

Warlord
Joined
Aug 18, 2006
Messages
188
Location
Sweden
Background to why I'm writing this post can be found here. It's a post from Frogboy (aka Brad Wardell) from Stardock about AI. It's a good read, so I suggest you take a couple of minutes to read it.

The most important part of that post and the point of my post is:

"Once you make it good enough to beat “most people” it gets hard to justify spending money on (sic) more time on it."


I'm sure lots of people here find the AI pretty mediocre and have no trouble beating it. So why isn't the AI better? Is it because the technology isn't there yet, or is it because game developers don't want to devote more resources to improve it when it's good enough to beat "most people"?

How many people think the AI is good enough to provide a challenging game? Can we even tell? How many people think it cheats relentlessly, ignoring the fact that maybe their own gaming skill needs improving. If you make the AI better, will you not only get more people accusing it of cheating making your efforts void?

Let's take a look at the global steam achievement to beat King difficulty:
The Once and Future King: Beat the game on the King difficulty level - 5.6%.

Could it really be that roughly 95% of civ players on steam haven't beaten king difficulty without mods? If that's the case, the AI seems to do a pretty good job of beating "most players", so why should developers devote more time and resources on something that only a few percent will benefit from?
 
The AI, in my experience, only suffers in a couple areas.

One, they're a little careless with their gold.

Two, they're not very good at army maneuvers.

Most of the 'strategies' for victory at higher levels are just exploitations of these facts rather than necessarily more efficient play, so I would say that yes, aside from a couple glaring flaws the AI is able to present a challenge. However, part of this is that the AI ALSO exploits the game system, being awarded stronger economic power, happiness, and the like, rather than relying on its own abilities.
 
Let's take a look at the global steam achievement to beat King difficulty:
The Once and Future King: Beat the game on the King difficulty level - 5.6%.

Could it really be that roughly 95% of civ players on steam haven't beaten king difficulty without mods? If that's the case, the AI seems to do a pretty good job of beating "most players", so why should developers devote more time and resources on something that only a few percent will benefit from?

It should be noted that this only unlocks if you actually win a game on king. After all, only 22.4% of players have the achievement for beating the game on chieftain.
 
The AI, in my experience, only suffers in a couple areas.

One, they're a little careless with their gold.

Two, they're not very good at army maneuvers.

Most of the 'strategies' for victory at higher levels are just exploitations of these facts rather than necessarily more efficient play, so I would say that yes, aside from a couple glaring flaws the AI is able to present a challenge. However, part of this is that the AI ALSO exploits the game system, being awarded stronger economic power, happiness, and the like, rather than relying on its own abilities.

In Bold: That's an understatement. In BNW, I see too many cases where the AI is about -600 gold or more in debt per turn (on standard speed).

In BNW, there are higher penalties for warmongering and so the reason why AI seems so mostly so passive is because they don't want everyone hating them. Don't forget that there is the embargo civ option that really does inhibit a warmongering civ.
 
And in a new advance for Civ AI, Atilla's been programmed with an awareness of his own history:

Spoiler :


In response to the question at hand:

As regards the 5.6% figure, unless it's changed since vanilla Civ V (unlike most other games) doesn't award achievements automatically for every level below the one you've beaten. So there may be people playing on Emperor and above who don't have the achievement for beating King.

The AI itself seems mostly capable to me, playing against it on Emperor and Immortal. It seems to struggle particularly with the new diplomacy victory, but it's moderately good offensively as a combat AI (it just can't defend itself against aggressive human players), and pre-BNW it was easily capable of going down the science victory route (it still is, however both an earlier diplo victory it can't handle and new programming that tends to disfavour Rationalism do it no favours).

It also remains too exploitable for its gold if players are inclined to take advantage of the AI.

As for "cheating", this has always been the way Civ difficulty levels work. I've been pleased to find that, from the lists that come up periodically during play, the AI no longer appears to have excessive quantities of gold, techs or happiness much beyond what you could obtain by playing well (except in the early game where it starts 3-4 techs ahead). Often in those lists I'm somewhere in the middle, occasionally even seeing AIs with negative happiness (pre-ideology).
 
I play ALOT of games, and have hundreds of unfinished games because i don't always play to the end as in receiving victory screen cuz i have no desire to.

I only have 3 games where I complete to the end out of over one thousand hours spent on civ 5. :p

I just lose interest if whatever CIv no longer can challenge me in military might.
 
So what you're saying is that by making Civilization more viable as a franchise (starting with C-IV it was intended to appeal to a broader range of players) they are able to make the AI worse. Looks like those of us who want a good AI have been screwed by the market.

To address one point quickly: beating the game on difficulty x does not unlock all the achievements for lower difficulties.

I have only just unlocked the King achievement because I dropped down 2 levels to try out the new BNW features.

Another issue with using the achievement completion % is that often players will abandon a game when they are clearly winning but do not want to have to wait to satisfy the victory conditions. If I'm way out in the lead in every respect, I'd prefer to start a new game and have a challenge than have to jump through hoops to get a "win".
 
As mentioned above, you have to play on a certain difficulty level in order to get the achievement.

I also can agree that (regardless of civ version) I sometimes quit before the end, because I know I will win (although, now with BNW, it is actually a little bit of fun to play it out).

Most players do not visit forums. Everyone here like to brag a lot (or exaggerate, or a combination of the two), but still, most players don't visit this forum (or any other game forum for that matter). Personally, the civ forum is the only forum I visit of all the games I have. So if we assume that all these people here that say that they play on deity all the time, win with only an archer and so on, all this is true, it's still only an extremely low part of all who play civ. Most players might actually be casual players (who don't care or don't even know about forums) who play on normal difficulty levels and think that is entertaining and challenging.
 
I think people are getting too focused on the steam achievement part and ignoring the rest, of course it's not a good benchmark. Of course people play on other difficulties or don't finish the game when they have won it and that will make the steam achievement misleading. If we are interested in how many people beat the game on the first cheating AI level, to find out if the AI beats "most people" (let's assume, for the sake of this discussion, that the player and AI are on equal footing on Prince difficulty) steam achievement is the best thing we've got, but of course needs to be taken with a grain of salt.

For those few of us that want a deep strategy game with a good AI, why can't we have it? Is it because they can't make a good AI or is it because further development of AI isn't worth it when it has reached a certain level of quality. If no developer cares to develop the AI further than to beat "most people" how will it ever improve? I'm sure the development of AI's would rapidly improve if there was a demand for it, just look at graphics.

Nothing is really being developed for us who want a killer AI, because it's not financially justified. We are just too few and games nowadays are just too expensive to make.

Can we change this somehow?
 
Also in regard to the 5% thing. There would be a substantial amount of poeple who own the game but have not played it. There are many, many copies of vanilla civ v floating around these days due to poeple picking it up as a free game when pre ordering/buying other games (eg. Everyone who pre-ordered xcom).

I'm still surprised the number is that low but I'd guess its primarily down to this reason.
 
I play multiplayer with a lot of my friends, none of which play the game by themself on a difficulty higher than Prince. When we play multiplayer, we always play on King difficulty (otherwise it's to easy for me since I normally play on Emperor). This can be a big challenge for my friends who have issues against the AI.

So there is definite truth in the article. My friends don't see the same weaknesses of the AI that I do. So to my friends, the AI is definitely not "stupid" and has been accused of cheating on multiple occasions (though this is kind of true :p). My friends aren't bad players either, they simply don't read about it or play as much as I do.

Increasing the strength of the AI would be very nice but also comes at a very high cost. How many people, realistically, beat Deity? Even so, a tweak to the tactical AI would be very nice for anyone playing on King or higher. But I know absolutely no one who plays on King or higher, besides myself, out of all of my friends who play Civ5.
 
My biggest issue with the AI is that it does not seem to be aware that another player is about to win the game. It tries to win on its own terms, but it does nothing to try to prevent anyone else from winning despite the fact that there can be only one winner. Unfortunately, I think this was by design, which is really disappointing.
 
My biggest issue with the AI is that it does not seem to be aware that another player is about to win the game. It tries to win on its own terms, but it does nothing to try to prevent anyone else from winning despite the fact that there can be only one winner. Unfortunately, I think this was by design, which is really disappointing.

This is a semi-new development since G&K expansion. In vanilla, the AI would actively hate you for trying to win the game. A lot of people complained about this and it was removed. Thus now the AI doesn't really mind at all if you're going to win.
 
In regards to the combat difficulty, yes, the technology simply is not there. Tactical gameplay is still far more difficult for an AI to math out than a human to understand intuitively; a developer like Intelligent Systems can make brutally hard tactical games and has been doing so for years, but they do it by giving the AI ridiculous advantages such as having several times the number of available units than you, having units pop up on your flank at the beginning of the enemy turn (the Civ equivalent to this would be like Monty being able to summon units inside your cities and sniping your Great Generals with them), AI units just generally being stronger with higher stats than your units could possibly be in the same time frame, etc. etc. That last one especially would get most Civ players to cry foul if it was applied to this game, so it isn't. Maybe in the future AI will reach the point where it can understand tactics but considering the massive amounts of possible movements in a Civ game I think it'll take a while.
 
This is a semi-new development since G&K expansion. In vanilla, the AI would actively hate you for trying to win the game. A lot of people complained about this and it was removed. Thus now the AI doesn't really mind at all if you're going to win.

I found the change very disappointing, competitiveness of the AI was one of those things that attracted me to Civ V over IV in the first place. It's still way better than IV in terms of competition vs role-playing.
 
Basically, the first think I'd suggest is heavily "borrow" the AI enhancement part of VEM/GEM. In particular the part of that mod that teaches the AI how to cash rush properly. (Rather than the base game of the AI isn't allowed to cash rush buildings at all and certain criteria must be met to cash rush units. And as seen when that critieria set too high the AI gets huge piles of gold in late game just sitting there, and when too low, the AI cash spams units.)
 
I tend to view AI performance along two dimensions; apparent and practical 'intelligence'

Most people tend to describe AI as either smart or dumb, but it's a misnomer. AI as it is implemented in most if not all consumer grade products are Artificial in their intelligence. They are largely rules based systems bound by the limitations of the programmers and money.

That said, an AI can be practically intelligent or appear to be intelligent or both.

Let me explain.

Practical Intelligence is the AI's ability to navigate through a game's concepts, ideas and systems and be able to handle it. So if you have a game that requires human players to deal abstractly with the idea of controlling places on a map, can the AI also understand the geopolitical significance of these things? In Civ5, there are city states. Through natural/organic interactions in the game, an AI will care about certain city states but not others. Some AI will passively acquire them, while others will be competitive. Still others will simply conquer them. The city state diplomacy is a success in terms of designing a system the AI understands and hadles well. In Civ5 the player is asked to control units in hexes with 1UPT rules so the AI has to practically understand hexes and 1UPT. As we all know, this is always a work in progress.

But there are also other things the AI can and should do well at. AI can crunch numbers and manage its worked tiles. AI can explore in a deliberate way with no 'apparent' cheats. AI can allocate its votes in World Congress while weighing its own interests. AI can produce a mix of units which it can pull together for war. Though lots of people feel it can't do it as well as human players, but practically speaking, it can do so.

Apparent Intelligence is the high level stuff that most people talk about. This is usually result of several subsystems working together. An AI that manages its economy to build the infrastructure in its cities, road systems and military units that at the end of it we evaluate as its fighting potential. This is judged in terms of how well they 'play the game'

Apparent intelligence also is the AI's ability to not only handle the game in practical terms, but understand it in human terms. So we had a topic a few days ago about the AI getting frisky and asking human players to declare their intentions when an uneasy number of units are parked near their borders. That's an example of apparent intelligence. Another example is the human description of the AI grand strategy module. At times it can be meandering and dumb, but I've seen several stories of the Civ5 AI operating with long-term goals. Holding grudges and not 'suiciding' until it is ready to, and buying itself time by pretending to be friendly in the mean-time. That's programmed behavior. It is not a practical understanding of the game mechanics, rather, it's a behavior programmed to handle human interactions. As being duplicitous is a human trait.

Stepping back (big picture)
Part of a game designer's job in designing a game is making it such as it's systems and rules are easy enough for the AI programmer to craft an AI that can handle it in a practical level. This is why very old 4x games like Master of Orion, made to function on a fraction of CPU power available today, still has a well thought of AI. If the game mechanics/rules are easy enough for programmers to program to, the result could well be an efficient AI that understands all the little parts/mechanics of the game, and it all comes together in a competent AI that is apparently intelligent. But apparent intelligence can only be as good as the resources spent on it as it's always a bit of a cat and mouse game between the human players and programmers to close exploits to game rules that causes the human player to behave a certain way, and or for them to program the AI prevent the human player from taking advantage of it or to also take advantage of said exploits.

Finally, you have the flashy stuff. That is the human-only feature. I generally dislike them (personally) These are game systems the AI either isn't programmed to handle very well, or doesn't handle at all. However, these tend to be the most popular features, as they are often customization and complex features that are either added for fun factor, or is added in an expansion pack with no corresponding increase in programming budget for the AI. A good example is Vassals in Civ4 and the one-way interactions in Civ5 meant to add flavour to the game (AI taunts etc.)
 
This is a semi-new development since G&K expansion. In vanilla, the AI would actively hate you for trying to win the game. A lot of people complained about this and it was removed. Thus now the AI doesn't really mind at all if you're going to win.

That's not really true. Pre-BNW, the AI wasn't quite smart enough to pursue any victory conditions save science all that well - theoretically, it could pursue domination as well, but it rarely actually won with domination, because to do so it would have to save the human player for last (knocking out the human player will end the game without a winner). So really, the AI's only way to prevent the human from winning would be to kill you off, hence constant declarations of war when you got close to winning.

Now, it isn't that the AI doesn't care if you're winning, it's that the AI is capable enough to try to prevent you from winning by trying to win itself and not just exterminating you for getting close.
 
Also in regard to the 5% thing. There would be a substantial amount of poeple who own the game but have not played it. There are many, many copies of vanilla civ v floating around these days due to poeple picking it up as a free game when pre ordering/buying other games (eg. Everyone who pre-ordered xcom).

I'm still surprised the number is that low but I'd guess its primarily down to this reason.

A simple way to correct for this is to look at the number of people who've gotten a relatively simple achievement like Second City or Moving on Up and compare that.

I'd do this, but I can't seem to find in Steam where the percentages of players are for each one.

EDIT: never mind, just found them.
 
Now, it isn't that the AI doesn't care if you're winning, it's that the AI is capable enough to try to prevent you from winning by trying to win itself and not just exterminating you for getting close.
No, the AI doesn't care if you're winning. It will try to win itself, but if you are 10 turns away from winning a landslide World Leader vote, for example, the AI doesn't make any attempt to prevent this from happening. It just goes about trying to pursue victory on its own terms, ignoring the fact that it's own victory plans couldn't possibly come together until after the player has already won the game.

I would much rather the AI try to prevent the player from winning. In the above example, the AI should be trying to buy off or destroy City-State allies of the player. If the player were on the verge of cultural victory, the AI should attack the player's cultural centers. Etc., etc.
 
Top Bottom