Thread Tools
Old May 29, 2003, 05:20   #1
dexters
Apolyton Storywriters' Guild
King
 
dexters's Avatar
 
Local Time: 02:35
Local Date: November 2, 2010
Join Date: Nov 2001
Location: Vancouver, Canada
Posts: 1,141
UNIT AI TWEAK for optimal Defense
Well, I’ve been noticing that because the AI tends to differentiate between its marked OFFENSIVE and unmarked (defensive) units, it doesn’t “gamble” or take risks properly.

1)Now, I understand that in the human context, AI has no concept of risk and infact, may appear to take very risky actions, such as attacking with 2 hp units when a normal human player would send them back to heal.

What I am saying by risk is more closely linked to its larger scale leader AI strategizing. From watching my current debug game on PTW as well as my experience playing against it, the AI is far too often very conservative when it comes to defense of its own territory.

It usually has X offensive units spread around its territory and Y defensive units, spread roughly evenly in each city. 3 to 4 for most cities in a mid sized empire. 6 to 8 for their capitals.

When a rival Civ attacks, what usually happens is, the offensive units, escorted by 1 or 2 defensive units move out. When this force is exhausted, and a good human player can pretty much do it very quickly if they have force and technological superiority, they become sitting ducks.The AI just hunkers down. Each city for themselves.

There is a good reason for this. I think Soren did this to ensure the AI isn't caught unprepared from a sneak attack in the back. The AI is essentially hedging its bets other attacks are coming. But this is not the most efficient use of a defensive force. Human players routinely move units from its "safe" cities to deal with problems in the front. The AI is even programmed to attack by sea, since I'm sure Soren has predicted humans would do exactly this.

In the PTW debug game I am currently watching where Japan was destroyed by 3 Civs and I got to watch a lot of city attacks, I see a lot of sustained cavalry charges (usually 8 attacks per turn) against a city of say 3 infantry and maybe 2 rifleman conscripts. While these cities survive the initial assault, after 2 or 3 turns of sustained attacks, they fall pretty easily.

Japan could have defended several of its cities, (and it had all its cities hooked up by RR) effectively had it shifted some of its surplus defenders from further in their empire. Instead, it just depended on the unit production from each city and conscription to bolster the defenders of the front line cities.

What does this have to do with risk taking?

The AI is unable to quickly shift its forces, like a humans would, and take a gamble that if the enemy forces show show up form behind, it can quickly shift back.

The key issue here is AI passivity to defending against offensive stacks it can easily overcome, and this is especially true with 3 movement units. The AI seems to not notice if you place units 3 tiles away from its cities, giving 3 movement attackers a great advantage. 16 cavalryman vs. 3 infantry is scary. But move a few infantryman from the inner core cities and suddenly you can have 16 vs 6, or 16 v 8 etc. The odds shift in the Defender’s favour.

2)Another problem is that the AI sticks too closely to its unit tags. Offensive units attack almost exclusively (they defend in captured cities) and untagged units defend almost exclusively (I’ve seen the occasional attack to finish off a straggler, but it is rare).
I understand the need for this system for the sake of making it easy on the AI and our computers when it comes to unit management, but on some level, the AI has to recognize that a non offensive unit can be used to do an offensive unit’s job, and they should use it more frequently. This is especially important for Civs like Japan, where their Samurai with A=4 D=4 confuses the AI. In the dubug game I was watching, the AI built a good 10 or so Samurai in its capital. All of the 10 were untagged so they sat in the city, while their army was fighting a war.

3) A third comment I have is the inefficient use of clearly offensive units. Again, referring to the debug games I've watched and from my experiences, it is not uncommon to whittle down a city’s defenders only to find it had a lone cavalry sitting inside…clearly an offensive unit. So why didn't it attack earlier. why was it sitting inside doing nothing?

Against a stack, the AI should recognize and be able to do the “bounce” trick human players regularly use. That is, they can send a unit with superior attack points against a stack of units with weaker Defense points and not worry too much about losing the unit. After attacking, the unit will bounce back to the city because the stack is there and it can’t occupy the square. I’ve used this strategy to weaken a great many AI stacks, and it’s too bad the AI doesn’t take advantage of this.

Putting it all together

A related note here is that the AI shouldn’t blow its load immediately when war is declared. Offensive units, especially the mobile ones, should hang back in their frontline cities so they can do what I just described above. It would be much more challenging for a player if they march up their stack to an enemy city only to find their stacks are being mowed down by offensive defenders who popped out from a nearby city and popped back in to hide. Not to be unfair here, the AI does do the bounce trick on occasion, but it seems more like a chance occurrance than a realization of this particular strategy. This will also make it doubly hard for human players to quickly whittle down the AI forces in the open phase of a war. All to often, the AI will have all of its offensive and good units out in the open on their way into enemy territory. The human response to these is usually defensive. They hunker down and use the bounce trick. They wait until a stack is close enough to one of their cities, move in mobile attackers, and wipe out the said stack. 5 or 10 turns later, all attacking stacks are wiped out, AI is on the defensive, and the humans move in with their large stacks of offensive units.

My first comment ties in to my third. When the human players attack with their big ass stacks, the AI sit passively, barely reinforcing their frontline cities even when they can afford to and there is a good chance a vigorous defense will weaken the assault. What essentially happens is Each city becomes an isolated island that can be divided and conquered. There is no effective joint defense here.

And since human players can see and count the number of enemy units within their range of sight, the AI should know this and react to this. If extra code need to be written to knock them over the head with it, I think it is worthwhile, even if the AI has to somehow cheat a little to get to this conclusion. What I think is sorely needed is for the AI to see stacks, recognize the size and type of the force it is facing and adjust the forces in the frontlines to deal with it.

I have some more comments regarding potential human exploits if a system like this is implement and possible counters to this. I’ll write it and post this later today. It’s 2:30 am and I need to finish my homework.

Thanks for reading another long rant from me.

June 1 2003 ADDENDUM:

SOME of what Sirian has to say about loopholes after 1.16f still applies to the game post PTW 1.21f.


http://sirian.warpcore.org/civ3/exploits.html
Quote:
Shouldn't paratroops be allowed to operate (like other air units) out of any city? That would put them on the map. Shouldn't the AI be trained to at least the option of a slightly more sophisticated attack routine than just "attacker/defender pairs" sent beelining willy nilly toward the nearest targets? Shouldn't there a be SOME point at which the AI's, in their defense routines, opt to use attacker-type units on defense? Some knights defending in cities would sure slow down the horsie rush in the medieval age -- or should the whole always-retreat-safely option for fast vs slow units be re-evaluated? It is awfully strong. I don't find these last couple of issues to be loopholes, but something about them is out of whack.
Comments on 1.17f still applicable today
http://sirian.warpcore.org/civ3/patch117f-initial.html
Quote:
The game balance in the ancient era was just fine. Closing the poprush loophole is all that was needed to correct the ability of some players to dominate in that era. Where the game breaks down is at railroads and nationalism, where the AI's are unable to use artillery effectively, to use rails effectively, and to cope with the player's ability to use rails on both attack and defense. If railroads were ELIMINATED from the game, the AI's would perform a whole lot better. But then, they also overdraft and overwhip their people, to get more units for warfare, which are then usually just wasted on stupid offensive attacks, leaving cities virtually undefended. So games of Civ3 turn entirely at the start of the Industrial era. On lower difficulty levels, a player can have fun in the ancient and midieval times, then the game's over at industrial as the player pulls ahead. Or else on higher difficulty, the player scratches and claws his way up out of a deep hole, and if he can survive to the industrial era, can then gain the means to compete.

Last edited by dexters; June 2, 2003 at 22:29.
dexters is offline  
Old May 29, 2003, 08:41   #2
Cruddy
Warlord
 
Cruddy's Avatar
 
Local Time: 03:35
Local Date: November 2, 2010
Join Date: Mar 2003
Posts: 217
Re: UNIT AI TWEAK for optimal Defense
Quote:
Originally posted by dexters
....
SNIP
....
What I think is sorely needed is for the AI to see stacks, recognize the size and type of the force it is facing and adjust the forces in the frontlines to deal with it.
The problem with this is that you are thinking purely in terms of you versus 1 AI civ. The AI civs compete against each other, don't they?

So if an AI civ builds up it's defensive forces against the human - it leaves itself vulnerable to attack from other AI civs.

Remember, all the AI civs know where all units are in the game. If an AI civ followed your tactics, it would give competing AI civs the perfect opportunity for a back stab.

I must say you are right in the sense the AI is too cautious. EVERY city is guarded, even one's deep in the AI cultural heartland that cannot be attacked for 2 or more turns. With railroads, that is quite silly.

I also admit, human versus AI wars are predictable in the phases - destroying the ready stocks of munitions and then going for the quicker conquest phase.

But...doesn't history tend to support this view?
__________________
Some cry `Allah O Akbar` in the street. And some carry Allah in their heart.
"The CIA does nothing, says nothing, allows nothing, unless its own interests are served. They are the biggest assembly of liars and theives this country ever put under one roof and they are an abomination" Deputy COS (Intel) US Army 1981-84
Cruddy is offline  
Old May 29, 2003, 14:59   #3
dexters
Apolyton Storywriters' Guild
King
 
dexters's Avatar
 
Local Time: 02:35
Local Date: November 2, 2010
Join Date: Nov 2001
Location: Vancouver, Canada
Posts: 1,141
Re: Re: UNIT AI TWEAK for optimal Defense
Quote:
Originally posted by Cruddy


The problem with this is that you are thinking purely in terms of you versus 1 AI civ. The AI civs compete against each other, don't they?

So if an AI civ builds up it's defensive forces against the human - it leaves itself vulnerable to attack from other AI civs.

Remember, all the AI civs know where all units are in the game. If an AI civ followed your tactics, it would give competing AI civs the perfect opportunity for a back stab.
This is a fair criticsm, one I will address in my planned addendum with regards to potential human exploits (see my last para of my first post). But keep in mind that I do recognize that the AI work under universally applicable rules that also apply to humans.

In most cases, the AI do not attack a weakly defended human border and humans willingly and knowling take the risk. sometimes, they use diplomacy and trade to placate the bordering AI or lock them into an alliance. Sometimes, they simply cross their fingers. Read any number of stories in the stories forum and you see a lot of this.

Given the AI already has a default trade bonus of 110 vs the human 100, I think it is within reason to say that the AI can be programmed to survey its borders and make the appropriate deals to reduce the possibility of an hostile action. and vis a vis humans, they pay less to do it.


Quote:

I also admit, human versus AI wars are predictable in the phases - destroying the ready stocks of munitions and then going for the quicker conquest phase.

But...doesn't history tend to support this view?
Yes and no. Recent wars may, where we are dealing with the western allied forces with a superior economic and population base and low tolerance for death (even in WW 2) and a general strategy of attrition since war planners recognized very early on that we would win eventually and the question was "when" and "at what cost."

If you look at say, the wars Sun Tzu observed and documented, it's a totally different game. You had a lot of evenly matched faction and attrition was less of an issue. It was about tactics. And what I am suggesting is giving the AI the tactics humans have been using since day 1 to make it more challenging. I am not trying to get the perfect Civ 3 player here. Just to get the AI to play more human-like. With warts and all. (risk taking)

All it boils down to in the end is attack and defense. The AI should recognize the power of the stacks it is facing and adjust its defenses to meet that instead of treating each city as an island.

The AI should also be able to attack and harass invading armies without leaving its attacking force wide open for destruction. A continuing weakness in the AI.

All the AI has to do is a) recognize its mobile offensive units b) hide them in cities where enemy stacks are moving towards c) attack from these cities and move them back in. At best, they push back the attackers and force them to find an alternate path. At worst, the city may still fall, but the attackers have been weakened, and this tends to change the odds for the next city to be taken.

Last edited by dexters; May 29, 2003 at 22:39.
dexters is offline  
Old May 29, 2003, 16:18   #4
ChrisiusMaximus
Civilization III PBEMApolyton Storywriters' GuildCivilization III Democracy GameC3CDG Blood Oath HordeC4DG The HordeC4BtSDG Rabbits of CaerbannogCiv4 SP Democracy GameCivilization IV PBEMC4WDG éirich tuireann
Emperor
 
ChrisiusMaximus's Avatar
 
Local Time: 03:35
Local Date: November 2, 2010
Join Date: Jul 2002
Location: Staffordshire England
Posts: 8,321
A very good observation Dexters and as you have seen me post before the AI seriously needs to learn how to use Artillery etc effectively on the offensive.
__________________
A proud member of the "Apolyton Story Writers Guild".There are many great stories at the Civ 3 stories forum, do yourself a favour and visit the forum. Lose yourself in one of many epic tales and be inspired to write yourself, as I was.
ChrisiusMaximus is offline  
Old May 29, 2003, 20:11   #5
Cruddy
Warlord
 
Cruddy's Avatar
 
Local Time: 03:35
Local Date: November 2, 2010
Join Date: Mar 2003
Posts: 217
Re: Re: Re: UNIT AI TWEAK for optimal Defense
Quote:
Originally posted by dexters

....
In most cases, the AI do not attack a weakly defended human border and humans willingly and knowling take the risk. sometimes, they use diplomacy and trade to placate the bordering AI or lock them into an alliance. Sometimes, they simply cross their fingers. Read any number of stories in the stories forum and you see a lot of this.

....
Not me. Oh no. If I have a common border with the enemy I'll get fortressed troops (even if just warriors) strung along it. It's amazing how much difference it makes to the AI "let's declare war or not" rolls. Plus, it keeps my strategy consistent with MP (assuming I ever go there - I want to but I'll wait until there's a less buggy version of PTW/Conquests).

Quote:
Originally posted by dexters
...
Yes abd bi, Recent wars may, where we are dealing with the western allied forces with a superior economic and population base and low tolerance for death (even in WW 2) and a general strategy of attrition since war planners recognized very early on that we would win eventually and the question was "when" and "at what cost."
...
Personally I'd say post Napoleon conflict - he's generally given credit for the notion of destroying opposing armies in the field, use of corps, reserves etc. Mind you, he'd claim credit for the invention of sliced bread if it was going. You could go even earlier, but then the mists of time get really thick. For instance, was Count Belisarius the military genius that Robert Graves portrays in his novel?
__________________
Some cry `Allah O Akbar` in the street. And some carry Allah in their heart.
"The CIA does nothing, says nothing, allows nothing, unless its own interests are served. They are the biggest assembly of liars and theives this country ever put under one roof and they are an abomination" Deputy COS (Intel) US Army 1981-84

Last edited by Cruddy; May 29, 2003 at 20:18.
Cruddy is offline  
Old May 29, 2003, 22:47   #6
dexters
Apolyton Storywriters' Guild
King
 
dexters's Avatar
 
Local Time: 02:35
Local Date: November 2, 2010
Join Date: Nov 2001
Location: Vancouver, Canada
Posts: 1,141
Re: Re: Re: Re: UNIT AI TWEAK for optimal Defense
Quote:
Originally posted by Cruddy


Not me. Oh no. If I have a common border with the enemy I'll get fortressed troops (even if just warriors) strung along it. It's amazing how much difference it makes to the AI "let's declare war or not" rolls. Plus, it keeps my strategy consistent with MP (assuming I ever go there - I want to but I'll wait until there's a less buggy version of PTW/Conquests).
Fortresses are useful out in the open, especually in large swaths of open border. But it takes a lot of workers to build them, and I'd rather divert my workers to building infrastructure and maybe build a fort here and there at a few choke points or resource locations.
Cities do a pretty good job already.

Maginot line style forts are pretty much not in my playing style. And since I don't play MP, I really can't comment on it.

The AI needs to use forts more. It does build them, occasionally, but again, it seems more like chance and accident that it happened to have a spare worker when it wanted to build a fort. But for the most part, it just doesn't build them, even in choke points. This manpower shortage on AI's part may be due to AI worker inefficiency (See my related post here ) something else I think should be fixed to give AI players another edge humans have.

I'm not a big stickler for fort building and I don't really care too much if Soren and Co. don't fix this. If they can fix the AI defense/offense/worker strategies to reflect some of my concerns, i'd be very very thrilled
dexters is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 22:35.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team