Suggest potential weaknesses in the combat AI before Firaxis finishes it

Joined
Apr 29, 2003
Messages
4,509
Location
the Netherlands
In every previous version of civilization the main weakness of the AI compared to the human player was its military tactical capabilities. You really didn't need to be a tactical genius to outsmart the AI in tactical warfare. I have no illusions that the tactical AI in civilisation V will suddenly be able to match the tactical capabilities of good human players. But it would be nice if it wouldn't make really stupid mistakes.

We have seen some gameplay videos and some of us have already played several 1 UPT games on hex boards. We might be able to predict some of the mistakes that the AI will be making. Of course, the AI designers of Firaxis will be trying to make the same analysis, but they can't match the minds and inventiveness of the combined civfanatics community. So share your thoughts about how you plan to exploit the weak tactical AI and how a smart(er) AI might avoid this abuse.

Of course, we can't analyse the combat mechanics exactly because of the limited knowledge of these mechanics. There's no need to say that. I'm aware of that. Still, I'm sure that I could have predicted some of the main tactical weaknesses of the civ4 combat AI when I first read about the basic combat setup of stacks and collateral damage months before its release.

The AI is usually one of the features which is created/perfected the last, so this might actually be useful instead of asking for features like espionage/religion/more civilizations which will not be implemented at such a late stage of game development.

I'll start.

Situation 1:

Fire power of front lines in various situations

Both I and the AI have a nice balanced army of front line troops and artillery placed at such a distance from each other that the artillery can't hit the troops of the opponent. Lets say the artillery can fire at a distance of 2.

AAAA
FFFF

XXXX
FFFF
AAAA


The X's form the neutral zone without units. Because of the nature of artillery with its 1 turn to get ready to fire, attacking is not a good option here. If one of the armies attacks, only its front line soldiers can attack while the defender will be able to use its front line troops and its artillery because the artillery hasn't moved.

I wouldn't move my army into the neutral zone in such a situation but I'm afraid the AI isn't aware of the situation and will bravely but foolishly move its troops to attack.

Solution to this tough problem: make the AI aware of the firepower of the enemy troops still alive after it has attacked and compare that to the firepower it will be able to use by attacking and the firepower it will be able to use if it holds its ground.
This is a very tough problem as the AI has to recognize a set of troops as a front line and then be able to compare the firepower of that entire front line in various situations and compare it to the firepower of the enemy front line.

The ingame combat situations will of course never be so perfect symmetrical like the one above and thus tougher to analyse.

Situation 2:

Positioning of troops after the attack.

I've played various hex games and usually the AI is programmed to exploit bad human positioning. It is often capable of recognizing ways to surround and mount a serious attack on these troops. However, I've never seen the AI capable of maintaining a good front line after its attack. It's usually attacking like a pack of barbarians, attacking any troops it can almost without regard for its own positioning. This usually results in the human player able to counterattack extremely effective as it can surround and exterminate the AI troops who don't form a consistent front line.

Solution to this extremely tough problem might lie in giving a value to the position of the entire front line where friendly flank bonuses give a serious bonus to the value of the front. So if for instance 5 units are next to eachother interspaced by empty squares then the value of those troops would be a lot less than the value of 5 troops forming a continuous line. The friendly combat defensive flanking bonus could be used for that bonus valuation for a continuous front line. It's a very tough problem.

Situation 3:

Defend if weak.

I've often seen the AI combat AI attack my troops in my own territory even when the AI troops are inferior in number or individual strength. Usually, in tactical games there is an advantage in defending and thus attacking a stronger defensive position is usually a bad move. The defenders advantage could be in faster healing, better movement, better line of sight or defensive bonuses.

The AI should be able to compare the strength of the local enemy army compared to its own local strength and thus be able to decide whether it might be better to start defending its territory in stead of trying to conquer more.



I'm curious about the ways you think the AI might be exploitable and how it might theoretically be fixed.
 
I'm relativly sure, that they've thought about #1, that point is not that difficult.

Not difficult for a human to understand or not difficult to teach an AI?

I've seen various games where AI units attack defended artillery positions in similar situations like the one described above. The relative power of single units is easy, the relative power of entire front lines further modified by the status 'dug in' or 'moving' is not very simple for the AI as far as I know.
 
I've played various hex games and usually the AI is programmed to exploit bad human positioning.

That's probably the easy part, it's just raw calculations really. The same way that even the most strategically inept chess program can solve a mate in 6 problem in the blink of an eye that would take humans ages.

I think #2 and #3 are two sides of the same coin. In both cases it depends on the AI making a good evaluation of the estimated position at the end of their move, before actually executing any of their moves. I think the introduction of the flanking bonus in Civ5 will definitely help the AI, as it will make it easier for it to evaluate formations. It might even be better for the AI if siege doesn't give a flanking bonus (i.e. a bonus if it is adjacent to both attacker and defender), but instead would give a support bonus only when it is adjacent to the defender but not the attacker. It would encourage it to hide the siege behind frontline units.
 
Not difficult for a human to understand or not difficult to teach an AI?

I don't think it's that difficult to teach it to the AI.
Okay, it's nothing easy, but also not rocket science. An advanced AI engineer should be able to add the needed algorithms.
Maybe more a problem for the performance, no idea :dunno..
 
50 days before release, they're probably just a week or two from Gold status. I doubt they're doing much in the way of significant AI changes at this point.


Do you think gold means as much in these days of Steam activation ?

I'm not saying you're wrong, I'm saying it looks muddled and uncertain to me.
 
Do you think gold means as much in these days of Steam activation ?

I'm not saying you're wrong, I'm saying it looks muddled and uncertain to me.
Steam activation doesn't change anything. Day-zero patches have been available for a decade. That doesn't change the fact that you need to stop development at a certain point and prepare for release. That doesn't change that you still need to send a gold master to the publisher for duplication. DVD is still the primary method by which games are distributed.
 
It's hard to program the AI when features haven't been fully implemented, haven't been fully decided on. AI improvement is typically something which is done in the final stages of development and day zero patches also regularly contain AI patches (and of course bug fixes that slipped through).

And of course, the AI is an interesting topic even if the designers never look at this thread. 99.99% of posts have no effect on the designers anyway.
 
Even if the AI has problems (which are worked on/improved, through Firaxis or the modding community), it doesn't matter for a few weeks as all the players are learning the new system.

As long as they aren't MAJOR problems, of course. ;)
 
This is a very tough problem as the AI has to recognize a set of troops as a front line and then be able to compare the firepower of that entire front line in various situations and compare it to the firepower of the enemy front line.

Recognizing abstract concepts like "front line" is fairly challenging for AI, partly because standard techniques for multi-unit movement treat deciding what to do with each each unit as a separate problem.

However, in the case of Civ V, I think that the inherent stigmergy of the flanking bonus will cause units to form an organic front even if there is no specific code to identify an ontological front. (What's more, given the inherent conflict between the delay of transmitting orders from HQ and the need for real-time decisions in real-life warfare, I'd say this type of stigmergy is a large part of the reason that armies have fronts in the real world too.)
 
Steam activation doesn't change anything. Day-zero patches have been available for a decade. That doesn't change the fact that you need to stop development at a certain point and prepare for release. That doesn't change that you still need to send a gold master to the publisher for duplication. DVD is still the primary method by which games are distributed.

A patch for the AI (whether zero-day or not) would only need to be very small. Firaxis/2K have certainly not ruled out there being a zero-day patch. Whether the game is sold by DVD or delivered electronically doesn't matter.
 
In situation #1 the "defender" doesn't have to move. They can wait - the attacker will have to attack first, or find a way around the defender.

Remember, too, that (for some units at least) defending in open terrain has a -33% penalty - meaning that the defender will pick the best terrain and sit there.

Preliminary tactics that appear sound:
1) Defenders should put their weakest units a the bottom of the hex based crescent line, and gang up on attackers that move into the crescent.
2) Defenders should also anchor their line with impassable terrain and keep cavalry around to counter-attack & protect the flanks.
3) Defenders should keep some infantry in the 3rd row ready to replace wounded/eliminated units in the 1st.
4) Attackers should attack peaks in the defenders line, if available.
5) Attackers should alternate cavalry/infantry in their front line (before engaging): concentrate attacks by moving cavalry in-attack-out, then move infantry in-attack. Any one hex in the defender's line can be attacked by three units. Attackers should keep some infantry in the 2nd line to move through the retreated cavalry to fill the now engaged front line.
 
Steam activation doesn't change anything. Day-zero patches have been available for a decade. That doesn't change the fact that you need to stop development at a certain point and prepare for release. That doesn't change that you still need to send a gold master to the publisher for duplication. DVD is still the primary method by which games are distributed.

There is a fundamental difference with Steam activation though.
Since Steam insists any available patches are installed before activation the zero day patch is 100% mandatory and the Gold distribution will not (indeed cannot) be played without the patch even in offline mode.
This significantly reduces the need to finalize and stabilize the gold master. As long as it installs and can be patched it could actually be any old build.
The focus of stabilization can then switch to a single deliverable: the zero day patched version.
 
Can this please NOT become a thread about Steam?

There are 4 levels of AI - surely the tactical AI will need very little tweaking (if any) after Gold since the combat mechanics are pretty set - at least the core ideas. They might be tweaking the modifiers here or there, but core of the combat model is not going to be changing.
 
A great deal of players do not play multiplayer. I do not have statistics in front of me, but being inline with the other civilization games I would guess that at least 4 out of 5 people who purchase this game do so with the intention of never playing a multiplayer game.

For this reason it is incredibly important that the AI be absolutely WORLDS ahead of the AI in Civ4. If you are going to do into "overkill" mode with any one aspect of this game, AI would be the area to do so. The AI should be smart enough that it doesn't require huge cheesy numbers advantages to be a threat... it should be a threat because it is as good of a player as you are, complete with sound strategies and using tactics that surprise you and take advantage of your weaknesses.
 
Recognizing abstract concepts like "front line" is fairly challenging for AI, partly because standard techniques for multi-unit movement treat deciding what to do with each each unit as a separate problem.

However, in the case of Civ V, I think that the inherent stigmergy of the flanking bonus will cause units to form an organic front even if there is no specific code to identify an ontological front. (What's more, given the inherent conflict between the delay of transmitting orders from HQ and the need for real-time decisions in real-life warfare, I'd say this type of stigmergy is a large part of the reason that armies have fronts in the real world too.)
A glanking bonus doesn't change a thing. It's just an added benefit of having a front line. But if the ai doesn't have a mechanic for forming a front line, then it simply won't be able to take advantage of flanking bonuses.

I do agree that having a value to adjacent troops could potentially help keep front line, but it's not enough. Units have to advance in formation too. But in that case you want the middle-front unit to move forwards as much as possible, and then the other units to move up with it. But a value to adjacency would cause the middle front unit to instead try to move diagonally in front of other units in the line instead of forward. Also there's the problem of which unit moves first.
 
#1 really isn't an issue, all units can move 2 spaces IIRC, so the front line could still attack. In fact, the front line could move to no-mans ground in the middle, the archers could move up 1 square and bombard, and then the front line could attack with their remaining move point; all in 1 turn.

In the example I used, I specifically mentioned artillery not archers and the difficulty with artillery that it needs 1 turn to setup before it can fire.

Thus the attacker in that case will not be able to use its artillery while the defender can. Thus for both sides its better to wait and defend instead of trying to attack. This is something that the AI needs to realise as it will arise in the game regularly. And if the AI doesn't realise this, then the human will exploit this time and again by waiting for the AI to make the first move.

The basic idea is that artillery due to its 1 turn to setup before bombardment is a unit that is more powerful for defending front lines than for attacking front lines.
 
Back
Top Bottom