Jump to content
Sign in to follow this  
fabrizio_t

Please fix the AI

Recommended Posts

The AI in games like CoD seems to act more realistic because they seem to be afraid of bullets, even when that AI is completely incapable of doing anything beyond firing back, it still LOOKS like they are acting realistically.

That is very true. Looking realistic is as important. I think that overall the ArmA AI is more tactical and interesting than any other FPS so far. If only they could use cover better, take better firing positions and look more realistic, we might have as good an AI as is possible in 2007. It should be difficult to kill even one single trained soldier at the highest difficulty level because they would be trying to save themselves at all costs.

Share this post


Link to post
Share on other sites

What i always wished for OFP AI in urban combats would be to have each buildings, vehicles or objects to feature several "cover" proxy/vertices/whatever points to help the AI to select "cover" position.

Then an AI built-in routine , only when the AI is under fire (AI behaviour usually goes into "COMBAT" when they detect fire or enemy) to not have the check every time to save performance, making a code check on the nearby cover points to select the cover points that are :

-seen only by the allied AI not by the enemy units.

-not occupied by another object , unit or building.

Once this check done on nearby covers , run to the nearest "acceptable" cover according to the previous "check" .

Workarounds on such ideas were possible with some mission making design and scripts, but a lot less efficient than if it was integrated in the engine code by default, as not everyone can script such things for their own mission editor skirmishes in urban environment.

Share this post


Link to post
Share on other sites
Quote[/b] ]Then an AI built-in routine , only when the AI is under fire (AI behaviour usually goes into "COMBAT" when they detect fire or enemy) to not have the check every time to save performance, making a code check on the nearby cover points to select the cover points that are :

-seen only by the allied AI not by the enemy units.

-not occupied by another object , unit or building.

Function  nearObjects, nearestObject and similar in AA can be used to find cover. Practically you do not have to iterate on all the objects on the map to find cover, you just can check into a certain radius. Problem is these commands ignore any editor created objects, and cover for these should be "manually" coded. I think that making units look for cover won't be a major problem (except for some CPU load issues).  

Real problem is getting fully working spotting abilities, better engaging behaviour, suppression fire implementation, movement and fire squad coordination, and as somebody already mentioned: unit "self preservation" behaviour.

In one word, "tactics" are what i'd like to see implementede in AA.

Share this post


Link to post
Share on other sites
What i always wished for OFP AI in urban combats would be to have each buildings, vehicles or objects to feature several "cover" proxy/vertices/whatever points to help the AI to select "cover" position.

Then an AI built-in routine , only when the AI is under fire (AI behaviour usually goes into "COMBAT" when they detect fire or enemy) to not have the check every time to save performance, making a code check on the nearby cover points to select the cover points that are :

-seen only by the allied AI not by the enemy units.

-not occupied by another object , unit or building.

Once this check done on nearby covers , run to the nearest "acceptable" cover according to the previous "check" .

Workarounds on such ideas were possible with some mission making design and scripts, but a lot less efficient than if it was integrated in the engine code by default, as not everyone can script such things for their own mission editor skirmishes in urban environment.

Best post i've read in days smile_o.gif .

But sounds extremely hard to acomplish... i mean taking cover is one thing, shooting behind cover is another. To achieve this it should require not only aditional complex a.i. behaviour improvements but changing the game world (buildings, objects and vehicles) too i guess.

And we must consider the diferent environments types (urban, small village, forest, open fields). It would complicate things alot and i guess BIS wanted to achieve not only better but more with less of a performance impact. (Larger, more detailed world and more units per mission).

I'll be happy if they fix the unrealistic detection bugs (satchel charge, silenced weapons) and pathfinding (driving). I can live with the rest smile_o.gif .

edit:

Real problem is getting fully working spotting abilities, better engaging behaviour, suppression fire implementation, movement and fire squad coordination, and as somebody already mentioned: unit "self preservation" behaviour.

Supression shouldnt be hard if the "take cover" comand was improved further, the a.i. can react to casualties (retreat). If the a.i. could/can be modified their standard behaviour could be changed/edited confused_o.gif .

Under fire =>> all, take cover.

Something like this was supposed to work in OPF but using concealment instead (bushes), in the CWC islands bushes would conceal you position quite well.

Share this post


Link to post
Share on other sites
Quote[/b] ]But sounds extremely hard to acomplish... i mean taking cover is one thing, shooting behind cover is another.

Can't agree more. I've already implemented a rudimental "seek cover" script.

Problem is have units "peek" around cover and fire (and even a bigger one is having team leader coordinating unit suppressing and units advancing: this is tactics!wink_o.gif.

Peeking fro suppression fire requires at least, in my opinion, providing basic geometrical and environmental information about object the unit is hiding behind: informations such as width, length, height, nearby objects blocking eventually movements. Also "consistency" should be specified so units will prefer stronger object to weak one for cover.

If we can do so units will have the choice of peeking left, right or shooting above cover.

I am currentrly working on that.

For sure all this work will be useless till some basic issues keep screwing AI behaviour (first problem is LOS bug, but there's more).

Share this post


Link to post
Share on other sites
Quote[/b] ]Under fire =>> all, take cover.

Hmm ... can't agree on that. Consider that an "under fire" event does not exist in AA to may knowledge.

The best we can afford as trigger for cover is to know whether or not enemy units are in sight (heice i am so insisting on the LOS bug is a major issue).

Even considering that we can't simplify the behaviour to

enemy detected (and close) => all, take cover

The behavour should involve more complex considerations: what's the known enemy formation consistence ? Are they behind cover ? What is the distance ? ... This tactical data should be compared with the same data on the friendly side.

That's what a leader would do. Otherwise hardly any leader would be required in war ...

Things made short with an example: 1 single enemy unit shooting from long range and located into an exposed place should not make run for cover a whole 12 men unit. Better to suppress, flank, engage in that case.

That's just an example in a million though.

Quote[/b] ]Supression shouldnt be hard if the "take cover" comand was improved further, the a.i. can react to casualties (retreat). If the a.i. could/can be modified their standard behaviour could be changed/edited  

Unless we will code both the 2 behaviours "do suppression fire" and "under suppression fire" things won't work as expected i suppose.

Since enemy units won't "know" they are eventually being "suppressed" the will behave normally, and keep shooting . They will eventually retire after taking casualties, but the whole tactical point of "use suppression fire to allow and support flanking/advancing"  is missed.

Hopefully we will be able to override units standard behaviour through FSM files. Let's wait for some documentation ... confused_o.gif

Share this post


Link to post
Share on other sites
That is fine in the editor, try that on a dedicated server and the AI will just go prone or run around in circles. Ai are totaly stupid on dedicated servers.

So it wasn't my imagination then!

@december: Do you have more info to share or maybe pointer to other related topics about lame AI on dedicated server?

@5cent_at_NY: I understand what you are saying and you have some valid points about CQB interaction. Agree that things could be improved there.

I reacted to you comment about Delta Force since me and a few friends still laugh at that co-op experince from time to time. Delta Force was great in many ways and a forerunner in some but IMO not in AI  smile_o.gif

/KC

Share this post


Link to post
Share on other sites
Quote[/b] ]Under fire =>> all, take cover.

Hmm ... can't agree on that. Consider that an "under fire" event does not exist in AA to may knowledge.

Should be there, the a.i. in OPF will shout "under fire" when being shot at, i believe its used when they are being atacked but dont know from where or by who yet. This usually sets them in "combat" behaviour.

Like the a.i. will adopt "combat" behaviour when they detect a threat or are being atacked by a yet to be revealed enemy.

Share this post


Link to post
Share on other sites
Even considering that we can't simplify the behaviour to

enemy detected (and close) => all, take cover

Basicly something like

Under fire + General knowlegde of enemy position + proper cover within reasonable range + no reason to attack + no reason to move (retreat/...)

Which isnt really something thats easy to make. But lets say we can detect all those condition, and we get the unit to take cover, then what? How do we let him return fire? When he stands up he is easy to shoot anyway so he can only get up when covered properly, and when he is in cover he can be easely flushed out with a grenade (even the AI does this), should that be taken into consideration aswel? And the ability to shoot trough some types of cover?

Its quite hard to do in a game like ArmA, in other games everything is set up in a linear way

*Player enters here* ->      [cover]    ->    *AI's*   -> [player objective]

But in ArmA the player, AI and cover can be anywhere, because the player has freedom, the cover can be in the .wrp, placed by the mission editor or be moveable (vehicles) or can be destroyed, and the AI moves alot more then in most other games (random patrol scripts/waypoints, guard/dismissed/S&D waypoints, grouplink/DAC like scripts).

Share this post


Link to post
Share on other sites

even if someone would add lots of complicated scripts and etc. I don't see how all this advanced suppresive fire, cover and flanking and anything would ever work when the AI still has such basic problems like not seeing each other properly and pathfinding doesn't work properly in cities half of the time.

order them to move 5-10 meters and they may decide to take the worst longest route through unknown area without any caution... they may even go through buildings and there are some areas where they just won't go at all

Share this post


Link to post
Share on other sites
Quote[/b] ] But lets say we can detect all those condition, and we get the unit to take cover, then what? How do we let him return fire? When he stands up he is easy to shoot anyway so he can only get up when covered properly, and when he is in cover he can be easely flushed out with a grenade (even the AI does this), should that be taken into consideration aswel? And the ability to shoot trough some types of cover?

To me - when distance permits that - units should engage enemy with grenades as well, not run for cover. Seeking cover at point blank range /  grenade range  is really not a good idea to me.

Units should not return fire individually, part of the squad should peek from cover and fire at once in order to suppress the enemy (and thus showing the enemy multiple targets at once to avoid fire concentration) while another part of the team flanks and/or advances to further engage. All that provided that suppression fire can be correctly implemented.

Fire + movement, cover is only a collateral measure.

Share this post


Link to post
Share on other sites

There is something for cover in ArmA, try using the findCover function, there is definitely result (second position argument can be put to [0,0,0] for it to work), ArmA seems to consider bushes, trees, walls, houses (even interiors) as cover.

Share this post


Link to post
Share on other sites
Quote[/b] ]Under fire =>> all, take cover.

Hmm ... can't agree on that. Consider that an "under fire" event does not exist in AA to may knowledge.

The best we can afford as trigger for cover is to know whether or not enemy units are in sight (heice i am so insisting on the LOS bug is a major issue).

AIs need to react to both "bullets being shot at them" as well as "sighting enemies". I think you would agree that reacting to just "sighting enemies" is not enough. smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]even if someone would add lots of complicated scripts and etc. I don't see how all this advanced suppresive fire, cover and flanking and anything would ever work when AI still has such basic problems like not seeing each other properly and pathfinding doesn't work properly in cities half of the time.

Right indeed.

Just speculating here  sad_o.gif

Quote[/b] ]AIs need to react to both "bullets being shot at them" as well as "sighting enemies". I think you would agree that reacting to just "sighting enemies" is not enough.  

Of course i'd agree.

My point is i haven't found trace of any function or event handler to check whether a unit is under fire (unless hit) .

That would make obviously things a lot easier. sad_o.gif

EDIT: really, the only idea i have in order to check if a certain friendly unit is "potentially" under fire is looping through enemies and check if our unit is an "assignedTarget" for any of them.

Pretty cumbersome and resource hogging. And that does not even check if any enemy is actively firing upon our unit ... nor it covers any eventual "engage at will" behaviour of enemies.

Share this post


Link to post
Share on other sites
Peeking fro suppression fire requires at least, in my opinion, providing basic geometrical and environmental information about object the unit is hiding behind: informations such as width, length, height, nearby objects blocking eventually movements.

All solid objects have view/fire geometry LODs. They can be used to calculate if there will be any enemy units within LOS if AI soldier crouches or stands up behind the cover. If not, then AI probably stands against the wall and in this case, it should probably move left or right and try to lean around the corners until they can see enemy when leaning. Simple enough and no new information is needed. Can't be done with scripting, but BIS could surely implement this into engine.

Share this post


Link to post
Share on other sites

Remember that this thread so for fixing the AI. I think its important to sort out patching the Ai so it sees properly as one issue. Rolling out a rubust cover/suppressive fire and fired upon routines is a seperate issue.

If the basic AI building blocks are there such as reasonable behavior with no major glitches then user scripts can take the baton and develop a sleek modular script or addon that will tweak in all kinds of AI "enhancements".

If BIS fixes any basic glitches as with latinmans "sight bug" and the AI is acting as reasonable and predictable as possible then thier part is done. I know some here wont agree but that is what I think is reasonable in fair in the grand scheme of things. We are given the tools we need to do the rest. The user has the ability to build AI enhancements and share it with a community. So everyone should remember just how much power the program has to "fix" itself though this user modification.

Also the "problem" of cover is in two parts.

1 Group is under fire and finds cover

2 Group reacts properly from there

Once we can get the AI to hide behind cover properly then we can focus on what they should do from there. Separating the problem will make it easier to solve.

About fired upon event handler?

Since hit means fired upon is true

and killed means fired upon is true

and detected by can tell if enemy is present so if your not fired upon yet you will be soon...

this seems to create a decent model for starting a cover routine without knowing if a bullet buzzed by. I would think the Ai sound detections would trigger a detected by condition that could be used to start the event of "cover.sqs" for that group. Any system that has to scan all objects as some kind of daemon to work and weve allready lost, just to much resources taken up to be worth it. sad_o.gif

Dynamically speaking, we need something that is local and efficient and can run on any unit at any time and be able to operate with maximum flexibility. The cover/suppress routines should be enabled in reaction to a set of clear crisp conditions that are caused by these event handlers and probably a couple of triggers for detected by.

Im looking forward to see what user made solutions come about.

Share this post


Link to post
Share on other sites

I dont think theres anything to 'fix' as such in ArmA... there dont seem to be 'bugs' with the AI code... its more that they could do with improvement in some areas wink_o.gif

I like the way AI now frag much smarter... ive found myself several times outsmarted by AIs... If i take cover in a certain spot for too long.. i might get frag naded by an AI, thats cool =) (despite having to wait for my respawn hehe)

AI flanking is better, they navigate better when the group leader is AI...

Suggested improvements:

-AI Respond better to a player leader (they often drop behind.. seem unable to sprint, they change their pace too often)

-Take cover when under fire (If these were real people, they would probably value their lives more than taking out the enemy and dying themself)

-Different 'personalities'? (not sure if this is already implemented.. doesnt seem apparent though) By which i mean... some AIs are more aggressive than others, others will flee when the going gets tough, etc...

-AIs need to be able to shoot from cover *duck -> shoot -> duck again -> crawl to new position -> shoot etc*

Just my input smile_o.gif

Share this post


Link to post
Share on other sites
-AIs need to be able to shoot from cover *duck -> shoot -> duck again -> crawl to new position -> shoot etc*

After another few disasterous attempts in the demo 8 man coop, myself as the leader and the other 7 AI controlled i have come to the conclusion that the main AI problems/bugs are LOS and inability to move into a safe zone away from enemy fire.  The LOS issue has been mentioned umteen times already and i'm getting pretty fed up being shot from around 200 metres by a prone soldier with an AK while i'm in grass and atleast 20 metres behind the tree line.

Cover means nothing in this version of ArmA. I was killed by a grenade while i was behind a high wall, just because the grenade landed close by on the opposite side.  I was also spotted by a BRDM which was 150 metres away who came looking for me, i hid in a sandbag barricade which he could not see me enter, but when he came within 30 metres he immediatly knew where i was and put 2 rounds in my face.

The above quote imho has to be what nags me the most about ArmA AI. There just too dumb to get out of danger. I had my squad on danger and keep low but to my utter amazment i noticed 1 of my squad was standing up in the safe mode with weapon down....This was while we were under fire and had already lost 3 men. I'm finding i have to micro-manage my squad at times, when i should be firing off some rounds. This makes my weapon innefective as i can't use it and manage my squad in intense situations.  The majority of my deaths are when i'm giving orders, and sometimes there because my AI squad is doing something bloody stupid.

To be fair i'm not the best when it comes to issuing orders on the fly with ArmA controls, but games like brothers in arms was a piece of cake compared to Arma.

I'm only having a moan because i expected an inprovement over flashpoint AI, but i'm left with a feeling these AI moments are never going to be fixed.

In my defence i can't be total crap when it comes to issueing orders as i have completed the original 3 campaigns. wink_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]AIs need to react to both "bullets being shot at them" as well as "sighting enemies". I think you would agree that reacting to just "sighting enemies" is not enough.  

Of course i'd agree.

My point is i haven't found trace of any function or event handler to check whether a unit is under fire (unless hit) .

That would make obviously things a lot easier. sad_o.gif

EDIT: really, the only idea i have in order to check if a certain friendly unit is "potentially" under fire is looping through enemies and check if our unit is an "assignedTarget" for any of them.

Pretty cumbersome and resource hogging. And that does not even check if any enemy is actively firing upon our unit ... nor it covers any eventual "engage at will" behaviour of enemies.

As somebody has mentioned, the trigger for knowing whether 'an AI unit is under fire' could be any gun-shot sounds. Ofcourse it could be friendlies firing or somebody else being shot at but even then it would be a realistic trigger because that is what we ourselves react to. Very often we don't know who is shooting but any gun-shot sounds are heard and we become cautious and scan for targets or move near cover or hit the deck etc.

Share this post


Link to post
Share on other sites

They already know that something's 'wrong' because they hit the dirt after you shoot. No matter blufor or opfor. So all you have to do is to change the "hit the dirt" reaction into "find cover, etc." Sometimes, however they're not reacting at all.

You engage AI and the other group 100m away isn't reacting at all.

Would be cool if they just find cover after being shoot at, then wait a while, gather info from the sorroundings, then move to another cover, again wait etc. They're rushing too much, trying to face enemies too quickly. Even if It's a matter of waypoints, they should ignore "move to" waypoints for a while and fight.

Share this post


Link to post
Share on other sites

A small general word of comment.

I've been playing ofp since it came out.

Same for Arma.

Sure ai could be better in Arma, but have u considered the consequenses?

-Have you tried some good multiplayers coop-missions in veteran mode? How many times do you see them finished?

(I really love to see people moan about the current state of ai in Arma and yet I see most multiplayer missions ending by the entire team getting slaughtered)

(I know what you're thinking: 'you must really suck at it', actually i don't, i'm usually last man standing with plenty of kills)

-Have you considered what this would mean for general gameplay?

I'm not saying the ai couldn't be optimized, i'm just saying it's easy to complain about arma ai, but show me 1 game of same scale with this kind of flexible ai (considering ai takes into account ammo, health, retreats, regroups, use of vehicles etc).

Go look for that game, I have for a long time, it doesn't exist.

Arma is the ONLY competitor on the market in this warsim fps segment.

Anyway, i'm sure it will get better once all kinds of modders hack into it, and BIS throws some more patches at us.

Have a nice day.

Share this post


Link to post
Share on other sites

@Yoma: that the game would become more difficult because of better AI and that the game has other features that make it good are not valid arguments to me. One of the major things the fanbase was asking for for ArmA was better AI, and BIS has not delivered that. There are numerous examples of games that have AI that actually seeks cover out there. Band of brothers, GRAW, and Company of heroes for example. It might be difficult but it's not impossible.

That said, there are ways you can make the AI better by scripting. I have done it in OFP. Through the scripts I created the AI was way more cautious; it would go to a 'stealth', 'limited unit speed' when enemies were detected and it would also stop occasionally to scan the area for targets. I also had them entering buildings when enemies were detected and the AI would not send lone soldiers out to engage a detected enemy. It was not perfect but it worked like a charm, I wouldn't go back to standard OFP behaviour ever.

Adding to that were addons made by various people that somehow enhanced the LOS of the soldiers. FFUR has this I believe.

Share this post


Link to post
Share on other sites
Yeah, I know that those are just words, but well, why the hell an AI technology that's being advertised as "the most realistic blah blah" can not be fixed to meet the expectations of It's users. I had known that It will have to be moddet to be realistic before I even bought the game, but I didn't expect It to be as...ofpish as It is.

That's what i wanted to say in my first post here. im not tryin to moan, just wanna play "most realistic" combat simulator. Unfortunately, guys like me is really few in here. Most ppl in this community doesn't like idea such as mentioned in this thread. They just have fun with current ArmA and it's AI, that's great. i definitely got no objection, and i don't wanna make any offensive to them.

What annoying me is as what he said. Well, as someone said, still there's no any other game that let player so many things like ArmA. Maybe that's good enough for those who have no complaint about ArmA's AI. But I don' wanna stuck here. i mean, I want keep mention that need of realism and tactical game play to BIS until they realize it, or unless they stop advertise game like this as "realistic combat simulator". Why? Because as i said before, this company is my last hope.

@KeyCat

Glad to hear that=)

And it's good that you and your friends still having fun with DF. Im still playing DFBHD & GR's singleplayer sometime. it's dated, but pretty good though, as OFP.

have fun!

Share this post


Link to post
Share on other sites
-AIs need to be able to shoot from cover *duck -> shoot -> duck again -> crawl to new position -> shoot etc*

After another few disasterous attempts in the demo 8 man coop, myself as the leader and the other 7 AI controlled i have come to the conclusion that the main AI problems/bugs are LOS and inability to move into a safe zone away from enemy fire.  The LOS issue has been mentioned umteen times already and i'm getting pretty fed up being shot from around 200 metres by a prone soldier with an AK while i'm in grass and atleast 20 metres behind the tree line.

Cover means nothing in this version of ArmA. I was killed by a grenade while i was behind a high wall, just because the grenade landed close by on the opposite side.  I was also spotted by a BRDM which was 150 metres away who came looking for me, i hid in a sandbag barricade which he could not see me enter, but when he came within 30 metres he immediatly knew where i was and put 2 rounds in my face.

The above quote imho has to be what nags me the most about ArmA AI. There just too dumb to get out of danger. I had my squad on danger and keep low but to my utter amazment i noticed 1 of my squad was standing up in the safe mode with weapon down....This was while we were under fire and had already lost 3 men. I'm finding i have to micro-manage my squad at times, when i should be firing off some rounds. This makes my weapon innefective as i can't use it and manage my squad in intense situations.  The majority of my deaths are when i'm giving orders, and sometimes there because my AI squad is doing something bloody stupid.

To be fair i'm not the best when it comes to issuing orders on the fly with ArmA controls, but games like brothers in arms was a piece of cake compared to Arma.

I'm only having a moan because i expected an inprovement over flashpoint AI, but i'm left with a feeling these AI moments are never going to be fixed.

In my defence i can't be total crap when it comes to issueing orders as i have completed the original 3 campaigns. wink_o.gif

This post could've been written by me (only not as well).

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  

×