• In anticipation of the possible announcement of Civilization 7, we have decided to already create the Civ7 forum. For more info please check the forum here .

The AI isn't worse than in V, but VI is a much harder game for it to play

there's plenty of fog of war in civ which would counteract much of this theory

Actually it doesn't. If Fog of War is what prevents this, and this is able to be figured out by the human player (and it is), then 'gaming' this variant simply means removing the Fog of War. This already existed to some degree in CiV for barbarians. The computer rule that we figured out is 'barbarian camps can only spawn in the Fog of War'. Once we know this, handling it becomes simple. (Not easy, perhaps, but simple.)

This is what I mean. Any mechanism for playing the game can be exploited once the mechanism is known. I'm not talking about what the player can see but what they can deduce/figure out. The only way to combat this is making it unable to be deduced in the time frame that will prevent winning.
 
Yeah I can. With working 10 years in software technical analysis these numbers are surely have at least some substance. Let's calculate. The AlphaGo in it's match against Lee Sedol used 1202 CPUs and 176 GPUs. If you use Amazon EC2 C4 instances (which are focused on computation) with largest discounts (reserved instances), that's about $50/hour for CPU only (without GPU) for 1 game against 1 player. Of course this could be somehow compensated by longer turn times (that's why I've put 10-20 minutes), but in general my numbers are more underestimation than overestimation.

and yet a mobile phone would beat you because you aren't lee sedol

Actually it doesn't. If Fog of War is what prevents this, and this is able to be figured out by the human player (and it is), then 'gaming' this variant simply means removing the Fog of War. This already existed to some degree in CiV for barbarians. The computer rule that we figured out is 'barbarian camps can only spawn in the Fog of War'. Once we know this, handling it becomes simple. (Not easy, perhaps, but simple.)

This is what I mean. Any mechanism for playing the game can be exploited once the mechanism is known. I'm not talking about what the player can see but what they can deduce/figure out. The only way to combat this is making it unable to be deduced in the time frame that will prevent winning.

you can't just remove the fog of war

that's the entire point of it.

barbarians are designed to be easily gamed and exploited. other empires are not

maybe civ would be trivial if you had perfect knowledge and knew that player X was building wonder Y in Z turns, but you don't and you'll make wonders and lose the race, you'll try to pioneer a tech and lose the race, and you'll overcommit to the wrong strategy because you don't know whether another player is planning on invading you or is just investing in economy
 
and yet a mobile phone would beat you because you aren't lee sedol

Sure. That's because there are different approaches for AI. The simplest is optimized bruteforce. It's enough to beat chess champions (because chess have very limited amount of move variants). It's enough to make simple Go AI, but is not enough for complex one. And it's not enough for even simplest Civ algorithm, because the amount of potential actions is enormous.

And if we try to make "fair" AI for Civ, the best approach with currently known algorithms is neural networks. But you can't make them simple. Developers needed to feed thousands of games to the network (all played with the same rules) before it started discovering patterns. Afterwards it was possible to run AplhaGo on limited hardware, including a single computer, but it's performance in this configuration is way under average Go player.

Now back to Civ. Go has 19x19 "tiles" with very limited set of states. Civ has RANDOM maps of different sizes (all bigger than Go field) with different settings, very complex state of tiles and a lot of info outside the tiles and, a very important thing, multiple players on the same setup. Neural network for Civ would require way more info to learn patterns of the game and way more processing power to use.
 
Last edited:
I would prefer if the AI would leave its units near or in its home cities and prefer a base amount of ranged units instead of sending solo scouting warriors everywhere. Archers in Capital and other units in rough terrain in borders carefully attacking out of protected positions and healing/retreating where necessary. Only exception would be for settler guarding,

Is that really so hard to script? I mean we do basic archer exploitation out of own cities and own border hills/roads for decades now and it never had been that complicated.
If they had that it would at least mean them not utterly failing against barbs in civ6 or loosing a city to 3 warriors.
 
I would prefer if the AI would leave its units near or in its home cities and prefer a base amount of ranged units instead of sending solo scouting warriors everywhere. Archers in Capital and other units in rough terrain in borders carefully attacking out of protected positions and healing/retreating where necessary. Only exception would be for settler guarding,

Is that really so hard to script? I mean we do basic archer exploitation out of own cities and own border hills/roads for decades now and it never had been that complicated.
If they had that it would at least mean them not utterly failing against barbs in civ6 or loosing a city to 3 warriors.
What I'm hoping for is that the press release is still a work in progress so it is plausable that they will try to nerf certain aspects of the AI script before release. Or possibly have a big patch something like 1-2 weeks after with all the feedback from gamers.
 
A lot of people here seem naive about AI, saying things like 'all cheating AI is a D+ at best' or indulging in wishful thinking like AI that radically changes its behavior based on difficulty. You can expect the AI to get bonuses in any strategy game on higher difficulties. Some games will have better AIs than others, but the biggest difference between two AIs on different difficulties in the same game will always be the bonuses.

That doesn't mean all AI bonuses are created equal. If the AI can't reliably hit eurekas, so we instead give it a flat 30% boost to tech/culture, what's the practical difference? Not much, as far as I can tell. But if the AI can't move and shoot in the same turn, and instead relies on a huge production boost to send out carpets of units, the game isn't going to be nearly as satisfying.

Fortunately, the AI can at least move and shoot on one turn. The biggest AI problems I've seen so far are not building enough military units and not protecting settlers/builders/cities. I imagine the first is more easily remedied than the second, though I'm worried we'll have underdeveloped AI cities if we simply encourage them to build more army. A production boost would help, but if you rely on that production boost to get all the way from Prince to Deity, you're going to end up with carpets of units again. Encouraging the AI to specialize their cities, so that they have at least one workshop/encampment city cranking out units, might help things, though it's also a trickier solution. Have we seen the AI effectively specializing cities so far?

The second concern seems harder to fix, but I'm hopeful. In past civ games, we haven't really had huge problems with the AI escorting units and protecting cities. That could help quite a bit, but in the current build, it seems like unit behavior has a long way to go. Pretty troubling, but hopefully this is something they're working on and will continue to work on after release.
 
Now back to Civ. Go has 19x19 "tiles" with very limited set of states. Civ has RANDOM maps of different sizes (all bigger than Go field) with different settings, very complex state of tiles and a lot of info outside the tiles and, a very important thing, multiple players on the same setup. Neural network for Civ would require way more info to learn patterns of the game and way more processing power to use.
Go has about 400 possible moves per turn because you can play any unoccupied tile any time. Civ map size is irrelevant because you can't do anything in most of it most of the time. What matters is the number of units and cities, because that's where you make decisions.
By implementing 1UPT, Civ V made it hard on the AI because instead of grouping units in stack and reasoning on 2 or 3 stacks, Civ V has to reason for each unit individually. There are less units, but there are actually more "stacks" of 1 unit. Each unit can move to maybe 10 tiles on average, so the complexity reaches Go's level when a civ reaches 40 units.
Now, Civ VI is improved over V in terms of rules making it easy on the ai, because it can stack some units (support units) together. This is the kind of gameplay adjustment that makes it easier to get a good ai, while at the same time making it easier to move units around for the player.
Imo, the worst problem in Civ V AI is not the strategic aspect, but the tactical one. The number of units doesn't really matter here. What matters is how far in advance one can compute, and brute force could work here, but it's probably too complex for the devs to develp it.
Regarding rules changes, I think it's in fact the best idea to get decent ai. For instance, Civ AI has had a habit of sending units to the other side of the world to wage a war, only to arrive totally obsoleted by the progress of enemy science. Auto upgrading units would lift this issue. It would also make the game less weird (like why do I still have spearmen in 20th century) and reduce some micro. But you'd have to find some other way to spend your gold than upgrade units.
 
Go has about 400 possible moves per turn because you can play any unoccupied tile any time. Civ map size is irrelevant because you can't do anything in most of it most of the time. What matters is the number of units and cities, because that's where you make decisions.

In the first move Civ6 has about 10-15 options to move warrior (depending on the terrain), 10-15 options to move settler and 5 technology choices. That's 500-1000 variants. By medieval the variants for each turn are close to billions. Human player could ignore ineffective and functionally similar variants without a thought. AI can't by default and even optimized bruteforce will cut the number of variants to no less than millions per turn.

Neural networks could work significantly better as they are based on pattern recognition and thus can operate on generally the same level of "planning" as human (just with much worse performance). But:
1. The outcome of such complex neural networks can't be predicted without actual trying.
2. It needs to be fed with thousands of civ games without gameplay patches between them (and with random terrain I'd go with hundreds of thousands to be sure at least some patterns are actually discovered).

EDIT:
The biggest AI problems I've seen so far are not building enough military units and not protecting settlers/builders/cities

Yes. And the first one is a problem of building priorities, which should be fixed by release. The second is the bigger problem, though... unless it's a problem of building priorities too and AI just doesn't have military units to attach.
 
Last edited:
I think the first move of units and choice of tech are not correlated. They are successive choices with no relationship to each other. In particular, it would be silly to choose your tech before moving your units, because moving units or settling brings you more information. So you have 1 choice: move unit or settler first, and then 10-15 options, so a total of 20-30 possible choices for your first atomic action. At this point, information has changed, and again you have 10-15 options for your second move. Then you choose a tech, and have 5 options. To me, this is equivalent to 3 go moves of around 400^3 complexity.
It's only later on when you have a lot of units that the complexity ramps up, as each choice the AI has to perform is one out of (number of unitsx10).
This is just to say I think Civ is actually easier than go in the early game from a number-crunching point of view. It may become harder late-game.

Anyway, it's not even certain NN can handle these problems. Consider that Pacman hasn't been beaten by the deep neural networks despite having perfect information from the player and being trained from human pros games (http://cs231n.stanford.edu/reports2016/106_Report.pdf).

The only reasonable way to code ai for a game like civ is to do it the old way. NN are not proved yet for this category of games, and might require to learn the game from humans to begin with.
 
Of course, there should probably mechanisms so that the AI can change production and research without finishing what they were doing, mechanisms to prevent units from moving in a loop, et cetera...
 
It's only later on when you have a lot of units that the complexity ramps up, as each choice the AI has to perform is one out of (number of unitsx10).

I dont have the time to argue the rest of your post, but on this single point you are wrong. The total number of different combination of unit movements scales as 10^units. Maybe a little less when you take into account traffic jams.

This is an absolutely enormous number, making the 400 moves per turn of go absolutely trivial. And, again, moving units is a fairly small part of civ.

A previous poster suggested that neural networks would need 100,000s of games of civ to learn. I honestly predict that this should be more like tens or hundreds of millions. That is, after all, the learning size used in image recognition, and I dont think optimal civ play is any easier.
 
Example of good game AI? 1830.

Like just about all game AI, its mistakes and tendencies are hardcoded, so after a while a good player can predict what it will do, take advantage and almost always win solidly at hardest difficulty.

But even then, there is a solid sense that the AI is playing the game. It knows how to lay tiles and stations to benefit its own position and mess with yours. It usually has a good idea about what stock to buy, what railroads are good, when to pass on buying. It can even do all of this on randomly generated maps.

A novice and even intermediate human player is likely to lose at the hardest difficulty, in the face of successful and continual AI collusion to hurt the human without unduly hurting themselves.

Programming an AI for Civ is not the same problem. Yet reasonable game AI does exist even outside of games that have received exceptional attention and research: Chess, Go, Reversi, etc.

Subjectively, I like a game's AI to the extent that I have the feeling that it is playing, and that I also need to play in order to win, even if I win far more often than I would against a real intelligence.

To the extent I feel like I am playing in a sandbox, I am better off playing Pokemon Go.

Example of a decent 4x game AI? Imperialism 2. I can crank the difficulty and still usually win, but probably not with a bad starting location, and not if I get too aggressive, and not if an AI just decides to declare war on me before I'm ready, and not if I don't *really play* using most of the tools available to me...

It is interesting that you mention 1830 as an example of a good AI (I agree with your points and it is my observation as well that the game as an excellent AI).

1830 was developed by SimTex (also producer of two fantastic benchmark games that also had good AI's in Master of Orion and Master of Magic). MOO II was also made by this same group and it did well too.

Whoever did the AI work for SimTex certainly knew their business and unfortunately brain dead AI's are an all too common issue with many games. I agree with the posters that say give me a good AI and game play over awesome graphics.
 
The biggest AI problems I've seen so far are not building enough military units and not protecting settlers/builders/cities.
Yes. And the first one is a problem of building priorities, which should be fixed by release. The second is the bigger problem, though... unless it's a problem of building priorities too and AI just doesn't have military units to attach.

Why can't the second issue be addressed by hardcoding certain procedures, like protecting settlers, similarly to improving tiles or placing the units in a certain formation before attacking the city a-la civ V? And then each procedure gets a number which reflects its importance, if two or more such procedures are available?
 
The only reasonable way to code ai for a game like civ is to do it the old way. NN are not proved yet for this category of games, and might require to learn the game from humans to begin with.
Yes, that's what I'm talking about. Just wanted to look at possibilities since people were suggesting making "real" AI for civ.
 
Hi,

It is interesting that you mention 1830 as an example of a good AI (I agree with your points and it is my observation as well that the game as an excellent AI).

1830 was developed by SimTex (also producer of two fantastic benchmark games that also had good AI's in Master of Orion and Master of Magic). MOO II was also made by this same group and it did well too.

Whoever did the AI work for SimTex certainly knew their business and unfortunately brain dead AI's are an all too common issue with many games. I agree with the posters that say give me a good AI and game play over awesome graphics.

I loved moo2 back in the day, though I don't think its AI is anything close to 1830, or even Imperialism 2. The AI was good enough to colonize reasonably aggressively, and good enough to mass large and dangerous invasion fleets. But it did not know how to build good ships or how to prioritize technology. So if you could survive that first fleet, the AI had difficulty amassing a second dangerous fleet. That first fleet was often a huge mass of really crappy ships.

That's still much better than clearing a continent with 3 archers! :(O) I would agree that the Moo2 AI was good enough that I had the sense that someone was playing against me, good enough for me to have fun building up systems and ships without feeling that I was playing solitaire.

So many words, so little wisdom!

Anyway,

Ken
 
HELL YES the AI is dumber.

Yes, the OP is right insofar as the system has become way more nuanced, and the AI simply can not keep up. That much is true. But true is also, that the AI is total bullcrap in way the Civ5 AI handled stuff well.

Just three examples.

1) I saw in several playthroughs that some AI Civs simply stop expanding. They do not found new cities, and that is not due to the many barbarians (alone). I saw several times the AI create a settler and then endlessly moving him around, despite there being empty space. Or in late game, when these AI Civs would have good enough miltary to protect a settler, the AI just doesn't so I have always about 40-50% of the global Civs having 1-2 cities despite massive space around them.

2) Distant AIs or AI Civs with no chance to win whatsoever regularly declare war against me, instead of expanding by conquerering weaker Civs first. So I see America attacking my modern era army with pikemen, which simply is ludicrous. Or Norway declaring war, despite being on the other side of the damn planet, and of course none of their armies EVER reached me, Or France swarming into my country with 20 warriors, staying there for 300 years, and then just moving away again.

3) In Civ 5 there were warlike Civs and peaceful ones. Here, this is totally out of the window, and staying on the good side with some Civs is nigh impossible, even when the other side is the aggressor. I get praised be bein pious and just 4 turns later I am slandered as heretic and so back and forth.

The Civ 6 AI is the most breathtakingly stupid AI I have ever seen.
 
2) Distant AIs or AI Civs with no chance to win whatsoever regularly declare war against me, instead of expanding by conquerering weaker Civs first. So I see America attacking my modern era army with pikemen, which simply is ludicrous. Or Norway declaring war, despite being on the other side of the damn planet, and of course none of their armies EVER reached me, Or France swarming into my country with 20 warriors, staying there for 300 years, and then just moving away again.
I had this as Greece attacked me through a city state. I jsut defended and it eventually conceded and, in the peace treaty, it gave me 2 cities that I had no way of conquering.
 
Top Bottom