PDA

View Full Version : Small AI tweaks for great effect



NkEnNy
Apr 20 2010, 01:58
Arma2s AI often attracts unwarranted criticism. Beneath the cumbersome interface is a rather canny opponent whose major faults lay not as much in the strategic mindset – but in the techniques it attempts to implement those plans.

Bear in mind that arma2 can navigate exceptional distances, perform flanking attacks, suppressive fire, fire and movement, and utilize hundreds of weapon systems. Thus with the assumption and appreciation that it is possible to increase the combat effectiveness of the AI with a few simple tweaks. Read on.

Changes by Concept

[1]Unit Cohesion
Put simply the AI bunches up and leaves itself vulnerable to automatic fire or explosives. The AI should dynamically expand and retract its formation to accommodate the terrain. This should also affect the distance moved when employing bounding overwatch by an equivalent amount.

In open terrain the formation should operate with approximately twice the dispersion currently employed. (10m)

[2]Suppressive Fire
The beta patches introduced suppressive fire as a means to lock down targets. Unfortunately the AI is still quite conservative with its ammunition. In many cases the AIs combat effectiveness would have been greatly increased by pouring on more firepower. .

The AI ought to be about twice as likely to initiate suppressive fire.

[3]Bounding Overwatch
Once ‘Danger’ mode and ‘heavily engaged’ has been flagged – the AI often proves to be extremely unresponsive. Slow AI results in both unnecessary casualties and frustration. Bounding overwatch does have its place when the AI is either engaging enemies or moving independently of the unit.

I propose that Bounding Overwatch should NEVER trigger, with two exceptions.
1. When ordered to ATTACK (target+engage)
2. When ordered to MOVE to a location whilst danger mode is active.
All other orders (get in, heal, rearm, etc) should not trigger Bounding Overwatch.

Changes by Combat modes

SAFE
[0]Unchanged

DANGER
[1] The highest stance adopted by an AI in combat mode should 9/10 times be crouched position.
[2] The AI should ignore micromovement (any movement of 5m or less) made by the squad leader.

AWARE
[1] An AI stationary for more than 5-10 seconds should 9/10 times drop to a crouched position.

STEALTH
[1] Sneaking AI should NEVER move at a pace greater than walking/slow.
[2]In stealth mode the AI should prefer prone stance when stationary.


Thanks for reading
-k

NoRailgunner
Apr 20 2010, 12:41
Simple ;)
1) AI should follow all orders given by player. (Maybe include a more stricter "Break from contact, follow my lead" command)
2) AI should give feedback about the detection by enemy units.
3) AI speech volume and talking - should be reduced/increased according to combat situation/behaviour.
4) "Follow my stance" - should work, regardless of combat behaviour.
5) Implementing better attack/defence priorities and proper weapon usage for AI.

CarlGustaffa
Apr 20 2010, 14:39
I disagree on the suppressive fire. AI needs to be somewhat conservative by default, as "nobody" makes sure AI is capable of restocking themselves. It would be bad for players if they knew they could simply outwait them and take out their flankers (which tends to be easy). "They're suppressing us". "Oh well, we'll just guard this place until they run out, trust me it will happen soon enough". At least when they are conservative, players will lose patience and attack anyway.

AI should be better calling in indirect fire on locations they suspect are being held by enemy forces in defense, rather than emptying themselves. But, naturally, we need full control over how this is done :)

NkEnNy
Apr 20 2010, 16:17
I disagree on the suppressive fire. AI needs to be somewhat conservative by default, as "nobody" makes sure AI is capable of restocking themselves. It would be bad for players if they knew they could simply outwait them and take out their flankers (which tends to be easy). "They're suppressing us". "Oh well, we'll just guard this place until they run out, trust me it will happen soon enough". At least when they are conservative, players will lose patience and attack anyway.

AI should be better calling in indirect fire on locations they suspect are being held by enemy forces in defence, rather than emptying themselves. But, naturally, we need full control over how this is done :)
I'd rather have the AI spend a few extra bullets than his life. Have you actually experienced the AIs suppressing tactics? Quite effective. The AI tends to shoot series of single shots at a controlled pace. Suppressive fire does NOT mean spray your magazine this or that direction.

I stress that these suggestions are simple and feasible tweaks that would make the AI a more capable adversary. Without resorting to wishful thinking.

-k

ScareCroweb
Apr 20 2010, 16:42
I'd rather have the AI spend a few extra bullets than his life. Have you actually experienced the AIs suppressing tactics? Quite effective. The AI tends to shoot series of single shots at a controlled pace. Suppressive fire does NOT mean spray your magazine this or that direction.

I stress that these suggestions are simple and feasible tweaks that would make the AI a more capable adversary. Without resorting to wishful thinking.

-k

I am actually very disapointed in the AI's point suppressing with single shots in controlled pace, its actually more direct fire with extremely poor acuracy, when you fight real people if you do this towards other people you are a dead man. If however you want to do this right you shoot max 2 shots then wait a few seconds study your target then when he is looking another way looking for you, you pop two or three more rounds, if target is not dead you wait longer then repeat untill the enemy is dead, the advantage of this is that you will not reveal your position so easily and you will be able to put more thought into every bullet. ;)

Another thing is I see alot of AI's just laying prone when they see a target they dont look for cover like we do, ofcourse some AI's do use cover effectively but not all of them I dont understand why they dont seek cover when they are in plain sight...

CarlGustaffa
Apr 21 2010, 01:50
Lol, yeah. When completely outgunned they don't even try to hide.

Eclipse4349
Jun 3 2010, 17:52
AI should definitely MOVE when ordered to move or regroup. The slow bounding overwatch has no use in most situations where you have an entire squad moving as a unit (or at least trying to, bc once they start bounding overwatch they never stop and never keep up)... Moving quickly, sprinting from point of cover to point of cover, is much better than walking as slow as you possibly can while someone else "covers" you. The current bounding overwatch system needs to ONLY be used in a CQB environment!

TRexian
Jun 3 2010, 18:03
I think it is unfair to expect AI to behave in a "textbook" fashion when even many trained soldiers, let alone virtual soldiers like most of us here :) do not also behave that way.

I do not disagree with the observations, or even that some of the suggestions are credible, just offering that a different measuring system may be more appropriate.

NkEnNy
Jun 3 2010, 18:54
AI should definitely MOVE when ordered to move or regroup. The slow bounding overwatch has no use in most situations where you have an entire squad moving as a unit (or at least trying to, bc once they start bounding overwatch they never stop and never keep up)... Moving quickly, sprinting from point of cover to point of cover, is much better than walking as slow as you possibly can while someone else "covers" you. The current bounding overwatch system needs to ONLY be used in a CQB environment!

I wholeheartedly agree. I'd say that close to four out of five times the current system of Bounding overwatch leaves the AI squad combat ineffective. Particularly when engaged at open ground.

-k

Eclipse4349
Jun 4 2010, 11:53
Last night, I uninstalled and reinstalled through Steam, which does not distribute the 1.05 patch. I have to use the -winxp parameter again, but the AI no longer gets stuck in bounding overwatch and will actually follow me. I'll be sticking with 1.04 till it's fixed. They still can't line up in formations properly to save their lives, but that isn't a mission killer like the "danger loop" was!

Insanatrix
Jun 4 2010, 22:16
From what I've noticed fooling around in the editor is that the bounding overwatch is done way too slow and they don't actually move up. They tend to move 2 feet in front of you stop and say go im covering. If they moved say 100-200feet up set up behind some cover and then actually covered you it might be effective. It's also not effective at longer engagement ranges. Normally you would leave your AR or MG + an assistant in cover with a wide view of the AO then try to flank through cover to get closer with a fireteam.

Also the AI need to follow orders to a degree. When your taking light small arms fire I would expect most experienced soldiers to follow orders. Maybe if the shit hits the fan you might lose morale and see your AI doing odd stuff and becoming unresponsive but I've seen it happen with just 1 guy with an AK send my team running. Can't get them to do anything. Not sure if there is any kind of morale system in play or not.

twisted
Jun 5 2010, 00:24
add in - reaction to incoming fire. AI should move to take cover automatically if bullets are incoming and not just lie down in the grass.

also if possible AI should take proper stace behind cover - add in duck down behind cover and then raise up to fire then back down when incoming fire.

NkEnNy
Jun 5 2010, 07:31
Assumptions
A stationary AI is a fairly good shooter.
A moving AI cannot and will not fire its weapon.
A moving AI will spend a tremendous amount of time shifting between stances (and sometimes weapon systems)
Therefore eliminating unecessary movement and limiting stance changes creates a more effective combatant.



---
RE: SUPPRESSIVE FIRE

The reason I suggest that the suppressive fire routine should be a more frequent occurrence is not because I want to hear more shooting, but because I want the AI to break its 'wait five seconds then move' procedure.

Particularly in Urban situation the 'five seconds then move' formula gets the AI killed. Why? The AI might spot you, and will certainly communicate your location to its allies -- but it fails to provide effective overwatch. Try it. Let an AI spot you in an urban location, then hide. Wait five seconds then peek around the corner. Nearly EVERY time the AI will have turned his back towards you as it attempts to perform some harebrained flanking involving the nearest geographical feature.

Had the AI been more willing to break that routine by remaining stationary (thus pointing towards you and capable of shooting) -- its combat effectiveness would have increased.

Ammunition concerns. The AI is capable of rearming when low on ammunition and I'd rather have the AI spend bullets than irresponsibly throw its digital life away.
Excessive suppressive fire reveals its location. Yeah sure, but the suppressive fire routine isn't particularly excessive as it is and whilst you are focusing on the shooting suppressing AI -- its allies are flanking you.




---
RE: BOUNDING OVERWATCH

As this thread (and many like it) reflect upon the immoderate use of bounding overwatch.

AI squad spends too much time posturing and moves at a slow pace. Therefore firepower (and chance of achieving fire superiority) is diluted.
Players quickly become aggravated at the AIs inability to read the situation and insistence on excessively utilizing Bounding Overwatch. Common complaint: Squad becomes unresponsive.
Over-much and indecisive bounding overwatch leads to casualties.

Solution is simple!
The AI should always attempt to keep reasonable squad cohesion, thus keeping up with the formation and stance as ordered by ROE and Squad Leader.
When given a ATTACK (target + engage) order. The selected AI should utilize Bounding Overwatch.
When given a MOVE (to specific location) order AND Danger mode is activated. Bounding Overwatch should be utilized.
In all other cases. Be it orders for first aid, Get in vehicle, get in formation, rearm, or whatnot. Speed is of the essence. Therefore Bounding overwatch should not be used! Stance limitations as indicated in OP should be observed at all times.


OP to be updated.

-k

edit: Also I believe the ability of the AI to recognize cover (such as fences and stones) to be quite impressive indeed. I just loathe to see the AI abandon perfectly defensible position to perform a combat ineffective drill -- heedless of all incoming fire!.

NkEnNy
Jul 24 2010, 15:04
I've just made an interesting discovery. Setting your squad to COMPACT COLUMN(all-8-8) or DELTA (all-8-9) eliminates all attempts at Bounding overwatch.

YES. It is now possible to get the AI to disengage, even when in danger mode. Simply haul ass to the location you want your squad to retreat to and enable either of the formations above.

I've also experienced that the AI will NOT use bounding overwatch when ordered to move places (such as to pick up gear or First aid) when in either of these formations.


-k

Otterbear
Nov 18 2010, 11:42
Great ideas NkEnNy; (I pray they are included in a future patch.)

Even though changing the formation can eliminate the "over-watch" problem, that isn't IMHO the best way to solve the problem. Hopefully BIS will FIX the problem and we won't have to invent ways to get the AI to behave. :)

Perhaps adding a "SPREAD" command, would allow the units to have a more realistic cohesion. As it stands (and they ALWAYS do), they are essentially ONE target for the opposition. One good HE round or machine-gun burst and you've lost half your compliment of troops.

EDIT: I really have to re-address this issue of "bunched up troops"..."Flank right" or "flank left", "Echelon right" or "Echelon left" ...do not solve the underlying problem. I want my troops to "SPREAD OUT" EVENLY over a much broader area. Not JUST to my right or left or ahead or behind. I REALLY, REALLY hope that the developers look at this and fix it soon.

Heatseeker
Nov 24 2010, 04:19
Wrong section... the a.i. has been tweaked before and it broke every single time.

Its easy to conceptualise how it should work but making it nice and perfect is a whole diferent matter.. im sure if it was easy the a.i. would be pro drivers and pilots by now..

In 1.55 the a.i. seems to be working "well", atleast better than 1.54 so i just hope they wont break it again..

mr.g-c
Nov 24 2010, 14:28
Nkennys ideas are perfect, probably rather easy to implement (they are just "tweaks" i guess) and with great an immediate effect on Gameplay with AI.

Has anyone already made a ticket for it in the CIS? This should be voted to the top feature-suggestions regarding AI, because of the reasons i said in the first sentence.

ACE1434
Nov 26 2010, 00:36
my problem with the new 1.55 patch is that now the helicopters fly very akward. In ArmA 2 and ofcourse older games such as ArmA/OFP, the AI choppers flew seamlessly, and RARELY CRASHED, now for some reason, I noticed someone complaining about the choppers AI, and that it was "fixed" in the new 1.55 patch. This is far from the case, now my choppers(only in Operation Arrowhead) fly as if the pilot is constantly pulling back and forth on the joystick, and is highly noticable from the interior if your passenger or gunner. Now at first I thought it was a mod, I ran with no mods, the problem still persists. I ran ArmA 2 alone and the chopers flew like they should perfectly smooth, I jump back to OA and back the pilot having a seizure. please BIS fix the Helicopter AI, helicopters are the best thing in the modern battlefield, I and many others dont want to see them abused.

That guy
Nov 27 2010, 06:35
actual real world suppressive fire with a semi auto weapon is one shot every 2-4 seconds (with a 4 man fire team). even less when you have a larger element engaging. suppressive fire is just a friendly reminder that the guys trying to kill you are not on a coffee break... yet :)

obviously with MGs its different. its a good idea to have either the team MG OR rifles doing the suppressive work, not both

Ai just need to be more "aware" of when rounds are close to hitting them


a "break contact" command would be useful. you select the command, and then click where you want your element to fall back too.

LeadCommando65
Nov 27 2010, 06:43
Yeah, still after 1 year of patching, the AI behaviour in "danger" and "stealth" mode lacks some obvious, logical and essential things like described in the first thread. When I'm playing I still don't get the difference between stealth and danger mode, cause the AI is acting more or less the same (besides the whispering voices ...). Especially in stealth mode I have great trouble to sneak up to an enemy position cause every time an AI gets detected because it ran along the field without care. If I don't order them to crouch it's impossible (but that's another order and when it comes to fight you need to be fast to revert that setting ...).
AI's are rarely using the new introduced crouch position (at least for moving). That's a real problem.

Otterbear
Nov 28 2010, 02:15
Giving my team the "crouch" command NEVER seems to work. (in my experience).

Giving them the "copy my posture" command only works if you, as the leader, go prone. Otherwise, they just stand around like usual, unless you put them into "danger" or "stealth" modes, obviously.

I'm relatively new so this is just based on my limited experience.

LeadCommando65
Dec 5 2010, 10:17
Is there already a ticket for this (or similar issues) on devheaven? I've searched, but no appropriate results were given.

The game really needs improvements on this. Played a stealth mission today and the AI got me killed so much that I canceled the mission, cause it was no fun anymore. It is so much annoying to see the AI make no use of the stance possibilities they have. Sure, you could force them to crouch or prone, but that decreases the mobility of the team and in case of a emergency situation (like getting detected or the need to extract fast) you have to change the behaviour and the stance position (and this costs valuable time).
I don't understand and wonder why the devs don't see these problems. This thread exists now more than a half year and there have only been slight changes to the behaviour modes (nearly none, or just related to bounding overwatch). Even that the community isn't more demanding to get this issues solved is confusing me :confused: . Are they all playing solely combat situations/scenarios? I don't believe that.

I have to say leading an AI squad has gotten more complex than in good ol' OFP days, where the behaviour modes had a real impact on the real behaviour of the AIs. It's a shame to see such a backstep still persisting in such a great game. :mad:

I know AI programming is difficult but since there already are different modes in the behaviour, it can't be that hard to swap the priorities/stance preferences between those modes.

mrcash2009
Dec 5 2010, 11:17
You need to hunt down in the mods complete section Gibbets "Copy My Stance" addon ... this will force your team to copy stance always & works like a charm, i never run the game without it (SP). It also has key options to switch it on and off, and if you dont tell your team or men to do any other stance they will always be following your posture.

EDIT:

Here you go:

http://forums.bistudio.com/showthread.php?t=107058

So when your men do not follow setting copy my stance from the menu with this on, will force them to always copy you. Sometimes you may have to stand and crouch to get them to do so (rare) but 99 percent works fine.

For example if you set them aware and your are crouched behind a tree, then send a scout team, they will scoot crouched and running nice and fast. Any mode will force them to still copy you (especially when they become stationary). You can still tell them another stance so certain ones wont copy you, you then set them to copy my stance again and they will fall back in line.

I would have to agree that current AI stances and modes can render certain AI to think for themselves sometimes and it really needs to be like this addon for vanilla, but ... this works.


When I'm playing I still don't get the difference between stealth and danger mode


BTW BIS desctiption of combat modes:


Combat Mode

This menu configures the behaviour of your squad members whilst on the move. Also, you have the option to determine which stance they should try and keep.


Safe - Your squad moves very quickly. Ignores cover whilst moving often opting to take roads and paths and will not be on the lookout for enemy units
Aware default - Your squad moves quickly. Will stick loosely to cover sometimes taking roads and paths and will be looking out for enemy units
Stealth - Your squad moves very slowly. Moving strictly from cover to cover in a bounding fashion, one group will stop to cover whilst one group advances, the squad should spend a lot of time in the prone position
Danger - Your squad moves slowly. Moving strictly from cover to cover in a bounding fashion, one group will stop to cover whilst one group advances
Stand Up - Your squad will stay stood up. Useful for traversing long distances on foot
Stay Crouched - Your squad will remain in the crouched position. Useful for close quarters combat, featuring plenty of cover
Go Prone - Your squad will stick to the prone position. Useful for quiet movement or long range and low cover engagements
Keep Low - Your squad matches your current stance

KeyCat
Dec 5 2010, 11:28
Are they all playing solely combat situations/scenarios? I don't believe that.


Nope!

Some valid points and I guess we all hope that BIS someday will return to improving the AI.

Not a proper solution but I suggest you to look into VAC (see sig). The past weeks I've been working on and fix my old A1 VAC-profile and adapted it to A2:OA. Great program and it sure makes commanding your AI teammates more pleasant playing sneaky SP missions.

/KC

mrcash2009
Dec 5 2010, 11:33
I use Pilflus (profile is in my sig) but this is XP only it seems, some complain issues with vista and wont work with win7.

LeadCommando65
Dec 5 2010, 11:40
Gibbets "Copy My Stance" addon ...

Nice addon, but this would only partly solve the issue.

The point is that AIs need to change their stance individually and intelligently. Since there is the bounding overwatch feature, where the AIs are moving one after another to make an approach, every unit needs to change their stance independently, appropriate to the "local" situation given. I wont repeat what the thread starter already has laid out. These changes would resolve the issues everyone should be experiencing. But it seems most people don't notice or found backdoors to undergo that issue (like the addon you mentioned), since I don't feel that there is enough feedback on this problem.


BTW BIS desctiption of combat modes:

Yeah, the description sounds good, but in reality it's not like that. You see some of those points in approach, but for example the stances taken by the AIs aren't adequate.

KeyCat
Dec 5 2010, 12:53
I use Pilflus (profile is in my sig) but this is XP only it seems, some complain issues with vista and wont work with win7.

Thanks for reminding me of the free alternative and you actually made me update my long overdue signature as well ;)

Will try out the latest version of Gibbets "Copy My Stance" addon (had some issues with his first one) but still wishes for improvements in stock A2...

/KC

mrcash2009
Dec 5 2010, 15:30
I have to confess going back to the OFP I realised i had this thread mixed up with another that has a very similar title with "tips" on using AI ... so yes what I posted may help but isnt directed to the OP, sorry, my confusion.

NkEnNy
Dec 7 2010, 04:58
I am glad this thread has generated some attention. Like many others I believe the default AI is on the conceptual level a rather capable opponent, its failure lay mainly in the individual AIs execution of said tactics/plans.

Unnecessary exposure, lack of noise discipline, and unwillingness to exercise tactical patience gets more AI soldiers killed than strictly necessary. It is my firm belief that it is possible to greatly enhance its (the AIs) tactical expertise by introducing some simple—yet harsher rules of engagements as presented in the original post.

Being written in pre-BAF days, the Original post itself is somewhat dated. As of 1.56 there are subtle changes in how the AI handles itself mostly for the better. Even so many of the tweaks and concerns presented by myself and other posters are still quite relevant


Persistent squad issues in arma2
:: Atrocious pathfinding
:: Bounding Overwatch often renders the squad combat ineffective
:: Ineffective ROE changes (stealth doesn’t make the squad stealthy)
:: AI teammembers incapable of following human TL up or down certain slopes etc
:: Cumbersome user interface
etc


The original post probably deserves to be updated.


Thanks,
-k

Spamurai
Dec 7 2010, 12:27
The AI should be taught to see the Field of View (sight cone) of dangerous threats that they "knows about". For example, if the group was patrolling down a street when they get ambushed by a vehicle with a heavy machine gun covering the street they are in, they should factor in the view cone (field of view) when they are recalculating their positions and pathways. They should avoid the view cone of the threat and their behavior should move them out of it if they sense they are caught in it.


Initially they seem to respond fairly well to the discovery of the ambush, they usually, but not always, move to the sides of the street and try and make use of corners and walls for cover. However, what they do next is what will ultimately get them all killed.

Once the alarm-response is finished, they start "micromanaging" themselves, moving and repositioning themselves oblivious to the kill-zone that the street has become... minor AI adjustment behaviors see the AI moving back into the view cone of dangerous enemies where they promptly get machine gunned down.

When AI are picking and plotting their navigation nodes, they should detect when a Node is covered by the View Cone of an enemy and then treat it as invalid... a new conditional branch of their FSM should dictate what to do when this happens. For example, AI that become "trapped" because their only valid node is covered by an enemy FOV, should call out that they are trapped ("I'm pinned down, help!"), they should then deal with the invalid node if they can.... other allied AI should suppress the enemy covering the Node with gun fire to free the trapped trooper, or toss smoke on the node to block enemy view cones, then move through it and not stop on it.

Sometimes I think in the effort to make the AI as human as possible in both behavior and response.... they end up being even more robotic then ever. I think this is one of those situations...

KeyCat
Dec 7 2010, 15:48
Great observations and ideas Spamurai!

/KC

Murphe
Dec 7 2010, 17:05
Yeah I strongly agree with this and the original post. I think for me it is one of the biggest reasons why I lose soldiers.

connos
Dec 8 2010, 14:44
Spamurai great post and ideas. In my opinion if the AI needs to cheat to be believable its OK. The AI needs to be believable and not actually to think like humans.

megagoth1702
Dec 9 2010, 14:38
Totally agree with OP, great ideas and seem to be able with some if then code. :)

Muahaha
Dec 15 2010, 09:09
To make it more human like, a randomness can always be put in. Example from Spamurai, to prevent the expected reaction of AI getting pinned down, maybe a function to call for "special" action can be factored in. Such as a dash of bravery to the pinned down soldier to do a "run for ya life" to the other side... But surely more juice will be drawn from the CPU cycle.

Then again... some people will say it's a BUG....

Alwarren
Dec 15 2010, 09:38
When AI are picking and plotting their navigation nodes, they should detect when a Node is covered by the View Cone of an enemy and then treat it as invalid...

Not only enemies. Just yesterday, I had an AI run in front of me while I was firing, with obvious results. They tend to not look at fire arcs of squadmates. They should pass behind me, not directly in front of me, more so since the squad was in "danger" mode.