[GS] Domination, air combat, AI and the new era

Expert System
According to Wikipedia "The most common disadvantage cited for expert systems in the academic literature is the knowledge acquisition problem. Obtaining the time of domain experts for any software application is always difficult, but for expert systems it was especially difficult because the experts were by definition highly valued and in constant demand by the organization.". So, for improved AI they'd have to put their top people (e.g. Karl/Carl, Ed, etc) on building the database. I'd estimate this would be a many man year effort. And then because it has to scale with difficulty you have to have that built in somehow, meaning also have a database scaled choices (bad - good). And while you're doing all this it would consume so many resources I personally wouldn't add other features to the release, thereby pissing off the majority of your customers in favor of the handful of those who want a smart AI. Finally it would be fragile, the history of expert systems is littered with many examples.

I think you're overestimating how good the expert system would have to be in Civ to, when couple with AI bonuses, allow the AI to present a challenge that would then make the rest of the game experience more enjoyable.

Here's my analysis, using my personal criteria for what an AI should do:

1. It should present interesting personalities to play against, who act in an internally consistent manner. This is about making the AI leaders differ in their approach, so that the game experience for the player differs depending on who they get for their neighbour. There's a lot that could be done here to reduce the "samey-ness" of the AI to date in Civ 6. They took some steps down this road with agendas, and changing the relative likelihood to go after a religion. I think they could do a lot more, to get the different AI leaders back to at least the level of distinct personalities they showed in Civ 5 (ideally, even more distinct given the base agenda system).

2. It should present a "speed bump" to players who don't manage their relationships with their neighbours. There's two issues to this currently, for me. First, if you ignore the AI, then after the Classical era, it will pretty much ignore you. This shouldn't require much of a tweak to address. Second, if the AI does attack, it's ineffective (other than the early Warrior rush). This is harder to fix, but not out of scope. It needs to be taught how to use ships and airplanes (both of which it could do in Civ 5, so possible). It needs to be given some simple rules like "move first, then shoot, then melee attack last". On higher difficulty levels, it needs to be taught to pillage like crazy, so that you can't just turtle up in your city until the AI kills itself off. When coupled with what the AI can already do well, militarily, most of the rest can be handled through giving the AI combat bonuses.

3. It should represent a decent "pace car", so that on higher difficulty levels, you have to play efficiently or the AI will win before you do. Most of the AI's speed will come from giving it bonuses. What the Civ 6 AI to date seems to be lacking is (a) a clear focus on picking and pursuing one victory condition, and (b) an understanding of the basic strategies to win at that victory condition. This second factor requires input from good players, and yes per the above comment about "fragile" expert systems, those strategies may become out of date, especially when new systems are added. So that one needs some time after the rules set is finished, but it doesn't need perfect strategy, since the AI also gets bonuses the payer doesn't. It just needs a viable strategy.

Some other basic building blocks to all of these also need some work, like teaching the AI how to build an appropriate size military, teaching the AI to stop building civilian units when it's cities are at risk of being captured, etc. I don't want to down play those. It is a complicated process, especially given the way the core systems work in Civ 6. But it's feasible to make improvements here, on top of the work that the development team has already done.
 
It's easy to be an armchair engineer. OK folks let's stop handwaving and get out the slide rules to discuss two approaches to AI - expert system and a DNN/Deep Neural Net/Machine Learning/ML.

DNN/ML
How: Connectionist solutions work by using massive amounts of data - the more the better. The network continues to improve with data and deeper layers (generally). This data would have to be tens/hundreds of thousands of human games, and your population spread would need to be sufficient (e.g. games in a variety of situations). OK fine, say somehow they've got a data set. And train it - how so? Start with the input and output layers of the network, the output is "win/lose" (2 neuron) and the input would be possible game states. What is a game state, well, let's take a similar approach to AlphaGO. where we have an input node for each tile on the board.

How many tiles in a normal sized map, anybody know? Go has 19x19, according to SX it's 80x52 or 4160. But we have to accommodate all cases including Huge games, which are 128x80, which is 10240 input nodes. Compare this to 361 for Go folks. Further, consider the states of the input nodes, for Go it's beautiful, just a binary 1/0 (black/white). A tile state in Civ consists of (which civ * which unit * which terrain * which improvement). AT LEAST, I'm surely missing some. So now we have, let's set, say 20 civs, 10 units, 10 improvements, I don't know maybe 10,000 combinations (just pulling this out of the air, somebody here could work it out). OK, so 10k * 10k is 1 million input nodes.

Good luck with that folks. Someday we'll have networks like this, not today.

Expert System
According to Wikipedia "The most common disadvantage cited for expert systems in the academic literature is the knowledge acquisition problem. Obtaining the time of domain experts for any software application is always difficult, but for expert systems it was especially difficult because the experts were by definition highly valued and in constant demand by the organization.". So, for improved AI they'd have to put their top people (e.g. Karl/Carl, Ed, etc) on building the database. I'd estimate this would be a many man year effort. And then because it has to scale with difficulty you have to have that built in somehow, meaning also have a database scaled choices (bad - good). And while you're doing all this it would consume so many resources I personally wouldn't add other features to the release, thereby pissing off the majority of your customers in favor of the handful of those who want a smart AI. Finally it would be fragile, the history of expert systems is littered with many examples.

Enough said and FWIW.

What's your point? It's also easy to brown-nose Firaxis. The AI was better in the past with larger maps, so your reasoning is dead on arrival.

  • Biggest map in civ4 was 160x100 = 16,000 tiles
  • Biggest map in civ5 was 128x80 = 10,240 tiles
  • Biggest map in civ6 was 106x66 = 6,996 tiles
So in your world, the AI should have been a lot better based on map size. Funny how the AI could use air units in civ5 and civ4 despite having more than twice the tiles. Top that up with me probably getting an infraction for saying "brown-nosing" while you probably wont get any for calling critics armchair engineers. We, as customers, dont give 2 cents about how they do it - just do it! jeeezzzzzzzzzzz..........
 
The Vox Populi mod showed that you don't need new technology to significantly improve the AI.

The AI design that exists is already sufficient.

What is lacking is the desire to improve the AI by Firaxis from an unwillingness to allocate ongoing time to its improvement. It only requires one intern from a university on a small wage which is nothing in the scheme of things. The intern would be more than grateful for the opportunity and Firaxis would be doing the industry a favor. If it turns out that no intern wants to work on the old technology that is in the civ AI because neural networks are all the rage, contact the civ community. There are many there with the skills that would be grateful for the opportunity. The interns code can be forked from the main project without any contamination of code. Right before final release, the interns code could be examined by the head engineer to see if any of it could be used in the final release. If not, nothing is lost because the intern has got a lot of experience and Firaxis has done the industry a favor.

EDIT: Even better. You hire an intern, give them the VP code and say to them "go away and see if you can integrate some of the AI code into a forked build of our Civ6 code. Report to the head engineer once a week for a meeting but don't disturb him in between. The VP code should be good enough to give you ideas on where improvements can be made to the AI code. If your code is good, well merge it in"

Then, you go to the community and tell them what you are doing. That you are hiring a work experience intern to make some additional improvements to the AI just in case there can be even more advances made. You can also use the PR to thank the civ community for the VP code and let them know that their efforts will hopefully not be wasted for the future of civ and the opportunity to train future generations of software engineers.
 
Last edited:
What's your point? It's also easy to brown-nose Firaxis. The AI was better in the past with larger maps, so your reasoning is dead on arrival.

  • Biggest map in civ4 was 160x100 = 16,000 tiles
  • Biggest map in civ5 was 128x80 = 10,240 tiles
  • Biggest map in civ6 was 106x66 = 6,996 tiles
I think the point is that even if civ7 biggest map is down to 40x20, that kind of AI (which is not used in civ4, civ5 and civ6 either, while "why not use it ?" is a recurrent question on the forum related to civ in that kind of threads) will still not be possible to integrate at the scale of the game because of the amount of variables per tile.

Now there is a lot of posts in those recurring threads suggesting to use it for a tactical approach on smaller grids, so I suppose that a partial integration is possible ?

When I was developing my WWII mod for civ5, I was wondering if grouping units in small entities and making the AI decision based on those squads in limited areas instead of individual units on the full map would not have made it much better with a relatively cheap development and CPU cost.

BTW I don't think that civ4 tactical AI is better than civ5/civ6. On the contrary. But the game rules were much easier for it in civ4.

The Vox Populi mod showed that you don't need new technology to significantly improve the AI.
I really need to have a close look at it's code one day.
 
BTW I don't think that civ4 tactical AI is better than civ5/civ6. On the contrary. But the game rules were much easier for it in civ4.

I honestly dont think 1 unit per tile is that much of a gain, when the AI can't handle it and we get smaller maps. I'd rather have larger maps and units grouped up on 1 tile as an army. It might be simple, but simple is what the AI needs. Combat isn't the main feature that attracts me anyway, so I'd prefer the pre-civ5/6 units.

I've also seen a couple of streamers complaining about the combat - stacks of units would help multiplayer too. Good for AI, good for multiplayer and finally good for singleplayer in my opinion. Bring back unit stacks :)
 
The AI in every civ game has been dumb as a bag of rocks. The only thing it has ever had going for it is its ability to do everything faster with yield bonuses. Firaxis has taken the same approach to AI with 6 as with every other game, but given the additional complexity its stupidity has more opportunities to reveal itself, and when the AI can't put 300 horsemen in a single stack it becomes easier to exploit tactical mistakes.

This is why I've never liked the changes to air units in the last few iterations, since they're not actual "units" like everything else they're mostly just tedious to use, but it also makes it more difficult for the AI to use them. I rarely even built an airforce in 5, and almost never do in 6. I built massive air forces in 2.

We're dealing with the same sub-par AI that we always have. It'll eventually get better, heaven knows 5's showed slow but steady improvements through BNW. Also, I'm confident modders will eventually have a chance to make it better.

I by far prefer 6 to any iteration since 2. Yeah, the AI is stupid, but it's always been, and at least I have much more interesting things to do now than I ever did in 5.
 
VP mod has proven you and I wrong.

What does this mod do exactly? Is there any video that shows a side by side comparison?

I wanted to try it, but apparently you need all the DLC. I have no dlc for Civ5. I thought about buying it, and started a games of Civ5 yesterday to see if I can get into it, but I can't. I think it's time to delete the game from my hard drive. I can't go back.
 
Yea, but if the tradeoff is smaller maps, then i'd rather be without.

It's quite the opposite actually... try it yourself, increase MIN_CITY_RANGE to 5, and see the Ai in civ 5 shine... even the vanilla AI performs much better without the killer city corridors that are created with only 3 tiles between cities.

If anything, 1UPT desperately needs huge maps... the problem is that in order to do that, FXS would have to greatly reduce the cool, shiny crap that sells to the masses, and God forbid they do that... :rolleyes:
 
The AI in every civ game has been dumb as a bag of rocks. The only thing it has ever had going for it is its ability to do everything faster with yield bonuses.

Incorrect. You should say "The AI in every unmodded civ game has been as dumb as a bag of rocks". When thinking about AI quality, ask yourself not whether the AI is good or bad, but whether it is sufficient to provide a challenge for most players. The community mods for civ4 and civ5 achieve the test of sufficiency. Firaxis AI do not.

What does this mod do exactly? Is there any video that shows a side by side comparison?
VP mod link here explaining it https://forums.civfanatics.com/threads/community-patch-how-to-install.528034/
 
Yea, but if the tradeoff is smaller maps, then i'd rather be without.

1UPT wants more tiles - not less, bigger maps not smaller. Think of it like improving the resolution of a photo. More tiles, more clarity of how to organize and move operations without traffic jams.
 
Incorrect. You should say "The AI in every unmodded civ game has been as dumb as a bag of rocks". When thinking about AI quality, ask yourself not whether the AI is good or bad, but whether it is sufficient to provide a challenge for most players. The community mods for civ4 and civ5 achieve the test of sufficiency. Firaxis AI do not.
1 - Yes, I am talking about Firaxis AI, which is the subject of this thread.
2 - If your standard for AI is whether or not it provides a challenge for most players, I think you'll find that the Firaxis AI performs swimmingly in that regard, as most players are relatively casual. You do know that the Civfanatics/Reddit/etc communities only represent a small fraction of the player base, right? Most people do just fine without mods, and I say that as a modder.
 
1 - Yes, I am talking about Firaxis AI, which is the subject of this thread.
2 - If your standard for AI is whether or not it provides a challenge for most players, I think you'll find that the Firaxis AI performs swimmingly in that regard, as most players are relatively casual. You do know that the Civfanatics/Reddit/etc communities only represent a small fraction of the player base, right? Most people do just fine without mods, and I say that as a modder.

Good point. Unfortunately it is difficult to quantify what "most people" really means when you think about it. The current player base that like the AI might only be a subset of the total number of possible players of civ.

My guess is that in civ, almost as many older players drop out from playing the game because of the lack of challenge, than new younger players join in.

If the AI were "sufficient", less older players would drop out and Firaxis would not need to concentrate on quantity of new features and instead they could concentrate on quality, because that is what older players would want.

Evidence for my theory is exactly that Firaxis are focusing on adding new attractive features to new players rather than polishing existing systems like the AI which is what older generations of civ players would want. While the globalised world keeps on introducing new players to civ from around the world, Firaxis have little incentive to keep older generations of players interested in the game over the entire span of their lives from cradle to grave, because new players are sufficient to meet their profit targets.
 
This is why I've never liked the changes to air units in the last few iterations, since they're not actual "units" like everything else they're mostly just tedious to use, but it also makes it more difficult for the AI to use them. I rarely even built an airforce in 5, and almost never do in 6. I built massive air forces in 2.

I completely agree. I remember having so much fun using jet fighters and stealth bombers in 2, they felt so powerful and they really reflected how strong air power can and should be. I think we need the same, air units I think should just stack over land units, and have to go back to a city (maybe make it a city with an aerodrome) to re-fuel. Bombers better than fighters at damaging cities and units, but weak to fighters.

I've never taken the time to examine the new air unit system, I think a simpler system will be more fun and easier for the AI to use as you said.

In fact the added complexity in taking a city is also I think part of why the AI faces problems. Just getting into a good position when there's enough resistance takes a good amount of effort, and if there are terrain features that make it difficult to siege a city, it gets even worse. I think the mechanic of cities being able to defend themselves should be taken out. But that's another topic I suppose.
 
I think the mechanic of cities being able to defend themselves should be taken out.

What kindda annoys me is that pretty much every battle is a siege. Hardly any fighting out in the open, also because the AI puts it's cities so close together.
Not sure why you want the city strike to go though, it's the only speedbump the AI can put up. Without it conquering a civ would be way too easy.
 
What kindda annoys me is that pretty much every battle is a siege. Hardly any fighting out in the open, also because the AI puts it's cities so close together.
Not sure why you want the city strike to go though, it's the only speedbump the AI can put up. Without it conquering a civ would be way too easy.

You're right, but I also think it prevents the AI from being able to take cities too much. I try to avoid building walls whenever possible, but I imagine in AI vs AI, walls make it really difficult for them to capture cities. I think placing a ranged unit + walls, along with any favorable terrain, makes it pretty expensive to take a city, far more than I think it should. Maybe if you surround/siege a city it should just start taking damage each turn?

I was experimenting with giving all land combat units the district combat bonus that the Macedonian UU has, and I remember a barb scout wiping out a city of mine that I didn't have correctly defended :D That's too extreme, but I think the city taking process needs a review. It seems right now the balance of city combat is too far in favor of the defender. As you said it helps the AI in defense, but overall I think it's making it too hard for them to deal with captures, although I have seen a decent improvement in that. It seems the city state AI is a lot better at combat, maybe because that's all they can focus on.
 
You're right, but I also think it prevents the AI from being able to take cities too much. I try to avoid building walls whenever possible, but I imagine in AI vs AI, walls make it really difficult for them to capture cities. I think placing a ranged unit + walls, along with any favorable terrain, makes it pretty expensive to take a city, far more than I think it should. Maybe if you surround/siege a city it should just start taking damage each turn?

In my games AI vs AI sieges seems to work pretty well, cities are conquered all the time. AI vs player; it rarely happens that the AI takes one of my cities passed the early game. But this all boils down to the AI not being able to use the tools at hand like a player can. Tools like battering rams for melee and balloons for bombard. And setting up your units properly, judging the terrain, etc.
 
I remember having so much fun using jet fighters and stealth bombers in 2,

It was fun, but too powerful. Couldn't bombers destroy an entire stack of units in that game? Not to mention clear out cities of all defenders. Civ 4 I believe it was had it right by limiting bomber damage on units. Look at Vietnam, the U.S. dropped more bombs (by explosive power) than everyone in WW2. And what did it accomplish? Not a whole lot. That war showed the limitations of air power. Though I admit, the gulf war and Iraq war redeemed air power quite a bit. Shows the difference open terrain makes. But we also fought a much less formidable enemy in terms of courage and resolution.
 
This is why I've never liked the changes to air units in the last few iterations, since they're not actual "units" like everything else they're mostly just tedious to use, but it also makes it more difficult for the AI to use them. I rarely even built an airforce in 5, and almost never do in 6. I built massive air forces in 2.
I like the Air combat of Civ5 and I think there is a lot of potential in civ6 air combat, when the bug are fixed and we can teach the AI to use it.

The civ5 system was simple enough to allow me to make a relatively decent air fighters AI using Lua only in my WWII mod. I would have already ported it to civ6, if we could control AI units directly using civ6 Lua methods. (now that I think of it, we can't for land/sea unit, but if the AI don't use them at all, we may be able to control the air unit)
 
Back
Top Bottom