AI and terrain features?
AI and terrain features?
Just for curiosity and future consideration: I was wondering if a tweak was possible to help the AI improve its awareness and use of terrain features. I noticed this most vividly in the Secessionville scenario when a large contingent of the fort’s defense marched out to meet me in the open field. But generally, I’ve noticed that the AI often doesn’t use terrain features like walls, tree lines, or ridge crests for defensive proposes when available nearby. It also doesn’t really use the terrain to screen movements or employ it in designing an attack strategy with which to minimize the defender’s defensive bonus (this would add another dimension to the commander fighting style). I realize the CPU and memory constraints might make it infeasible, or even impossible given the very human-esque nature of the process. I just wanted to see if any discussion on this has taken place, and what others think could improve the AI's terrain awareness. Thanks.
Sorry. I suffer from a serious case of typosis. Don't worry, it's not contagious 

Re: AI and terrain features?
I agree. I would like troops to use cover, particularly stone walls. Fwiw, I think the defensive value of stonewalls should also be higher.
-
- Reactions:
- Posts: 2171
- Joined: Sat Dec 24, 2011 4:49 am
Re: AI and terrain features?
I think there's two elements of AI at work here. One is that the AI does know about the terrain, I think it sees it from the greyscale bitmap that underlies the minimap, so it certainly knows where wods, fences, walls and ridge crests are. However the other AI routine that is working here is the general's quality and his orders. He won't worry so much about putting his regiments on a fence if he has certain orders or his quality is low.
I played in an MP game last night on the Pipe Creek 1 map where we were Ruggles Division against Hoods and Hood placed five or six batteries on a commanding ridgeline behind his position, in locations where their field of fire was not limited by the woods to either flank as support for his attack.
A few weeks ago on the Alpine map just south east of New Castle, our CSA force moving south met a Union army coming up the road from the south east. The enemy deployed two batteries on raised groud to his right, and turned its army around to march back across a creek and then over and out of sight behind a low ridge.
We followed up to attack, on the (rather arrogant) assumption the enemy was running, only to cross that low ridge and find the enemy deployed 150 yards behind it ready to meet us and rip us to pieces in a position where our guns couldn't touch his troops.
I agree sometimes the AI doesn't use terrain very well (but then I have seen plenty of human players not use it well either), but the routine for the AI to use it is built into the game because I've seen it use it very well, at times.
I played in an MP game last night on the Pipe Creek 1 map where we were Ruggles Division against Hoods and Hood placed five or six batteries on a commanding ridgeline behind his position, in locations where their field of fire was not limited by the woods to either flank as support for his attack.
A few weeks ago on the Alpine map just south east of New Castle, our CSA force moving south met a Union army coming up the road from the south east. The enemy deployed two batteries on raised groud to his right, and turned its army around to march back across a creek and then over and out of sight behind a low ridge.
We followed up to attack, on the (rather arrogant) assumption the enemy was running, only to cross that low ridge and find the enemy deployed 150 yards behind it ready to meet us and rip us to pieces in a position where our guns couldn't touch his troops.
I agree sometimes the AI doesn't use terrain very well (but then I have seen plenty of human players not use it well either), but the routine for the AI to use it is built into the game because I've seen it use it very well, at times.
HITS & Couriers - a different and realistic way to play SoW MP.
-
- Reactions:
- Posts: 1769
- Joined: Mon Mar 29, 2010 9:56 pm
Re: AI and terrain features?
With the 1.4 patch, the AI learned the value of good terrain and to use it. However, it is not the overriding consideration in it's calculations. From what I have observed, if the AI feels it is outnumbered, it will rush for the fence lines. On numerous occasions, I've had to race the AI for a stonewall that usually ends in a melee for it. The AI treats high ground the same way. It will post the infantry on the slopes if it feels too weak to advance. But the AI disregards all terrain advantages if it feels the fight will go in it's favor.
I would say that the major weakness of the AI now is that it abandons a good defensive position too early, that is to say, before it really has superior resources at hand. The AI generally lacks the virtue of patience. As with everything AI related, this is not always the case. Sometimes the AI will hold back an attack until everything is in place. When the advance comes, it is usually crushing. I find being on the receiving end of such an attack that I am often helpless to do anything to prevent it. The AI turns my well ordered defensive line into a mob of retreating soldiers. I just wish the AI did this more often.
I would say that the major weakness of the AI now is that it abandons a good defensive position too early, that is to say, before it really has superior resources at hand. The AI generally lacks the virtue of patience. As with everything AI related, this is not always the case. Sometimes the AI will hold back an attack until everything is in place. When the advance comes, it is usually crushing. I find being on the receiving end of such an attack that I am often helpless to do anything to prevent it. The AI turns my well ordered defensive line into a mob of retreating soldiers. I just wish the AI did this more often.
I can make this march and I will make Georgia howl.
-
- Reactions:
- Posts: 1896
- Joined: Mon Apr 28, 2008 10:49 pm
Re: AI and terrain features?
All,
I agree with Tank and MTG. Fought a great fight against the AI last night. Modded OOB with me as Harry Heth versus the Federal 1st. Corps. Kind of a reverse MacPhersons ridge. I attacked up the ridge, heading northwest up the Mummasburg pike. The AI laid out an excellent defence, sacrificing Rowleys Division in a delaying action while Robinson flanked me on my right. I drove thru them, cresting the ridge to find...yes...the Iron Brigade formed up with two batteries in support and another brigade in support on it's left, (my right), in the trees. My tired troops couldn't push them off in time to gain the objective before time ran out. Great work by the AI, trading space for time.
So yes, the AI is much improved.
Jack B)
I agree with Tank and MTG. Fought a great fight against the AI last night. Modded OOB with me as Harry Heth versus the Federal 1st. Corps. Kind of a reverse MacPhersons ridge. I attacked up the ridge, heading northwest up the Mummasburg pike. The AI laid out an excellent defence, sacrificing Rowleys Division in a delaying action while Robinson flanked me on my right. I drove thru them, cresting the ridge to find...yes...the Iron Brigade formed up with two batteries in support and another brigade in support on it's left, (my right), in the trees. My tired troops couldn't push them off in time to gain the objective before time ran out. Great work by the AI, trading space for time.
So yes, the AI is much improved.
Jack B)
American by birth, Californian by geography, Southerner by the Grace of God.
"Molon Labe"
"Molon Labe"
Re: AI and terrain features?
Thank you for your thoughts, gentlemen.
I’m a very dogged surveyor of terrain, sometimes to the point micromanagement (although I try to allow my brigade CO handle minute movements). So it’s a little dismaying when the AI abandons prime defensive terrain as I maneuver my command to strike. Nevertheless, I have noticed great improvements with the AI after 1.4, especially at brigade and division level. On numerous occasions, the AI has surprised me with a cunning complex assault strategy, and it does use elevation with great effect.
I think the problem is at the regimental level. Since terrain isn’t always linear, it often doesn’t contour with the brigade battle order (and when it is linear, not always parallel the brigade’s facing). So it’s up to the regiment to seek nearby cover. And with the potential for a few hundred regiments on the field at one time, it might be too taxing on the hardware side. I wonder if it can be narrowed down somehow. Does the AI use the ‘advance to cover’ command? I’m not sure if the AI uses modded commands. I'm hoping there might be a simple fix to help the defensive AI a little more.
I’m a very dogged surveyor of terrain, sometimes to the point micromanagement (although I try to allow my brigade CO handle minute movements). So it’s a little dismaying when the AI abandons prime defensive terrain as I maneuver my command to strike. Nevertheless, I have noticed great improvements with the AI after 1.4, especially at brigade and division level. On numerous occasions, the AI has surprised me with a cunning complex assault strategy, and it does use elevation with great effect.
I think the problem is at the regimental level. Since terrain isn’t always linear, it often doesn’t contour with the brigade battle order (and when it is linear, not always parallel the brigade’s facing). So it’s up to the regiment to seek nearby cover. And with the potential for a few hundred regiments on the field at one time, it might be too taxing on the hardware side. I wonder if it can be narrowed down somehow. Does the AI use the ‘advance to cover’ command? I’m not sure if the AI uses modded commands. I'm hoping there might be a simple fix to help the defensive AI a little more.
Sorry. I suffer from a serious case of typosis. Don't worry, it's not contagious 

-
- Reactions:
- Posts: 1436
- Joined: Thu Aug 21, 2008 9:06 am
Re: AI and terrain features?
I'm going to have to agree with Gary on this one. The offensive AI can be spectacular (if playing HITS), but the defensive AI is nonexistant. I guess the AI goes with the idea, the best defense is a good offense.
In terms of the AI rushing for cover, I believe the AI is pushing regiments around (for some reason they won't stop when they get fired upon like normal) and end up stopping because all regiments will stop if under fire and reach defensive terrain. I think the rushing thing the AI often does leads to far too many melees, which really kills me, because I hate the idea of melee for my troops.
All in all, my guess is that Gary is playing normal, and thus the AI doesn't exactly look fantastic. The rest of the folks that have replied play HITS most often, thus making the AI look brilliant.
In terms of the AI rushing for cover, I believe the AI is pushing regiments around (for some reason they won't stop when they get fired upon like normal) and end up stopping because all regiments will stop if under fire and reach defensive terrain. I think the rushing thing the AI often does leads to far too many melees, which really kills me, because I hate the idea of melee for my troops.
All in all, my guess is that Gary is playing normal, and thus the AI doesn't exactly look fantastic. The rest of the folks that have replied play HITS most often, thus making the AI look brilliant.
Hancock the Superb
-
- Reactions:
- Posts: 1769
- Joined: Mon Mar 29, 2010 9:56 pm
Re: AI and terrain features?
Hancock the Superb wrote:
To answer Gary's question concerning the AI's use of 'advance to cover': I have never seen an entire brigade advance to a fence line and use it. The most I've seen is three regiments from a single brigade. However I have seen two brigades send two or three regiments each to the same fence line, forming a long defensive line. I don't know if this was planned or happenstance. Again, the AI will only take a defensive posture if it feels it cannot successfully attack. Once the engagement begins, the AI will try to maneuver the regiments not on the fence line into flanking positions. If that is successful, the AI will begin to push forward with those regiments on the fence line. In other words, they don't necessarily stay behind the fences for the entire fight, often for not more then a few minutes. The threshold the AI uses for determining success is a bit too low, IMHO.
The only time the AI regiments will stay behind a fence until they either beat off the attack or break for the rear themselves is if the brigade has no possibility of extending the line and flanking the player.
That is not exactly true. Although the AI is aggressive by nature, I've seen it behave defensively many times, as I described previously.The offensive AI can be spectacular (if playing HITS), but the defensive AI is nonexistant. I guess the AI goes with the idea, the best defense is a good offense.
To answer Gary's question concerning the AI's use of 'advance to cover': I have never seen an entire brigade advance to a fence line and use it. The most I've seen is three regiments from a single brigade. However I have seen two brigades send two or three regiments each to the same fence line, forming a long defensive line. I don't know if this was planned or happenstance. Again, the AI will only take a defensive posture if it feels it cannot successfully attack. Once the engagement begins, the AI will try to maneuver the regiments not on the fence line into flanking positions. If that is successful, the AI will begin to push forward with those regiments on the fence line. In other words, they don't necessarily stay behind the fences for the entire fight, often for not more then a few minutes. The threshold the AI uses for determining success is a bit too low, IMHO.
The only time the AI regiments will stay behind a fence until they either beat off the attack or break for the rear themselves is if the brigade has no possibility of extending the line and flanking the player.
I can make this march and I will make Georgia howl.
Re: AI and terrain features?
Actually, I was playing HITS. I rode out a couple hundred yards to survey the situation north of the fort, and found that Gist’s brigade mired in the swamp moving toward the open space to meet me. I’ve also been trying to beat the game in grognard, and noticed this several times as well (e.g., when Robinson’s Div left the cover of the stone wall to meet me in the open, and when some of Greene’s regiments left the breastworks as I attempted to pull around his right). BTW, I agree the defensive bonus for stone walls should be upped a little too. A soldier crouched behind a stone wall should give 50% to 90% cover, depending on the condition and height. I’m not certain what the rating is now, but that should be easy to mod if someone wants to change it.
I think I’ve noticed this issue because I’m a very defense-oriented player, using the terrain to optimize my tactical advantage. When I see an exposed unit, I take advantage. But sometimes the AI just makes it too easy for me to fight using the terrain of MY choice. And that’s the key to tactical victory, especially as the defender; to force your opponent to fight on YOUR terms. That isn’t to say I haven’t been whipped many, many, many times by the AI. The offensive AI is incredible. Sometimes I suspect they’ve somehow interrogated my courier into divulging the entire grand strategy, seemingly popping up when and where I’m most vulnerable. However, when it comes to delicate defensive posturing (i.e., forts, breastworks, walls, tree lines, etc.), there is room for improvement.
I agree that it is also a patience issue too---that they counterattack a bit too early. It’s especially glaring when they leave the cover of their own guns. Make ME march through the hail of lead, don't volunteer the blood task to yourself (or itself; not sure, sometime the AI feels so alive I’m not sure which pronoun to use
). The fact the AI takes the offensive so often minimizes the effectiveness of its artillery atop a commanding position.
I think I’ve noticed this issue because I’m a very defense-oriented player, using the terrain to optimize my tactical advantage. When I see an exposed unit, I take advantage. But sometimes the AI just makes it too easy for me to fight using the terrain of MY choice. And that’s the key to tactical victory, especially as the defender; to force your opponent to fight on YOUR terms. That isn’t to say I haven’t been whipped many, many, many times by the AI. The offensive AI is incredible. Sometimes I suspect they’ve somehow interrogated my courier into divulging the entire grand strategy, seemingly popping up when and where I’m most vulnerable. However, when it comes to delicate defensive posturing (i.e., forts, breastworks, walls, tree lines, etc.), there is room for improvement.
I agree that it is also a patience issue too---that they counterattack a bit too early. It’s especially glaring when they leave the cover of their own guns. Make ME march through the hail of lead, don't volunteer the blood task to yourself (or itself; not sure, sometime the AI feels so alive I’m not sure which pronoun to use

Sorry. I suffer from a serious case of typosis. Don't worry, it's not contagious 

-
- Reactions:
- Posts: 1769
- Joined: Mon Mar 29, 2010 9:56 pm
Re: AI and terrain features?
Stone walls have a defensive value of 65%, wood fences 45%, breastworks 85%. The values are in the map csv file.
I can make this march and I will make Georgia howl.