View Full Version : Preventing AI Suicide?
RecruitMonty
October 4th, 2016, 02:18 PM
Dear All,
I am working on a scenario where it is fairly important that the AI remains entrenched even after some of the objectives have been overrun. It lasts 30 turns. It is a player 2 assaults player 1 scenario. The AI is in defence.
How can I prevent suicidal counter-attacks by the AI after the turn 20 mark?
Does it have something to do with "Reaction"?
Any help would be much appreciated.
Suhiir
October 4th, 2016, 10:04 PM
Best way I've found to keep the AI units in place is to set their move speed to zero.
shahadi
October 4th, 2016, 10:34 PM
Dear All,
I am working on a scenario where it is fairly important that the AI remains entrenched even after some of the objectives have been overrun. It lasts 30 turns. It is a player 2 assaults player 1 scenario. The AI is in defence.
How can I prevent suicidal counter-attacks by the AI after the turn 20 mark?
Does it have something to do with "Reaction"?
Any help would be much appreciated.
Exactly. You can set reaction to a turn to enable the AI to counter attack with specific formations. Until the turn is reached the formation will remain in place.
If you want a formation to attack say on turn 22, then set reaction to 22.
In addition, if you do not want certain formations to leave their fighting positions set reaction to 98.
Reaction by default is set to 99. At 99,the AI decides when and where to attack.
Wild Bill Wilder has a scenario, I believe it is titled: "Finding Way Home." It has various reaction values that maybe beneficial to check out his implementation.
=====
DRG
October 5th, 2016, 08:22 AM
from the game guide ( that thing people rarely read )
QUOTE
In scenarios, if the "reaction turn" is set to "turn 98" units will hold in place for the entire game and not counter attack to re-take V-Hexes. This includes both advance and assault and delay and defend scenarios"
jp10
October 9th, 2016, 02:55 PM
"...not counter attack to re-take V-Hexes."
But will they still not move and react to opposing units coming close? I thought they would become locally mobile due to being attacked, they just will not target V-hexes.
shahadi
October 9th, 2016, 03:05 PM
"...not counter attack to re-take V-Hexes."
But will they still not move and react to opposing units coming close? I thought they would become locally mobile due to being attacked, they just will not target V-hexes.
Reaction turn 98 means they will not move. They may fire on units, but they will "hold ground and fight in place."
=====
kingbowl
November 15th, 2016, 08:24 AM
i am playing a random campaign is it possible in a campaign to it is a problem with defence missions
DRG
November 15th, 2016, 09:43 AM
No. That's a feature used to tweak the AI's response in a scenario. You can't do that in a generated campaign but it could be done in a scripted campaign
IronDuke99
November 16th, 2016, 02:07 AM
I have always found the AI is not too bad in dug in defence (other than random initial positioning that tends to be more or less pretty awful).
The AI is less good at delay scenarios and bloody awful at advances and attacks where it always does a Banzai charge and generally attacks with any armour long before any leg infantry can catch up.
I mostly do WWII British and Commonwealth v Germany, Japan and Italy or, occasionally, Germany v USSR in pretty big Brigade sized actions.
While in MBT I tend to mainly do Company - Battalion sized stuff.
Don't know if it just my wishful thinking but WWII German forces do seem a bit more likely to counter attack from defence (accurate enough).
I also find the AI is okay in, in defence, in MBT when the enemy is assorted terrorist-gurilla forces, less so if it is a well organised and properly trained force.
If I could change two things in this game it would be to improve random AI troop positioning in defence and stop attacking AI armour bombing along at max speed all or most of the time (in fact I actually think it would probably be better if all AI vehilcles were restricted to half speed or less).
scorpio_rocks
November 16th, 2016, 04:08 AM
(in fact I actually think it would probably be better if all AI vehilcles were restricted to half speed or less).
That may be the brilliantly simple way of preventing the AI from separating infantry and vehicles! It may also not be too impossible to code?
DRG
November 16th, 2016, 11:00 AM
It's been discussed before in the pass but we might bounce it around again
shahadi
November 16th, 2016, 11:15 AM
...(in fact I actually think it would probably be better if all AI vehilcles were restricted to half speed or less).
You should purchase infantry & vehicles separately. In the Editor, reduce speed of vehicles (use Pyro's tutorial in advanced waypoints) and position the vehicles approximately. Then, apply waypoints.
Not sure, but this may get what you're after.
=====
jp10
November 16th, 2016, 11:28 AM
Not suggesting this be done or can, just speculation, but in recent patch details it was mentioned that APC code was tweaked so they would tend to retire behind dropped off Infantry to support them.
What if tanks in an Infantry support role were classed as APC and organic to the Infantry formation (like most APC equipped formations) would they follow behind and support better? Would it require more unit types or could an editor or preference option switch armor from Infantry Support code to Armor Advance?
IronDuke99
November 16th, 2016, 11:44 AM
I think the way the AI handles an infantry + armour attack is the least realistic thing in the game.
If the Brits are the AI side in WWII an infantry + armour attack can more or less work, if you place the tanks a bit behind the infantry to start with, and they are very slow Infantry Tanks like the Matilda or Churchill.
The ideal solution would be something like a 'assault speed' for the AI, that set all vehicles on the AI side to a certain speed at random: perhaps slow = 8, medium = 12 and fast = actual maximum speed?
Failing that maybe half maximum speed for any AI vehicle that can move faster than 8 and full speed for those with a maximum of 8 or less?
The main thing, to me, would be to keep AI leg infantry + armour (mainly in WWII) or APC/IFV + tank speeds (mainly MBT) to something reasonably close to each other?
Not sure what is possible in terms of code and/or amount of work required?
IronDuke99
November 16th, 2016, 11:47 AM
...(in fact I actually think it would probably be better if all AI vehilcles were restricted to half speed or less).
You should purchase infantry & vehicles separately. In the Editor, reduce speed of vehicles (use Pyro's tutorial in advanced waypoints) and position the vehicles approximately. Then, apply waypoints.
Not sure, but this may get what you're after.
=====
Yep, true, I know you can do that but it is a lot of f...g about in a large scenario.
I will, sometimes, in a small scenario, -and I tend to use scenario editor more than I use anything else in this game- change all the AI vehicles speeds, but, as I said that is a great deal of messing around for one battle in anything larger than a infantry battalion sized action.
scorpio_rocks
November 16th, 2016, 01:22 PM
...(in fact I actually think it would probably be better if all AI vehilcles were restricted to half speed or less).
You should purchase infantry & vehicles separately. In the Editor, reduce speed of vehicles (use Pyro's tutorial in advanced waypoints) and position the vehicles approximately. Then, apply waypoints.
Not sure, but this may get what you're after.
=====
Yes in a scenario but it is impractical in a generated campaign
Imp
November 17th, 2016, 03:51 AM
This is hard thing to code as I think the AI looks at units individualy rather than the tactical picture.
I agree has a tendency to rush head long to destruction but sometimes it does otherwise.
Slows to what I call combat speed or becomes stationary or a combination of the two.
Nearing victory hexes seems to modify behaviour in my opinion causing slowing/unloading.
If possible perhaps something like a check to see if any freindly units within XX range have been fired on or wrecked.
Other possible option would be the ability to "crosstag" formations.
Assign tank formation to infantry formation & it trys to shadow & support with the usual randomness thrown in.
Serious work if possible I would think as picklists would need to factor in the ability at purchase for the AI to decide which if any formations its going to mate.
Trouble is again so many variables you cant just set vehicles to move slow sometimes you want the speed otherwise it would not be a factor in vehicle design.
shahadi
November 17th, 2016, 06:24 AM
This subject is way beyond setting reaction turn values. If you want CS tanks to support infantry in the game or IFV's there's a lot of effort involved. There are a number of threads on this subject, here is one to get started: http://forum.shrapnelgames.com/showpost.php?p=826038&postcount=1.
=====
IronDuke99
November 17th, 2016, 12:04 PM
Trouble is again so many variables you cant just set vehicles to move slow sometimes you want the speed otherwise it would not be a factor in vehicle design.
Agreed, but the trouble is the AI cannot use it with any common sense, so, IMHO, it would be better if AI vehicles all just moved more slowly. Another thing that might help a little would be to make AI tanks, etc start well behind any leg infantry. Again I have no idea if this is possible in terms of code, or work required...
Suhiir
November 18th, 2016, 01:16 AM
Maybe something as "simple" as a slider that effects vehicle speeds like the range slider effects weapon firing ranges?
jp10
November 18th, 2016, 11:32 AM
A sub-set of this issue is that recon units should pull back to a 'not in contact' condition when fired upon (the computer knows is units are 'seen' or have been fired upon) rather than continuing cannon fodder advances.
They should be constantly probing for your lines and gaps in your defenses. You would have to control your reaction fire setting to draw them in or let them pass to wait for the following forces.
Suhiir
November 18th, 2016, 09:35 PM
A sub-set of this issue is that recon units should pull back to a 'not in contact' condition when fired upon (the computer knows is units are 'seen' or have been fired upon) rather than continuing cannon fodder advances.
They should be constantly probing for your lines and gaps in your defenses. You would have to control your reaction fire setting to draw them in or let them pass to wait for the following forces.
I'm afraid that would require a rather extensive AI rework.
Imp
November 18th, 2016, 09:55 PM
Sort of a catch 22 the AI has to recon by death in most cases, unlike most other games the AI gets no extra help cheats. The AI does in my view perform better when it has more information, recieved a lot of air for example.
Never thought to do before but I might try giving the Al a boost in searching to give it a slight advantage.
jp10
November 19th, 2016, 12:44 AM
I'm afraid that would require a rather extensive AI rework.
Not just a higher retreat/rout probability? If they would pull back at first shot (or when the AI knows you have spotted them, even if you haven't fired or they have not spotted your units) then they would tend to advance only on open undefended routes and keep their distance from defended areas.
shahadi
November 24th, 2016, 09:05 PM
I'm afraid that would require a rather extensive AI rework.
Not just a higher retreat/rout probability? If they would pull back at first shot (or when the AI knows you have spotted them, even if you haven't fired or they have not spotted your units) then they would tend to advance only on open undefended routes and keep their distance from defended areas.
I seem to recall MBTs advancing and providing suppression fires when the opfor is lightly armed with say at best inf ATMs.
It maybe true that the AI knows if a lethal threat is present to the MBT and may advance cautiously. Otherwise, against RPGs the MBT advances. If so, we can make IFVs out of MBTs.
=====
FASTBOAT TOUGH
November 25th, 2016, 01:17 PM
The AI (It's been my only opponent for almost 15yrs.) in the same situation as described will try to push it's Recon, Mech Troops, with Tank support forward, it does understand and is focused on the "ATTACK". That being said it also understands "Covering Fire" I will promise you if you persistent in your attack (Regardless of unit type.) the AI WILL assign resources to take out that unit and I have seen this MANY TIMES where It'll be Air, Arty, Armor and Infantry making the "push" against a position. If it has them, it really likes to get snipers in against infantry targets (To of course include ATGW teams.). The AI doesn't seem to necessarily seek to destroy a target all the time either, it is quite content to suppress or cause that unit to retreat in some manner and move most of those assets along to the next issue or objective. It's just what I've seen. The AI could be better I suppose, however, if you really watch how it functions over time you'll see it's not as "dumb" as a lot of people think it is. It'll still throw a "curve ball" at you once in awhile just to keep you honest. ;)
Regards,
Pat
:capt:
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.