When I was last writing about the Civilization series, I was complaining about how the AIs in Civ VI feel much stupider than the AIs in Civ IV. I encourage you to read that post, because this one is a direct follow-on.
In brief, there were a lot of ways AIs could threaten you in Civ IV. They could send their military to attack you, they could use their production to build wonders before you could, they could use their culture to steal the hearts and minds of your people, making your own cities flip to their side in the process.
In theory, all these methods still exist in Civ VI, but the AIs are very incompetent at executing them. None of the Civ VI AIs can threaten you with their military, wonder-building, or culture the way AIs could in Civ IV. And I think the reason is one of Civ VI’s biggest selling points: unstacking the map.
See, Civ IV militaries came in “stacks,” where 20 to 100 different units could all sit on one tile together and attack wherever they wanted. Defeating these stacks meant you had to have a stack of units all your own, and some people complained that this made warfare just a numbers game without any tactics.
I think those complainers were dead wrong, but regardless Civ V was the first game to “unstack” the military, forcing 20 units to all sit on 20 different tiles instead of stacking together to attack you. Civ VI continues this trend, and coincidentally Civ V and Civ VI have the same problem in which warlike AIs are incredibly bad at war.
But while Civ V was the first to unstack the units, Civ VI went further in “unstacking the map.” In Civ IV and Civ V, your city could have any number of buildings in it that you wanted, built at any time. So you could build a Forge for +25% production, a Library for +25% Research, a Market for +25% gold. The question then becomes, which buildings should you build, and in what order?
If you already know you’re going to build all 3, then you should build the Forge first. It’s bonus of +25% production will speed up how fast you build the Library and the Market after its finished. But maybe you are in a severe economic crunch, and you just NEED GOLD NOW. In that case, maybe build the Market first, and then maybe skip on the library and forge so you city can focus on producing wealth and not spend its scarce resources building infrastructure.
Or maybe your city produces a lot of science, but almost no production or gold. Is it worth building the Market and Forge in that case? Maybe you should *just* build the library and be done with it.
These are all simple ideas, and you can easily see the AI thinking of the game like an excel spreadsheet and just trying to maximize its values at the end. The AI sees its running out of gold, it builds markets in response. It sees a city with high science, it builds a library there. It sees a city with good everything, it builds Forge first, then Library and Market after.
The AI in Civ IV is really just deciding what order to build things in, and when. Its goals can be thought of as simple profit-maximizer functions, and it can be coded in the same way. The programmers who actually built this AI then had a straightforward job in front of them: adjust how the AI weights each one of its goals until you find a system that makes the AI play reasonably well.
You can downweight Libraries if your playtesting reveals that the AI is going bankrupt by building those instead of Markets. You can upweight Forges if the AI is foregoing them to focus only on science and gold.
Up- and downweighting just chances where the AI puts its build orders in the city queue, and while there’s a lot more to build in Civ IV than just Forges, Markets, and Libraries, the build queue itself is quite simple to grasp. It’s easy to visualize the build queue by just writing it out, and it makes sense that you could try to use it to improve the AI’s intelligence while sitting in front of your computer trying to program the game.
But with unstacking the cities, there’s no longer just a build queue. It isn’t just about *when* you build things, but also *where*. Even explaining this system through text or a spreadsheet is difficult, and you’ll see what I mean. And I believe that this difficulty made it harder to program a “good” AI. Because instead of a simple build-queue that can be thought of as a profit-maximizing function, you’re suddenly solving a *graphical* problem instead.
So here’s an example of unstacking the cities. In Civ VI you’ll still build the equivalents of Forges, Libraries, and Markets. Only now Forges give bonus production for being near mines and quarries, Libraries give bonus science for being next to mountains, and Markets give bonus gold for being on a river. Each building can’t stack on top of another building, so you can’t place a Library where you already put your Forge.
Let’s say we have a city that’s just south of a river, near a mountain range immediately to its west, and has some mines on the opposite side of the river near the mountains (so northwest from the city).
Well if you put down the Forge near the mines (so across the river), you invalidate using that spot for your Market. If you then put your Market down on this side of the river, you no longer have any room to place your Library near those mountains.
Is this easy to visualize in your head? Do you think it’d be easy to try to program an AI to maximize its bonuses in this system? I don’t think so, and I think this might be a fundamental problem with the Civ VI AI: it can’t think in terms about graphical problems, it only seems to think about functional problems. And I think that’s because the programmers programming it also had trouble solving the graphical problems because translating a graphic problem into code isn’t something most people are used to.
And I think this is the case because Civ IV’s AI *also* had a fundamental difficulty of solving graphical problems. Most of Civ IV’s gameplay was like those profit-maximizing functions I talked about above: what do you build or research and in what order. But *where* to place your cities is a more graphical problem, and it was one problem the AI was unusually bad at.
Here’s an example of Civ IV’s graphical problem: where to settle your city? You’re playing as Egypt, and Egypt’s special unit is the War Chariot, which requires Horses. You see there is a Horse resource a ways east of some Wheat, and to the northeast of the Horse resource is Fish. Wheat and Fish both provide a lot of food, and food is the most important resource of all in Civ IV (as it is in real history).
So you want to maximize your food AND get the Horses, but how can you get all 3 of these together in a single city? Settling closer to the Wheat gives you a city that’s off the coast and can’t get to the Fish. Settling closer to the Horses means you have to wait until borders expand to get either the Fish OR the Wheat. Settling closer to the Fish means you have to wait until borders expand to get the Horses.
Again, this problem of where to settle cities is probably very hard to visualize. And while a skilled player will quickly learn to solve this problem, it seems the Civ IV programmers couldn’t get the AI to solve it. The AIs will regularly settle cities in terrible spots where they can’t get any resources or can’t get as many resources as they *should* get.
Again, I think the graphical problems of Civ IV were harder for programmers to visualize and program for than the profit-maximizing problems, and that’s why Civ IV is worse at the game’s graphical problems, like settling cities, than it is at the profit-maximizing problems, like when to build its Forge, Library, and Market.
I think as the games’ problems have become more and more graphical, the programmers who are used to coding functions haven’t been able to keep up. And that leads to a severe disconnect between how the programmers want the AI to behave an how it actually does.
I think my final piece of evidence for this is the 2021 patch for Civ VI/
In the Civ VI 2021 patch, the Devs tried their damndest to finally make the AI smarter. They did this by making the AI overemphasize science to a ridiculous degree, hoping that if the AI could have a tech lead against the player than all its other problems would fall into place.
This didn’t work because the AI was still building Libraries in terrible places, it was just now building more of them and invalidating good locations for Markets, Forges, and everything else. The huge overemphasis on libraries created AIs that would blow through the early-game research before stalling out due to a lack of money and production to build buildings in the later eras. The AIs still couldn’t win technology victories, or even beat the player in technology, but when you captured their cities you’d find tons of libraries built in spots that should have had a Market or Forge.
It sounds like the Devs faced exactly the type of graphic problem I’ve described, but tried to solve it with a profit-maximizing solution. The AI can’t research well? It’s very hard to teach them *where* to place libraries, so just tell them to build *more* of them.
I don’t know what can be done to fix this, maybe force the devs to have a copy of the game running on a second monitor as they program, or introduce some training about how to translate a graphical problem into a code-able solution. But I think this difficulty of solving graphical problems is why the Civ VI AI is so much dumber than the Civ IV AI, all the biggest problems in Civ VI are graphical.



