Basic question re AI: RTS versus TBS

What I meant is that I don't think Civ is a "solvable" system. Chess is, although for the huge majority of humans (or all maybe) it behaves as if it isn't (and that's only 64 "tiles" and 6 different units for 2 sides)

You have no idea what a neural network is. NN is specifically designed for non-solvable problems - and chess is for all intents and purposes non-solvable. NN is also used for object recognition, speech recognition etc...

Also, chess is far more dynamic than Civ tactically. Whilst the large number of possibilities in civ gives the illusion of more variety. Attacks in civ are far more straightforward and unit roles are rigid and 1-dimensional. Archers at the back, melee in front. In fact most high level players tend to spam 1 unit (e.g. mass knights) and just rush in - with rams or such to take down obstacles presented (walls for example).

Civ AI isn't AI at all. It is a bunch of scripts and decisions made in isolation. The civ computer players never win, they sometimes accidentally stumble on a science victory.

For better or for worse, this is how things are.

Companies like deepmind present a bright future. It may be possible that in the near future, companies like deepmind can sell their services and create and train simple ANN-assisted AI for games like civ.

One thing interesting regarding the Starcraft2 deepmind presentation was that they trained the AI for only 7 days against itself before going against the pro-players.

Why is this interesting? Well one of the reasons AI is terrible in civ is that the developement of a good AI requires a ruleset and game engine that is fixed: i.e. you need to first create the game in it's final state before you start to think about AI, otherwise even change you make in development would require starting the AI from scratch [or near]. For this reason most of the AI development would have to come AFTER THE GAME DEVELOPMENT IS FINISHED. Unfortunately the practicalities of real life means that, at that point games are released to cash in on their investment.

However if companies like Deepmind can offer AI training in a matter of 7 days, even a month - then such a time-scale can be incorporated into the overall game development cycle.

edit:

Here's an interesting link regarding machine learning applied to free-civ from a while ago.

https://www.digitaltrends.com/computing/arargo-hiro-ai-freeciv/
 
Last edited:
  • Like
Reactions: cvb
You have no idea what a neural network is. NN is specifically designed for non-solvable problems - and chess is for all intents and purposes non-solvable. NN is also used for object recognition, speech recognition etc...

I do. No, they are not. Yes, it is. Object recognition, speech recognition, etc == Pattern recognition == NNs. Patterns == solvable. Sorry, but try harder.
 
I've formally studied AI in the past, but that was almost 10 years ago. I think if I had to create an effective civ AI, I'd use rule-based systems. There's no doubt in my mind that if Firaxis wanted to create a brutal, merciless AI they could do so easily. But then it'd be far from enjoyable since players would be engaged in defending their lands constantly if they're not crushed outright. Eventually they'd fall behind to AIs that didn't have to invest as heavily into units.

I think a good AI could be put in place without much difficulty. After all to be decently successful at civ, at a very basic level, you need to settle good spots and train enough ranged units to be able to protect your lands. Evaluating which places are good to settle would be a breeze for the AI. Training units at the moment is also a breeze for them. Once you hit a certain number of cities, then you can start setting other goals, whether that's churning out another ton of units for an invasion or going for a victory condition.

Though elements like settling would be extremely easy for an AI to be great at, the question is then when do you perform the computations? I'd expect the computations to be done while the player is taking their turn, but I don't know what's going on in the background and how that's coded. This is probably the biggest factor outside of investment that's leading to the choice of which AI system to use.

Naturally as @Rath_O_God and others have pointed out, the need for AIs to fill in as role-players is far more important to civ than it is to have them as strong opponents. The question for devs and publishers will always be, should the AI be invested in or should investment instead go towards new features, new graphics, marketing, etc.? How many players would really notice and enjoy playing against a much better AI, and would prefer that over a new feature or civ? Those have far more appeal.

Civ 6's AI is in an alright state, the problem is its weaknesses are (or were) far too apparent. On release it wasn't able to take cities because it cared too much about its units or something like that - that kind of weakness is too visible and reduces confidence in the AI severely. Another point is not sufficiently protecting key districts like spaceports when going for science victories, or going for multiple ones. I remember one game against Sumeria where Gilgabro only had to finish the last step and I was frantically training a spy to sabotage his spaceport. When I got there I found that the other AIs had already beaten me to the punch. I think Gilgamesh could've finished it if he really was programmed to protect it well.

I think with those kinds of weaknesses sorted out, the AI is definitely in a state that works for most Civ 6 players, though in some cases it still might not be enough for hardcore fanatics like us :D Still though I'd say it's passable and I don't have a problem playing against it. I've modded units to be cheaper and the AI is quite ruthless as a result. I'm considering playing without that again as there are just so many units. For an added challenge mods like immersive eras force the AI to get all era-related techs, so they'll always have era-appropriate units while they have a tech lead.

On a hunch I'd say Firaxis is one of the best devs, if not the best, at providing modding support. How many other games have gotten their DLL released? I'm not sure actually.
 
Last edited:
I've modded units to be cheaper and the AI is quite ruthless as a result [...] they'll always have era-appropriate units
Cheaper units for all or just the PC-players? I plan to modify some tile yields & combat strength _only for the human player_ to slow him down a bit, nearer to time when the PC-players start to manage victory.
the best, at providing modding support. How many other games have gotten their DLL released?
Patience is virtue?!
 
There's no doubt in my mind that if Firaxis wanted to create a brutal, merciless AI they could do so easily.

Not a chance.

Civ6 is basically rock bottom of the series, Deity having direct bonuses to unit strength (never happened before), three settlers, and it's a joke. You can't even comprehend how much it will take to even remotely challenge good players at equal footing, let alone defeat a top player once at equal footing.
 
He meant the +3 combat bonus in Deity, etc... that never happened before.

Right my point is that the AI in Civ5 received bonus promotions which is the same idea as increased combat strength. They probably avoided free promotions this time around cause they're more impactful than before, although they do increase their XP gain rate.
 
They also ignored happiness and bankruptcy.

Before BNW, the AI played on chieftain lmao.

Civ 4 had a working AI but it basically had no upgrade costs and pretty much played according to its own diplomatic rules and could cheat by peacevassaling.

Going further back, you'll see more blatant things that the AI isn't playing the same game.

Still 5 and 6 have such terrible AI that goes beyond 1 upt, so....
 
I think it is easier to make a strong AI in an RTS because in a RTS, quick reflexes matter more. And a computer can have much faster reflexes than even the best player. The AI can implement its actions in a millisecond. For example, the AI does not need to move a mouse or hit a key on the keyboard to build a new unit, it can just do it instantly. And a human will take a little time to notice a problem on a different part of the map whereas the AI will know instantly that it is running out of resources or being attacked somewhere. Plus, the strategy in a RTS is not that complex. It usually boils down to build units and rush the opponent. The AI can instantly build units as soon as it has enough resources. Even the fastest human, will be slower than the computer at noticing problems or responding to them.

On the other hand, TBS tends to favor the human player because there is no need for quick reflexes. Both sides can take all the time they need. So the quality of the strategies and tactics will be more important. And this is where humans will shine. Unless you are dealing with some machine learning super AI, most humans will always strategize better than a computer. And humans are really good at thinking outside the box and dealing with the exceptions like the case where normally X is the right strategy but in this particular instance, Y is actually the better strategy. Computers tend to just follow a rigid set of rules, if X do Y. They can't really think outside the box like humans can. So strategy games like civ where there is no time constraint, heavily favor the human player.

The AI testing in this case had its actions per minute and screen changes deliberately suppressed to be well below pro speed, evidenced by the fact that both of its opponents in this test case had significantly higher input rates.

The "build units and rush the opponent" is an egregiously unfair representation of strategy in Starcraft 2, it's about as disingenuous as claiming the same for Civ 6 (how many competitive PvP games don't come down to military? How many deity games are unwinnable by simply building units and rushing the opponents?).

Civ 6 performance is so crappy that it might be challenging to actually run several thousand games in a neural network scenario though.

It might be possible for a neural network to learn to do that, but, compared to the approaches used for Go and SC, the Civilization series lack a readily available database of thousands of pro-games (pro being key here) to be fed to the network for initial analysis.

They'd almost certainly have to do like they did with the chess one and have it spam games against itself. That engine destroyed stockfish and is likely the best chess program right now.

Doing this in civ would take ages though, there are so many map iterations + civ combinations and such. Even if you had it ignore uniques it's hard to imagine today's machines having the resources to actually run enough Civ 6 games against itself to learn good play from scratch.

NNs excel in recognizing patterns; there is no pattern in a good civ game.

You might be giving Civ too much credit here :p. There are a large number of things in Civ games experienced players virtually always do, and another set of things that are effectively "always true under x conditions".

Set the AI to go for military victories since that's the only non-PVC in civ and I'm not convinced we have an unsolvable problem given the state of the game...
 
Last edited:
The "build units and rush the opponent" is an egregiously unfair representation of strategy in Starcraft 2, it's about as disingenuous as claiming the same for Civ 6 (how many competitive PvP games don't come down to military? How many deity games are unwinnable by simply building units and rushing the opponents?).

There is a still a big difference though between SC2 and civ6. SC2 is about destroying your enemy's base. Nothing else! You build a base, collect resources needed to build units and you try to destroy the other base with those units. Meanwhile, the enemy does the same and whichever base gets destroyed first, loses. Of course, there are strategies and tactics but ultimately the purpose of the game will favor rushing. You are never going to build multiple bases and pursue a science or culture victory in SC2. Civ6 involves multiple bases, called cities, and the goal is not to destroy the enemy although you can still do that if you want, but rather, involves building culture and science and wonders etc and you can win through non-military means. The goal of civ6 is very different.
 
There is a still a big difference though between SC2 and civ6. SC2 is about destroying your enemy's base. Nothing else! You build a base, collect resources needed to build units and you try to destroy the other base with those units. Meanwhile, the enemy does the same and whichever base gets destroyed first, loses. Of course, there are strategies and tactics but ultimately the purpose of the game will favor rushing. You are never going to build multiple bases and pursue a science or culture victory in SC2. Civ6 involves multiple bases, called cities, and the goal is not to destroy the enemy although you can still do that if you want, but rather, involves building culture and science and wonders etc and you can win through non-military means. The goal of civ6 is very different.

Even so, if you destroy the enemy bases in Civ 6, you win. The state of opponents might impact which you prioritize. Isn't that still the MP meta too?

Also some noteworthy stuff, for those that follow Sc2 and actually watched the games. There was some stuff you don't normally see from the AI in those games that stood out to me:

  • Oracle harass was very similar to how humans do it, right down to timing for distraction.
  • When human player pushed the AI units it deliberately retreated them in the middle of the map dynamically, but stopped when it realized its opponent was pushing through a choke and fought there (I'd not seen an RTS AI pull this tactical positioning previously).
  • AI decision-making in tactical micro situations was exceptional in general. This wasn't just doing actions quickly, it was consistently choosing correct actions in response to player choices.
That said, it would have a long way to go in Civ 6. Perhaps it could be compartmentalized, however. For example using something like this to teach it unit control while leaving other stuff in the hands of if-thens/scripts/etc. The number of possibilities would be much less if constrained in such a way.
 
There is a still a big difference though between SC2 and civ6. SC2 is about destroying your enemy's base. Nothing else! You build a base, collect resources needed to build units and you try to destroy the other base with those units. Meanwhile, the enemy does the same and whichever base gets destroyed first, loses. Of course, there are strategies and tactics but ultimately the purpose of the game will favor rushing. You are never going to build multiple bases and pursue a science or culture victory in SC2. Civ6 involves multiple bases, called cities, and the goal is not to destroy the enemy although you can still do that if you want, but rather, involves building culture and science and wonders etc and you can win through non-military means. The goal of civ6 is very different.

Just want to add, Civ game AIs are also expected to almost play ball with you to some extent. The entire Diplo screen is a nightmare. Strategically makes no sense that an AI trade away their lump sum gold for almost anything other than maybe Strategics they want to use right away, or for them to not all Pile on to you the moment you are starting to run away with the game. The devs are a bit hamstrung with what they can do with the AI before they get an entirely different set of complaints.
 
Last edited:
Civ6 involves multiple bases, called cities,

Umm, gl winning off 1 base in any Sc2, or any RTS really.

You have to build more bases too, and establish map control. Sure you don't win science victories and such, but teching to later in the tech tree is a thing.

And regardless, expanding isn't like, unique to Civ either. I'd post a jab at Civ 5 again, but that's old hat.
 
Just want to add, Civ game AIs are also expected to almost play ball with you to some extent. The entire Diplo screen is a nightmare. Strategically makes no sense that an AI trade away their lump sum gold for almost anything other than maybe Strategics they want to use right away, or for them to not all Pile on to you the moment you are starting to run away with the game. The devs are a bit hamstrung with what they can do with the AI before they get an entirely different set of complaints.

Some people claim that the AI trying would break immersion, but I assert the opposite. The fact that my supposed opposition is playing for a different objective often only tangentially related to actual victory conditions is off-putting and dishonest.

It's an indictment of the game's design that the devs consider that it would be a bad experience if the AIs explicitly tried to win. It's an open admission that the game systems in their present form do not work, that the game has obvious degenerate incentives. And yes, I extend this even as far back as Civ 4 and hold it as a refutation to Soren's arguments about "fun" AI, too.

Can't expect much from an AI when devs intentionally kneecap it. Pdox does this too. It's annoying.
 
I just saw this article about an AI crushing it on Starcraft: https://www.vox.com/future-perfect/...l-intelligence-google-deepmind-starcraft-game . As you know, Starcraft involves infinite amount of possible decisions every microsecond, and this AI was able to beat proplayers.

I am confused about how an AI exists that is able to beat programmers in an RTS game involving an infinite number of possibilities and choices that have to be made every nanosecond, when the same AI is unable to play a TBS involving a smaller number of choices (granted, still a lot), on less of a compressed timetable.

I also remember someone saying that the AI programmer in Civ 6 was brought over from Starcraft. To me starcraft is infinitely more complicated (and hard as hell, which is why i stopped playing). Why is it so hard to make a good Civ 6 AI?

I think you're misunderstanding how complex Starcraft is from a computing perspective - it has a rather small list of units for each faction, build orders that can be stereotyped, and aside from casters all units do exactly one thing - attack things. There are decisions regarding what to attack and where to attack from, but a game like Civ has the same - albeit at a lower resolution - with a far more complicated set of decisions involving establishing an economy, producing units and bases, and interacting with other factions than simply "tech to level 3". Starcraft is a challenging game, but it is not a complex one and certainly doesn't feature an "infinite amount of possible decisions".

Also, the AI in the study "cheated" in the sense that it was given full view of the map at all times (or at least the ability to zoom out further than a human player), so it could time and direct its attacks and defences appropriately - and it lost when this function was disabled in the finals:

https://www.rockpapershotgun.com/2019/01/25/google-deepmind-ai-beats-starcraft-2-pros/
 
Some people claim that the AI trying would break immersion, but I assert the opposite. The fact that my supposed opposition is playing for a different objective often only tangentially related to actual victory conditions is off-putting and dishonest.

It's an indictment of the game's design that the devs consider that it would be a bad experience if the AIs explicitly tried to win. It's an open admission that the game systems in their present form do not work, that the game has obvious degenerate incentives. And yes, I extend this even as far back as Civ 4 and hold it as a refutation to Soren's arguments about "fun" AI, too.

Can't expect much from an AI when devs intentionally kneecap it. Pdox does this too. It's annoying.

If you agree with the complaints or not, doesn't change that the complaints still happen and they come from players who still pay the same to play the game. I've seen people complain when an AI just backstabs you, and people love their diplo screen even if the concept of "bank of AI" conflicts almost directly with one that wants to win. I've gotten sorta past it by seeing games against the AI as an efficiency challenge and not one where I actively expect my AI opponent to end the game.

I'd love a ruthless setting in a Civ game though, I think you would need to rework the game rules from the ground up though. Feel like the game would have to be in a sort of perpetual cold war state so the AI can do like real players would when confronted with situations like easy settlers to steal or trade routes to plunder.
 
If you agree with the complaints or not, doesn't change that the complaints still happen and they come from players who still pay the same to play the game.

Complaints are virtually guaranteed. We get complaints now, would get complaints with the better model, and would still get complaints with variants in between.

A better question is what makes the game better, and how is that measured?

I've seen people complain when an AI just backstabs you, and people love their diplo screen even if the concept of "bank of AI" conflicts almost directly with one that wants to win.

Games can be designed in such a way where there isn't a conflicting/degenerate incentive structure. For example, that backstabbing could be made poor play in more typical contexts, and thus civ would not needs its AI to do it in order for it to be trying.

This is allegedly the game they put forth in the first place. Non-military victories don't have to be pseudo victory conditions, but what happens when we involve PvP? What would happen if those incentives were altered?

The present design of Civ 6 is fundamentally dishonest, and in contrast to many of my criticisms of it that has been true for many civ iterations now (including and preceding Civ 4). And yes, this dishonest design disconnect between AI behavior and game incentives which has been a problem for over a decade necessarily has a *massive* impact on the potential quality of the AI. Don't fix that design, and having both good AI and an AI that uses all the mechanics as intended is impossible.

As I said, if the devs feel they should intentionally push AI to go against design incentives for the game to play well, they are openly admitting their design is degenerate.
 
Some people claim that the AI trying would break immersion, but I assert the opposite. The fact that my supposed opposition is playing for a different objective often only tangentially related to actual victory conditions is off-putting and dishonest.

It's an indictment of the game's design that the devs consider that it would be a bad experience if the AIs explicitly tried to win. It's an open admission that the game systems in their present form do not work, that the game has obvious degenerate incentives. And yes, I extend this even as far back as Civ 4 and hold it as a refutation to Soren's arguments about "fun" AI, too.

Can't expect much from an AI when devs intentionally kneecap it. Pdox does this too. It's annoying.

I'm not saying the AI trying a bit harder to win would flat out break immersion (though it could depending on how it's implemented), just that it's not what the Devs focused on when they made it. If you watch some of the live steams or interviews with Ed Beach it is clear that one of his favorite parts of the Civ experience is RP. Development resources are limited and at the outset priorities have to be set. From what I can tell from the outside looking in one of the top priorities was to make each leader react to the player differently (preferably based on the historic attributes of the person the AI is impersonating). This in theory would improve the enjoyment of people like Ed who really get into that aspect of the game. Unfortunately that means that overall competence at the game is lower on the list. I can't say which is more important to the game because each person who plays is going in with a different mindset, a different idea of what makes Civ fun. If you are the kind of player who likes efficiency and maxing out the value of every production point, using exploits left and right to get an edge then the AI that had it's focus in development on immersion and RP is going to feel extremely lack luster. I personally think a bit more time could have been spent improving the AI before release (knowing where to place districts, the order to place them, and where a city should be settled in order to maximize district bonuses was severely lacking and made me want to raise several cities I captured so I could start over and do it proper this time). But for now this is the AI we have and all we can do is tell the developers that they should shift focus on competency because that's what would make us enjoy it more and if enough people do that, we might change things.
 
Back
Top Bottom