Technical commentary on Civ/game AI

These things do not help the AI in this game:

  • DLC > other things as development priority (we have enough evidence to conclude this with some confidence, since known UI lies and hidden rules are still prevalent in the game)
  • Rule changes over time...requires AI updates to use adequately and that adds at least some cost regardless of presently feasible AI approach.
  • Unbalanced rules + poor design: by design the game has multiple victory conditions and some are not competitively viable. Devs gimp AI behavior on purpose so that some of the victories can see the light of day.
  • Flavor vs gameplay: an extension of the above, the AI is intentionally kneecapped so that it acts differently. However, the game mechanics are not implemented in a way that makes this actually a good idea.
 
I remember turn based strategy games in the early 90s taking 30 minutes for one AI turn on a 80486 PC. (Those games usually started with ca. 100 enemy units and once the player had destroyed the mass of initial units, AI turns became faster.)

Modern CPUs can perform billions of calculations in the blink of an eye and have significantly more memory available, it's not really comparable.

When watching a full AI self-running game (auto game), how obvious is AI failure?

Extremely.
Unescorted settlers run back and forth instead of settling
In wars, 60%+ of units are just loafing around, the AI is incapable of using more than 10 units or so at once in vanilla
Doesn't really make an effort to protect its own cities under siege
It makes peace against players while surrounding their capital with units an era ahead
Fails to take 0 health cities with melee units adjacent
Archers and cities frequently fail to fire on units in range and prefer to end the turn
Policy choices are incomprehensible and worse than what random picks would give you
Unnecessary wonders built all the time
Failing to capture freebie civilians
Builds wonders while being invaded
Builds settlers/workers while surrounded by barbs
Takes so long to regroup if it happens to capture a city it loses all momentum
Almost completely ignores aircraft and nukes
Does not use support units properly, they often run around unprotected
Appears to have little concept of the rock-paper-scissors in melee, mounted, anti-cavalary
Runs streams of units into chokes to die
Places units on spots where they can be killed with no effort, including valuable high promotion units
Settles cities it loses in a couple of turns due to loyalty
Does not send governors to cities it slowly loses due to loyalty
Settles a tile away from rivers instead of on top
Frequently does not attempt to kill off barb camps
Barely scouts on land after the first 100 turns
Frequently 'zones out' late game and ends up not doing anything
When low on gold, will build units only to be forced to disband them a few turns after
Doesn't really attempt to stop people from winning
Declares random joint wars without followups
Religious units walk across the map to try to convert random cities
And the list goes on...
 
Again I think the solution is to stop thinking of it as "AI." AI is part of the equation. But really what we're talking about is closer to "level design."

If I'm coding a level in Mario Brothers, I'm not thinking about "AI," but the location and trajectory of obstacles in a player's path. If the Hammer Brothers aren't threatening enough, you add more hammers or change the arc or do something similar to make them more interesting. Other than the fact that building units and buildings in civ has a cost associated, there's nothing too different about it. Some super basic capabilities the AI should do in order to implement this "level design" approach are:
  • Need: Build a Ranged unit and park it in the City Center and (if you have one) an Encampment. Use it to attack anyone who comes near.
  • Do not need: Complex logic to determine whether this is for sure always the perfect choice. It's a reasonable choice.
  • Need: Build air units and use them against enemy units.
  • Do not need: A cost/benefit tree to determine whether air units are the most desirable. They are always desirable, as are any other units in that era. There aren't even that many units per era (maybe 8 max).

Neither of the two things above needs to be thought of specifically an "AI" coding task. You could just as easily be talking about a simple 2D phone app game. It's true that changes to game rules could make those decisions more or less optimal, but nothing should change so drastically in the game that they are baseless. That's the part that needs to fall on the game designers themselves--the game itself needs to be navigable to the eventual AI.
 
Modern CPUs can perform billions of calculations in the blink of an eye and have significantly more memory available, it's not really comparable.



Extremely.
Unescorted settlers run back and forth instead of settling
In wars, 60%+ of units are just loafing around, the AI is incapable of using more than 10 units or so at once in vanilla
Doesn't really make an effort to protect its own cities under siege
It makes peace against players while surrounding their capital with units an era ahead
Fails to take 0 health cities with melee units adjacent
Archers and cities frequently fail to fire on units in range and prefer to end the turn
Policy choices are incomprehensible and worse than what random picks would give you
Unnecessary wonders built all the time
Failing to capture freebie civilians
Builds wonders while being invaded
Builds settlers/workers while surrounded by barbs
Takes so long to regroup if it happens to capture a city it loses all momentum
Almost completely ignores aircraft and nukes
Does not use support units properly, they often run around unprotected
Appears to have little concept of the rock-paper-scissors in melee, mounted, anti-cavalary
Runs streams of units into chokes to die
Places units on spots where they can be killed with no effort, including valuable high promotion units
Settles cities it loses in a couple of turns due to loyalty
Does not send governors to cities it slowly loses due to loyalty
Settles a tile away from rivers instead of on top
Frequently does not attempt to kill off barb camps
Barely scouts on land after the first 100 turns
Frequently 'zones out' late game and ends up not doing anything
When low on gold, will build units only to be forced to disband them a few turns after
Doesn't really attempt to stop people from winning
Declares random joint wars without followups
Religious units walk across the map to try to convert random cities
And the list goes on...

I am impressed that you already have this laundry list - it's awesome. I assume this reflects AI shortcomings even AFTER the AI+ mod does its magic, correct? (stuff you are not able to fix due to not having full SDK or haven't had time to tackle yet) Have you considered categorizing these into tactical combat, strategic combat, production choices, settling behavior, etc? I like lists and can help with that if you want. :) And maybe you can have this as a sticky in the AI+ mod page? MAYBE and (just maybe) the devs could take notice too one day? I love how the conversation is getting more specific vs. just "AI sucks"
 
Again I think the solution is to stop thinking of it as "AI." AI is part of the equation. But really what we're talking about is closer to "level design."

If I'm coding a level in Mario Brothers, I'm not thinking about "AI," but the location and trajectory of obstacles in a player's path. If the Hammer Brothers aren't threatening enough, you add more hammers or change the arc or do something similar to make them more interesting. Other than the fact that building units and buildings in civ has a cost associated, there's nothing too different about it. Some super basic capabilities the AI should do in order to implement this "level design" approach are:
  • Need: Build a Ranged unit and park it in the City Center and (if you have one) an Encampment. Use it to attack anyone who comes near.
  • Do not need: Complex logic to determine whether this is for sure always the perfect choice. It's a reasonable choice.
  • Need: Build air units and use them against enemy units.
  • Do not need: A cost/benefit tree to determine whether air units are the most desirable. They are always desirable, as are any other units in that era. There aren't even that many units per era (maybe 8 max).
Neither of the two things above needs to be thought of specifically an "AI" coding task. You could just as easily be talking about a simple 2D phone app game. It's true that changes to game rules could make those decisions more or less optimal, but nothing should change so drastically in the game that they are baseless. That's the part that needs to fall on the game designers themselves--the game itself needs to be navigable to the eventual AI.
For Firaxis the problem with too much conditional code is that they have to make an AI that works for Civ6 and all scenario/mods including total conversions.
 
The thread starter stated he doesn't have enough time to play. He does not know how poor the AI is, and is basing his decisions off minor amounts of gameplay and anecdotal heuristic intuition. When I played Civ 4, and Civ 5, playing on Warlord in Civ 4, or King on Civ 5, is much more difficult than Immortal in Civ 6. Terrible water based combat that's easy to defeat, lack of air attacks, giving up and sending weak units to be destroyed. It's why it's necessary to give the AI bonus settlers where the early game is difficult at immortal and higher, and where the mid to late game is a joke. Using my intuition (much like OP), I'd say there's a fair probability he's a shill, and/or former/current fir axis employee.
 
Allow me to address the elephant in the room. Any improvements in the AI would have to be balanced against the performance costs, so even if it were a simple matter to improve the AI it might still not be worth it. A casual player who finds prince difficulty challenging isn't going to notice better AI, but will certainly notice longer turn times, especially if he or she plays on large maps with many computer players.

Saying that Firaxis can afford to spend more money developing AI is like saying that Bill Gates can afford to give me a million dollars. Both statements are technically true, but they are completely irrelevant.

I think improvements can and should be made to the Civ VI AI, but those improvements would probably limited to the tweaking of certain behaviors. The only way to make a huge improvement to the AI is to make the game simpler.
Casual player don't play civ6. Plain and simple. Everyone I've ever met plays civ6 at different level but sometimes at high level and few times , sometimes lower levels and spend quite some times (hence they would notice a better AI , they just RP a lot) sometimes high level and a lot of times . What I never sees is someone playing the game liking game at low level and not playing a lot. this combination. Every one spending time with this game already has a profile of a strategist/builder/geek. All age and gender but always the same profile. And all of them find Prince easy after a relatively short while.For some it is *too* easy and hence advance to the next level and start scaling difficulty. Some keep playing it because it is nice to build a nation of happy people or conquer the world or whatever... and they could still want a better AI that makes tactically viable choice like choosing to ally with you as you are an interresting business partner instead of fumbling in a corner while not going to war because they are too weak.
So the business value of a better AI is in my mind indoubtably there.

Failing to capture freebie civilians.
To be fair civ5 worker bait was quite the thing ;) I'd rather they leave some. And they do capture sometimes. I definitely feels the AI is better than civ5 on that one. On the other hand I'm the one sometimes getting a horse crushed because I saw a worker running free ...over there...
 
Last edited by a moderator:
I am impressed that you already have this laundry list - it's awesome. I assume this reflects AI shortcomings even AFTER the AI+ mod does its magic, correct? (stuff you are not able to fix due to not having full SDK or haven't had time to tackle yet) Have you considered categorizing these into tactical combat, strategic combat, production choices, settling behavior, etc? I like lists and can help with that if you want. :) And maybe you can have this as a sticky in the AI+ mod page? MAYBE and (just maybe) the devs could take notice too one day? I love how the conversation is getting more specific vs. just "AI sucks"

Some are made a little better with AI+, it was intended to be a vanilla list of the most glaring issues, based on what I came across during testing. On top of this list, there's a boatload of inefficiencies, like low settle and tile improvement rates, which also heavily affect overall strength. But inefficiencies are imo not nearly as big of a deal as these kind of glaring in your face issues. The difficulty settings kind of hide the inefficiencies, but can't hide the fact you can easily win against someone with 10 times the military score.
Most of the issues mentioned I can't touch at all (or couldn't until the lua possibility showed up), or are inherent enough to the system that even with my changes they still occur frequently.
Actually most of what I could do was in the inefficiencies area, but of the mentioned list biggest improvements are in:
- settlers running back and forth
- regroup time during war
- amount of units that can be engaged during war
- 'zoning out' late game
- build preferences during war
 
To be fair civ5 worker bait was quite the thing ;) I'd rather they leave some. And they do capture sometimes. I definitely feels the AI is better than civ5 on that one. On the other hand I'm the one sometimes getting a horse crushed because I saw a worker running free ...over there...

Oh yeah I don't mean that they ignore civilians in combat situations, that's fair. It's more that I've seen plenty of games where a barb settler was running around in someones lands for hundreds of years, frequently with a unit right next to it to take it.
The underlying reason is that units often literally ignore everything around them, because they're stuck in operations/jobs which don't have attack/take civilian as part of their 'job description'.

This point specifically is like removing one or two civs from the game as they are not able to build a second city even after 100-150 turns.

Yeah, when this issue happens early it's completely devastating.
They're also extremely careless around barbarians even if they do build units, which makes the issue far worse. Humans usually have conservation of their units as the main priority against barbs, and will abuse healing to survive with no/few losses. The AI just runs in and loses several units every time.
 
Back
Top Bottom