Jump to content
Sign in to follow this  
igneous01

A solution to improving AI group fighting ability

Recommended Posts

Currently in Arma 2 we have some great AI at work. They have the ability to take cover and engage and flank and support each other all very well. They can do all of this authentically, but theres a problem: the squad leader suppresses their intentions to fight well.

Some of you might be thinking what the hell am I going on about, let me explain:

THE PROBLEM

Squad leaders, by default, issue attack orders to other members when in a fight. This is a problem because it forces individual units to break formation and chase after an enemy - even if they have LOS to the enemy and we're shooting at him before, will now try and move closer to the enemy, effectively giving any and all cover to fulfill the leaders orders to attack the target. This is what kills the AI's fighting ability.

AI have the potential to fight and do amazing things when not issued any attack orders, because they are looking for cover rather than looking to be within 50m of the enemy target.

CASE STUDIES

example a): fighting on open plains/farm land with limited cover.

Here, you can see a basic fight set up - 3 fireteams given a waypoint by a rock/house with some insurgent squads moving to their position 500 metres away. Naturally the area is very open with limited cover available, so it should be sensible that the ai hold there ground behind this cover to engage right?

2011121700001d.th.jpg

Here is screen of the fight in game - some of them are holding their ground and doing the right thing, but one of them has run out into the open for no reason (you cant see it here, but two of them in fact ran out of cover)

2011121700002.th.jpg

And here is the end result (only the squad leaders stayed behind the rocks, and about 2/3 of the other guys were ditching the rocks to fight them head on :(

2011121700003.th.jpg

Why did they do that? They were perfectly capable of fighting them from the rocks, they were all firing on the enemy, so why leave?

Now, here is the same fight repeated, but this time, giving our 3 fireteams this simple code in init

 (group this) enableAttack false

This little code turns off the leaders ability to give attack orders to other member units.

2011121700005.th.jpg

Now lets see what happens in this fight:

2011121700006.th.jpg

2011121700009.th.jpg

2011121700008.th.jpg

This was all screened in the same fight - Nobody was leaving cover or doing suicide charges. AI stayed behind the walls and shack the entire fight and continued to engage from there - just as expected. Even the guys behind the shack wouldn't dare charge head on when there position is being overrun, they moved back.

2011121700012.th.jpg

This is just one example: But this problem applies to all areas of combat, not just open fields and plains. AI engaging in villages with lots of cover will still only be in cover about 50 percent of the time, because the main priority for them is to attack their target (or get within 50m of the target) and not go into cover.

This problem is compounded when single units are ordered to attack other units, they behave like 1 man groups, completely ineffective.

THE PRONE PROBLEM

AI leaders, when having no orders or waypoints to move somewhere, will not seek out cover or move when engaged. They will simply choose to go prone and thats it. This is problem because member units mimic the leaders stance, and so if the leader goes prone, it causes all other units to mimic his stance and go prone as well. As seen in this picture, the sniper is the squad leader of that group (same mission as before, but replaced soldier model to better illustrate this phenomena)

2011121700013.th.jpg

As you can see, everyone else in his team has moved to cover, but he will not move and stays in the same spot forever, until a script gives him a waypoint or a domove command, he will not move at all to better position himself while in combat.

ai leaders need to be able to give themselves low level move commands, because as it stands now, once ai leader fulfills a waypoint, HE WILL NOT MOVE TO COVER OR DO ANYTHING, he will simply go Prone and stay there, forcing all other units to go prone with him (copying stance)

SOLUTION

AI squad leaders need to STOP issuing attack orders to SINGLE UNITS - they completely reduce their own effectiveness to fight back, and leave their young comrades to die. Attack orders need to stop forcing units to doMove to the enemy, because if the AI is already engaging the enemy, there is no reason for them to suddenly leave cover to fulfill a request to be within 50m of target, or kill target.

Squad leaders should instead order 4 UNITS OR MORE to engage enemy units. With 4 units or more, these units will all stay in formation with each other, which is what allows the AI to take cover properly and to engage properly. AI units are only able to be effective if they are in groups and are in formation with each other.

BETTER SOLUTION

A better proposal would be to divide group members into even teams upon start up of the game (5 man team created = 2 teams, 12-13 man squad = 3 teams) and make AI squad leaders issue Team attack orders on OTHER ENEMY TEAMS. This i believe, will allow a compromise between ai flanking enemy units as a team, fighting in cover as a team, and team members to cover each other AS A TEAM. AI leaders need to give themselves lowlevel move commands, like all other member units, so they can fight in cover like everyone else.

CONCLUSION

The AI can fight extremely well, so well it blows my mind on some of the things they can do, what stops them from showing off this mind blowing ability, is the Squad leaders stubbornness to order individual units to attack other individual units. And his incompetence to take cover for his own safety, forever reducing his teams ability to fight. With proper adjustments to attack orders and squad leader movement, the AI can be seen as the proper fighters they are: Fighting as a team behind cover, and flanking as a team, using cover.

Will post more examples when i convert some videos

Edited by Igneous01

Share this post


Link to post
Share on other sites

I think AI squad leader already issues orders to 2 units per target when it can.

The good and simple solution will be:

a) issueing an order only to 2 people per target and no less

AND

b) not issueing an attack order to more than 50% of the squad <- this will also create an impression like AI suppresses you while sending men to flank you

As an example let's say that AI has 8 people so it should give an attack order only to 4 people, 2 per target. That way two small buddy teams will advance while 4 guys will remain in position to suppress and cover their advance (which will be a natural result of half of the squad staying in one place in most cases)

And even in case of fireteams - one buddyteam will attack, while the other buddyteam will cover and if one soldier gets killed the remaining 3 people will always stay together since 50% rule will be broken.

Share this post


Link to post
Share on other sites

Frequently when AI takes cover, they do so behind a house or wall the breaks line of sight to the enemy.

Ideally, the AI would send units without current line of sight to engage, and understand that they cannot suppress and support other engaging units. Ideally all engaging units would be adjacent in formation.

But this is getting towards some pretty complicated coding. And from experience I know that when BIS makes things more rigid and predictable, as opposed to variable and mediocre, we get problems.

Edit: And here's something else for you to examine, Igneous. Do squad leader still give attack/engage commands when they are on a Move/Hold/Sentry waypoint? How do squads behave with a Guard waypoint and allowAttack false?

Edited by maturin

Share this post


Link to post
Share on other sites

BTW can 'enableAttack false' only influence the whole group or can it be done per soldier?

Share this post


Link to post
Share on other sites
I think AI squad leader already issues orders to 2 units per target when it can.

The good and simple solution will be:

a) issueing an order only to 2 people per target and no less

AND

b) not issueing an attack order to more than 50% of the squad <- this will also create an impression like AI suppresses you while sending men to flank you

As an example let's say that AI has 8 people so it should give an attack order only to 4 people, 2 per target. That way two small buddy teams will advance while 4 guys will remain in position to suppress and cover their advance (which will be a natural result of half of the squad staying in one place in most cases)

And even in case of fireteams - one buddyteam will attack, while the other buddyteam will cover and if one soldier gets killed the remaining 3 people will always stay together since 50% rule will be broken.

its split sometimes as to whether or not the ai leader will issue attack orders to two units, he does not always do it, around half of the time he issues them to individual units instead. However, the issue still remains that even with 2 units, they do not cover each other as expected, this might be true if for example the ai leader always issues attack orders to two men.

Biggest issue I have seen so far in regards to cover, is that the ai leader will not move to any nearby cover if he does not have any waypoints or a doMove command given to him via script. He will only choose to go prone and stay there, and this (as I said) causes the rest of the group to go prone as well, because they are copying his stance. This makes them not go to the nearest cover because they cannot move when prone.

I would like to see 12 man squad groups dividing into 3 teams instead of 6 buddy teams for the simple reason that they behave better with regards to moving in and out of cover and supporting each other, AI does not move very well in 2 man teams (although sometimes they can)

Once I upload some videos it will provide a clearer picture.

Share this post


Link to post
Share on other sites

Biggest issue I have seen so far in regards to cover, is that the ai leader will not move to any nearby cover if he does not have any waypoints or a doMove command given to him via script.

I think this is deliberate, to help missionmakers. Getting the AI to move to a specific point of ground is nearly impossible at times, so being able to anchor a squad around one stationary unit is helpful. Also, if the squad leader does not move, he will not confuse his subordinates and cause them to break cover to maintain formation.

Like someone else said before, try Guard waypoints. I believe that if you changed every Move and Destroy waypoint in the game into a Guard waypoint, the AI would appear 5 times smarter.

Share this post


Link to post
Share on other sites
Frequently when AI takes cover, they do so behind a house or wall the breaks line of sight to the enemy.

Ideally, the AI would send units without current line of sight to engage, and understand that they cannot suppress and support other engaging units. Ideally all engaging units would be adjacent in formation.

But this is getting towards some pretty complicated coding. And from experience I know that when BIS makes things more rigid and predictable, as opposed to variable and mediocre, we get problems.

Edit: And here's something else for you to examine, Igneous. Do squad leader still give attack/engage commands when they are on a Move/Hold/Sentry waypoint? How do squads behave with a Guard waypoint and allowAttack false?

when giving them move waypoints, the leaders priority is to fulfill the waypoint, if he meets contact, he will still move to the waypoint but will be taking cover as he moves (expected) he will not order his groups to attack, they will all move in formation (with regards to covering each other) Guard waypoint makes the ai leader move to an enemy unit, so they all follow suit together. same with Hold. Once the leader reaches the waypoint, he will lie down, and wait there until another script gives him waypoints, or a move, doMove command.

Another issue you brought up that needs to be addressed: when ai are behind a building, they have no LOS to the enemy, so when given orders to attack, they will leave cover and focus on attacking the enemy. When individual units attack, there is no cohesion in the ai group, as everyone is running around to attack their specified target, which is why I think groups of 2-4 need to be addressed to attack and not individual units (which happens half of the time)

---------- Post added at 20:54 ---------- Previous post was at 20:51 ----------

I think this is deliberate, to help missionmakers. Getting the AI to move to a specific point of ground is nearly impossible at times, so being able to anchor a squad around one stationary unit is helpful. Also, if the squad leader does not move, he will not confuse his subordinates and cause them to break cover to maintain formation.

Like someone else said before, try Guard waypoints. I believe that if you changed every Move and Destroy waypoint in the game into a Guard waypoint, the AI would appear 5 times smarter.

this might be true, but if the squad leader goes prone, then this causes all his member units to also go prone, unless they are issued attack orders (where they are free to move on their own) once prone, the ai will not move to cover, unless they manage to stand up or crouch on their own again (and this takes 30 seconds or more after SL made everyone go danger, sometimes it doesnt happen at all)

Share this post


Link to post
Share on other sites
THE PROBLEM

Squad leaders, by default, issue attack orders to other members when in a fight. This is a problem because it forces individual units to break formation and chase after an enemy - even if they have LOS to the enemy and we're shooting at him before, will now try and move closer to the enemy, effectively giving any and all cover to fulfill the leaders orders to attack the target. This is what kills the AI's fighting ability.

100% correct. While I was building my command menu replacement, I replaced all the engage/attack commands with dotarget/commandtarget, and I saw a different kind of AI teammate. They stay with you and use cover. Often I found myself simply directing their fire with binoculars instead of engaging myself.

Share this post


Link to post
Share on other sites
Really just a great find - CIT anyone? :D

No, that would break the game. The AI needs to engage at times.

Any change would have to be very carefully applied.

Share this post


Link to post
Share on other sites

maybe in the following betas after 1.60 BIS will do this. I hope so. Like they did with the engaging of empty vehicles which was tested across multiple betas and quite a fine solution was found.

Share this post


Link to post
Share on other sites

It prolly does need a CIT ticket so that we can show BIS it is important (and vote for it)

Share this post


Link to post
Share on other sites
No, that would break the game. The AI needs to engage at times.

Any change would have to be very carefully applied.

yeap

im not saying to remove engagement - it needs to be buffed up with more men engaging at a time. Thats probably the best solution right now thats quick.

Share this post


Link to post
Share on other sites

It would be good to know which waypoints, if any, disallow engage orders. Perhaps some waypoints could have this behavior added.

Now that is what should go on CIT.

Share this post


Link to post
Share on other sites

Nice find. Although this isn't the end all be all for ai it definitely makes fighting the ai more interesting, as they actually shoot at you and try to find cover instead of dashing towards there doom.

I agree that larger teams should be sent to engage. Speaking of which, maybe instead of a squad leader telling a group to engage a particular man, the squad leader tells them to simply clear out a particular area. that way the ai will not be ignoring targets because they are so focused on killing one man. Really squad leaders, whether human or ai should only have to tell subordinates where to move, They should be capable of choosing which threats to engage from there. Ai should only be assigning really important targets to focus on, ie. a tank, AT guy, heavy MG etc.Also, aggressive movements should not be made by the ai unless they outnumber their enemy at least 2:1 or they aren't under heavy fire. It doesn't matter if a 1 man or four man team is being sent off, if the enemy isn't suppressed, the team will get mowed down all the same.

Share this post


Link to post
Share on other sites

another thing to add: this works really well for ai in buildings - if u create two groups and move them to a building with a waypoint (waypoint snapped to building) and have attack disabled, they will engage from the building.

Once my videos start to finish rendering ill show some examples and more tests... (grr videopad)

Share this post


Link to post
Share on other sites

Nice Observation, and good described. Congrats. :)

I have seen this single Attack Command Madness in a Mission where you are a Groupmember of a 20 Men Infantry Group, led by AI Commander.

He gives Attack-Orders to every single Groupmember without End, which leads to total Chaos.

Share this post


Link to post
Share on other sites

Did 'USMC max skill squad attacks Kamenyy with 2 low-skill russian squads defending it - minus 3 guys (2 marksmen and 1 grenadier) for balance'

USMC had a SAD waypoint and were behind a few trees. Russkies had SENTRY waypoints in between buildings. All had Igenous' solution.

They pretty much started shooting each other the moment I previewed and results were:

Both russian squads utterly obliterated. 3 marines killed.

What I've learned from it is that all squads do need to send out teams to flank the enemy and retreat when taking great losses. So far it's either BIS vanilla solution of sending out random men which is one bad extreme and Igneous' "everyone stay where you are!" which is another. We need something in between which Igneous' suggestion is close to (sending out teams)

Share this post


Link to post
Share on other sites
check setcombatMode Yellow

that turns of engage at will for member units - IE, members will choose targets for themselves to attack without squadleader ordering them to do so (tho sometimes he will) by default groups have this setting already.

Share this post


Link to post
Share on other sites
by default groups have this setting already
Nop

by default they had CombatMode Red >> then group'

members will choose targets for themselves to attack without squadleader ordering them to do

just check

Share this post


Link to post
Share on other sites
Nop

by default they had CombatMode Red >> then group'

just check

checked with me as both a leader and a member unit, units do not say "engaging" by themselves (which lets you know they are attacking a unit), same thing when being a member, member units dont start to move out to attack until the squad leaders orders an attack order.

So unless "RED" means fire at will, and not: fire at will engage at will, then I would agree.

Share this post


Link to post
Share on other sites

I think there may be some improvements in the latest patches...

Things i have seen on Chernarus, infantry stay on the inside edge of forested areas just west of Novy Sobor and engaged at long distances from cover also the enemy firing back from within Novy Sobor and not in too much of a hurry to charge forward... or actually they didnt.

Share this post


Link to post
Share on other sites

Did some more tests and enableAttack false actually breaks AI more than it helps it.

Why?

Here's an example.

I put myself into AI controlled squad with enableAttack false

So what do they do upon contact? Nothing. They stop and get wiped out really quickly if defending enemy without enableAttack false sees them.

Why? Because the enemy commander can give out orders who to attack and where.

Marine commander however can't and thus soldiers will attack only those whom they personally see - making a whole squad have as much teamwork as present on a random public server.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×