Jump to content
Sign in to follow this  
amrax

Anti AI cheat mode

Recommended Posts

Hey, I have to say I have the total opposite expierence of you. From 200M they are always shooting around me and missing ... although sometimes like you say they seem to have Godlike aiming ... there are a couple of threads relating to this and you have the argument that its realistic Vs AI Cheating so I'll let you discuss it there smile_o.gif

Oh and you can remove your white Crosshair in the difficulties settings near the bottom wink_o.gif

Share this post


Link to post
Share on other sites

You might want to look at your settings, Difficulty to be precise, before you start blattering around pistols.gif

Share this post


Link to post
Share on other sites

MODedit: erm another AI related thread > merge

Share this post


Link to post
Share on other sites

I've been messing around with the AI a lot lately, especially using the "knowsAbout" command. It seems that there is a major flaw in the way the AI behaves toward enemy units. As you know, there are a lot of posts on the bugtracker about various AI-related issues, and many of them seem to be related to this "flaw". The problems:

- The AI seems to have god-like knowledge of the player's position.

- AI does not do suppression fire.

- Many people feel the AI is too accurate.

My "research" ( wink_o.gif ) has shown that the AI behaviour towards enemies is quite simplified. For example: Once an AI soldier has spotted an enemy soldier, such as the player, he will always know where the enemy is, a least for a long time. Even if the enemy soldier moves behind cover - thus being invisible, the AI will still track it and open fire as soon as it becomes visible again. You can test this by peeking around the corner of a wall and getting an AI soldier's attention (shoot past it), then walking behind the wall. Even though the AI cannot "see" you, it will still track you as you move.

The AI information on it's target is too accurate. There is no "uncertainty". This is the cause for many known problems in ArmA, such as the AI's failure to provide suppression fire and it's almost god-like knowledge of an enemies position once it has been spotted.

Being a programmer myself, I have thought up a few ideas as to how I would correct this. I don't know if these would be viable for ArmA, but perhaps they could provide an inspiration for BIS:

AI uncertainty: Instead of this "god-like" knowledge about an enemies position, the AI should have a kind of abstract "knows about" object or area for the enemy position - I'll call it "knows-about-area" or "KAA". Depending on what the AI knows about the enemy, the KAA should become smaller or larger. When the AI actually spots the enemy soldier, the KAA should be reduced to zero and the position is centered on the enemy - but when the enemy moves out of sight (i.e. behind cover) the AI can no longer really know where the enemy is, so the KAA remains on the last known position and slowly becomes larger (area of uncertainty).

This is only a very basic concept of course, but I think it would allow us to do some other interesting things:

AI suppression fire: At the moment the AI will only fire at a target if is is directly visible. So, for instance, if you are hiding behind a rock, popping up every now and again to fire a few shots, the AI will always wait until you are visible before it shoots instead of suppressing you. Many people see this as unrealistic.

If the AI had our "area of uncertainty", it could decide to fire a few suppressing shots at this area when he has no direct line of sight, thus making the player feel more like he is "under fire". Also, the AI would no longer be constantly aiming directly at the player even when he is not visible - it would need to adjust its aim when the player pops up to shoot.

In my opinion this would create much greater immersion than we have at the moment, and it would also provide for more interesting fire fights, because A - the AI will try to suppress the player, and B - the AI is not always aiming directly at the player and will thus lose a lot of its "superhuman" reaction time and accuracy.

What do you guys think? Ideas, comments, suggestions and constructive criticism are welcome.

Share this post


Link to post
Share on other sites

Sounds like a great idea. I would definately download it if someone could get it to work. The only problem I see is how you would be able to tell when the player is behind cover, other than maybe putting multiple triggers around every single object in the game and doing a getdir or something of every AI that is tracking you, and if you are on the other side of the object, he loses his knowledge about you.

This of course, would be very laggy and possibly even impossible. Maybe there's another solution.

Share this post


Link to post
Share on other sites

Actually, from what I know about scripting in ArmA, it would not be possible to do with scripts - at least not with the scripting commands we have at the moment. It would have to be implemented in the game engine - i.e. by BI.

If we wanted to do it with scripting, we would at least need two new scripting commands:

canSee: returns whether a soldier can see another soldier.

setKnowsAbout: so we can actively control how much an AI soldier knows about another.

Possibly it could be implemented via FSMs, but I don't know much about the way AI is handled with the FSM files. I would much prefer if it could be implemented by BI in the game's code.

Share this post


Link to post
Share on other sites

The constant line-of-sight checks for every AI character in the game could get a bit cpu intensive if it's not being done already. Otherwise sounds like a good system.

Share this post


Link to post
Share on other sites
The constant line-of-sight checks for every AI character in the game could get a bit cpu intensive if it's not being done already.  Otherwise sounds like a good system.

The current system is already constantly checking the line of sight - otherwise the AI would always be shooting at the enemy, even when he is not visible.

Share this post


Link to post
Share on other sites

Excellent basis for improvement here.

Good ideas too smile_o.gif Definately worth investigating further by BIS.. It doesnt sound too complicated to take ur ideas on board. And i think with a bit of effort on BIS' half, it could be improved further with more features...

Share this post


Link to post
Share on other sites

Good post. You took the time to observe and understand Arma's a.i. behaviour and came up with interesting ideas for improving it.

But there are things that you didnt take into acount. The a.i. depends on this acurate knowsabout value not only to shoot but to engage the player, one a.i. detects you and transmits this information to the squad, the whole squad will then react to this:

Fire at you if possible and send 1 or 2 members after you.

If the knowsabout value fades too fast they wont be able to try and find you over some distance/time wich means they will be more static. The a.i. needs something solid to engage, atack and shoot.

Share this post


Link to post
Share on other sites
Good post. You took the time to observe and understand Arma's a.i. behaviour and came up with interesting ideas for improving it.

But there are things that you didnt take into acount. The a.i. depends on this acurate knowsabout value not only to shoot but to engage the player, one a.i. detects you and transmits this information to the squad, the whole squad will then react to this:

Fire at you if possible and send 1 or 2 members after you.

If the knowsabout value fades too fast they wont be able to try and find you over some distance/time wich means they will be more static. The a.i. needs something solid to engage, atack and shoot.

Some good points there, but it seems you slightly misunderstood my idea.

The AI would still have something to engage, attack and shoot - just that their target would get more "blurred", the longer they don't actually see it.

They would still flank, because they still know the general area where their target is - so they would be flanking/engaging/advancing on their target's last known position instead of the actual target. Which is logical when you think about it.

I mean, imagine you were a soldier in a firefight with another soldier. Take a look at this picture:

example1.jpg

He leans around a corner, fires a few shots at you and then ducks back... and you wait a few seconds. Your problem now is, that soldier could be anywhere in the pink area on the picture. He could move down behind the wall, pop back out of the same corner, flank you - the possibilities are endless.

The AI in ArmA on the other hand has some kind of magical knowledge on the whereabouts of this soldier. They still track him even though they can't see him. This is what I want to fix with my idea.

Share this post


Link to post
Share on other sites

Wow this is bad news and your absolutely right. I just tested in editor with one enemy behind wall, I took a shot at him and watched in commander mode as he tracked me perfectly while I shuffled (crouched) between left and right. God i hate magical Ai! One interesting thing i noticed is he lost his bead on me whenever i went prone?!? Stealth perhaps?

Edit- I could have sworn they had this fixed in OFP? Wasn't there a target box that would continue in the target 'probable direction?

Share this post


Link to post
Share on other sites
Wow this is bad news and your absolutely right. I just tested in editor with one enemy behind wall, I took a shot at him and watched in commander mode as he tracked me perfectly while I shuffled (crouched) between left and right. God i hate magical Ai! One interesting thing i noticed is he lost his bead on me whenever i went prone?!? Stealth perhaps?

Edit- I could have sworn they had this fixed in OFP? Wasn't there a target box that would continue in the target 'probable direction?

I don't really remember what the AI was like in OFP, because back then I didn't really give it much attention. Though I do remember that they didn't do suppressive fire back then either.

You're right about them "losing track" when you go prone by the way. That's another weird part of the simplified AI in ArmA - strange that an AI soldier can "see" you through a wall, but only while you are standing up.

Share this post


Link to post
Share on other sites

You are way ahead, you already got the a.i. to lean and use objects/buildings as cover heh =?

What you described seems simple on paper but could require a major rebuild of the a.i. code.

I like the whole aspect of the a.i. looking at or moving to an area where you were seen instead of following your exact movement thru ground, buildings, etc.

Share this post


Link to post
Share on other sites
You are way ahead, you already got the a.i. to lean and use objects/buildings as cover heh =?

What you described seems simple on paper but could  require a major rebuild of the a.i. code.

I like the whole aspect of the a.i. looking at or moving to an area where you were seen instead of following your exact movement thru ground, buildings, etc.

The thing with the leaning and using cover was just to illustrate my example, it isn't really valid for the topic. wink_o.gif

I'm not sure what it would take to implement my idea - we can't know that because we aren't BI employees. In any case, this is just a discussion about possible improvements to the AI. I'm not claiming it would be an easy task, and I assume it would require some major changes to the engine or the AI system.

My hope is that we will be able to refine my idea or perhaps come up with a better one, and then see if anyone from BI will comment on it.

Share this post


Link to post
Share on other sites

Another problem that needs to be fixed is having the AI detect shots instead of magically knowing who killed one of its group.

This is easy to see on night time special forces missions.

You can be 400m away with a suppressed weapon, under cover in the middle of the night. The AI won't react to missed shots (proving they can't detect the shot themselves), but he moment you hit one of the troops, the entire squad lights you up like a Christmas tree.

Share this post


Link to post
Share on other sites
I just tested in editor with one enemy behind wall, I took a shot at him and watched in commander mode as he tracked me perfectly while I shuffled (crouched) between left and right. God i hate magical Ai! One interesting thing i noticed is he lost his bead on me whenever i went prone?!? Stealth perhaps?

I used to think the AI were more-or-less okay, in fact an improvement to OFP, but when I hear simple and "scientific" anecdotes like this I begin to feel not so certain.

The fact that the AI could track you left and right is scary. crazy_o.gif I had just assumed they guesstimated your position based on your last movements (kinda like the floating "engage" yellow boxes you get when told to attack something that's just moved behind cover). And the prone "stealth mode" is interesting, prone should make you harder to find, but obviously not when you can't be seen anyway!

I wonder if the AI would track you so well at long range? Playing devil's advocate, I ask this because the only excuse I have for its behaviour is that maybe it can "hear" you. confused_o.gif

Matters of AI are always quite complex, and ArmA gets a lot right, I just think there's room for some simple improvements. One can never get the AI perfect. Like the original poster has said, I don't think scripting is the right way to improve the AI. Changes need to be made on a level deeper down than that.

On something of a side-note, I wonder how any AI change will affect missions (official and otherwise). I like to think of ArmA missions like chaotic systems. A butterfly flaps its wings in Japan and there's a hurricane in Florida. An AI soldier gets into his truck three seconds earlier and his whole squad gets wiped out by an enemy tank they'd otherwise miss. whistle.gif

Share this post


Link to post
Share on other sites

Personally I think AI is far more important in a game like this than 20km view distances or some missing textures. The draw of this sim is that, well, it's more "sim" than game relatively speaking in the genre, and while there are many other important aspects, I think AI is where this game/sim shines.

There is nothing that kills immersion more than "magical" AI and to be honest ArmA does a great job of it under the circumstances, especially considering the enormous amount of factors it has to take into account for environment and actors, not to mention evolving situations.

Without intimate knowledge of the inner workings it's hard to say whether BI is forced to compromise on features like this or other practical constraints but I'm sure they've considered it. My guess is that hardware is far behind the curve of what's possible programming wise here.

With that said, even knowing that ArmA already pushes the boundaries, I respectfully think BI should dedicate more priority to this aspect of AI, perhaps with the community's help if it's there.

Share this post


Link to post
Share on other sites

What computer game AI is currently missing are those human like differences and errors and fumbles that occur from time time. AI is either completely super human or ridigilously stupid or acting in a very strange ways which defy all logic.

It would also be nice to see platoon and company level organisations in the game rather than just leader/followers style approach that is now used. But I guess this is due to VBS/entertainment product thinking.

Share this post


Link to post
Share on other sites
My "research" ( wink_o.gif ) has shown that the AI behaviour towards enemies is quite simplified. For example: Once an AI soldier has spotted an enemy soldier, such as the player, he will always know where the enemy is, a least for a long time. Even if the enemy soldier moves behind cover - thus being invisible, the AI will still track it and open fire as soon as it becomes visible again. You can test this by peeking around the corner of a wall and getting an AI soldier's attention (shoot past it), then walking behind the wall. Even though the AI cannot "see" you, it will still track you as you move.

Sorry (and partially happy) to say that your research was wrong. It doesn't have any magical ability. It works just like in OFP.

Here's what i just tested (to see were you right or wrong) so this was done in testing conditions. No extra fuzz around There just enemy, me and my groupmember, which is far away from me so that it wont mess the test:

I rush behind corner, enemy detects me and i move back to cover. I keep going on about two meters and halt. What does AI? It doesn't know my position, as it turns it's gun at speed which bases on my speed just before contact was broken (so eventually AI's gun moves past my position as i've stopped and still gun keeps on turning). If i choose to peek around that same corner, i see that enemy is aiming to wrong direction (if it can't track me by hearing when i move to that corner). Just same that happens in OFP too.

Here's my explanation why people thinks that AI can track opponent magicaly:

People easily forget that ArmA's hearing values have been increased alot, when comparing to OFP (which AI was kinda deaf.). They might be too good, i don't know (or care).

EDIT: Oh you shot in your research (am i right?)... That different case then, as shooting produce effect which lasts some seconds, in that time soldier is more visible and audible. That's why it is wise to shoot single shots and keep couple seconds pauses, if wanting to stay hiden. Forexample suppressed weapons are useless if they are fired constantly. It simulates (i think it does) the fact that if hearing strange or dangerous voice from somewhere, human starts to keep eye on that place. I've noticed that when i hear shooting voice from somewhere, i start to scan that direction for muzzleflashes to reveal exact location of shooter (so i kinda focus/zoom my awareness). If i don't spot anything in a while, i start to scan my whole surrounding again . Hope you get my drift as i don't know did i write it in understandable english wink_o.gif

Share this post


Link to post
Share on other sites

Hi all

I think Second has hit the nail on the head with regard to the mythical X-Ray eyes of the AI. It is exactly the same behaviour I have seen with the AI.

If you are running when the AI tracks you into cover the AI then predicts/projects your path. It does this significantly better than other games AI does but not better than a human does.

It is just people are used to older games such GR BF and Unreal where the AI is just a target.

If you have the default recruit level, rather veteran mode on you can see the same info being given to you that the AI gets; by the yellow target square, if you have an AI commander. You can see the yellow target square predict speed and direction as the AI goes behind cover.

You can also see the target square jump back, if the AI breaks cover but has slowed for some reason behind said cover.

The question is do AI track for too long or too short or just right compared to human.

To test whether the AI is doing more than a human would in this prediction try the following half hour experiment:

1) In the editor. Set up two groups of AI one BLUEFOR one OPFOR on some undulating ground with some cover, or in a city with a guarded by trigger and some guard waypoints on each; you know the drill.

2) Make all units playable!

3) Play first off with target squares turned off

4) Play as a grunt

5) Stir up a group of AI

6) Pick a target but do not shoot it; instead time how long you can predict its path before you loose track also count how many times it is in cover.

7) Repeat this say five to ten times to get a degree of statistically significant data.

8) If more of us do it the results will be more useful.

9) If we do it in several environments the results will be more useful.

10) Now repeat the experiment with the AI tracking square on.

11) Post up in this thread how long and how many pieces of cover you as a human can track a single AI.

12) Post up in this thread how long and how many pieces of cover the AI tracking square can track a single AI.

On the matter of improving AI, quit yer whining, get off your lazy arses and fire up one of the FSM editors we now have and improve the AI.

The ability to change AI behaviour is the first new modding function BIS gave us and we have always had scripting Kronzky has already improved AI in urban areas with his Urban Patrol script.

This is not whiny BF, GR, Unreal land, this is the ArmA/OFP community the premier league in modding we are the Million Monkey's at a computer keyboard, we produce sonnets, we can do anything!

Kind Regards walker

Share this post


Link to post
Share on other sites

Well I have some good news. I re-tested the same scenario using Troopman+ between every single movement, but this time stayed 50 ft. away from the wall and enemy radar was not magical at all. So I think my first test, being right next to the wall, with AI directly behind it was him 'hearing' me afterall. This time, he even popped up out of prone to check my whereabouts and then dropped back down again after establishing my whereabouts.

Share this post


Link to post
Share on other sites

There was one situation that vilas detailed from very early in this merged thread that is not yet adequately explained:

Quote[/b] ]there is eye sensitivity and ear sensitivity whis is too big in ARMA

example:

i am sniper with SVD , deep forest on north, i am hiden after tree, near bush

i am on back of two US soldiers , they cannot see me

i shoot one, before SVD is ready to second shot (recoil, aiming) second man hit ground and shoot directly at me and kills me before i can aim him

for me this is nonsense !

I'm assuming that since vilas is using a sniper rifle in this scenario, he is engaging at at least 250 meters and probably closer to 350 meters. Personally, I'd attempt a shot from at least 425 meters if I can find an open line of sight. I assume that due to time constraints and/or the terrain that may not be possible in this mission.

rom_un replied:

Quote[/b] ]Sound -> direction, SVD smoke -> position. People was complain that Ofp's AI didn't react when you shoot them. I prefer the way Arma do. smile_o.gif

Actually, this isn't accurate for several reasons. I'm a country boy. I've been in the woods during hunting season since before I was old enough to carry a weapon. After more than 40 years of experience I can tell you that if I hear a shot behind me, I can't tell you exactly where it came from. If it's within 100 meters, I could probably turn and point within 30 degrees or so. No closer, though.

Second, modern small arms generate very little smoke which dissipates extremely fast. You certainly can't see the very small, thin cloud generated by a shot fired from a couple hundred meters or more away unless conditions are perfect. Even then, you'd have to be using really bad ammo. What sniper willingly does that?

Third, we're talking about a concealed sniper firing. It's tough enough spotting a guy through the trees when he's walking around in blaze orange. I can tell you from personal experience that spotting someone who's trying to hide at any sort of distance is extremely difficult unless that person makes a gross movement like wave to attract my attention. That's especially true when that person is dressed head to foot in camo.

Turning around quickly to spot someone more than a couple hundred meters away with the only obvious movement being the rifle recoil (which will complete long before I face his direction)? Not going to happen unless the guy makes some REALLY big mistakes.

vilas replied to rom_un:

Quote[/b] ]if man shoots you coleague from 250 meters i guaratee - you won't see him

rom_un followed up with:

Quote[/b] ]with the muzzle flash ,the smoke and the dust in prone position, i'm not so sure as you.

So, now rom_un added dust from firing in a prone position. Now, I'm not personally familiar with the SVD so I don't know how much dust it generates when fired. I do know that virtually all small arms (rifles and pistols, not MGs, anti-tank weapons, etc.) in the current U.S. arsenal generate little to no dust when fired from a prone position.

The single exception might be the Barrett. Even that has paired muzzle brakes that point back and horizontal, not down. The point of that design is to minimize the dust stirred up when the rifle is fired. My assumption is that modern Russian style small arms are also designed to minimize the dust when fired from a prone position.

On top of which, rom_un ignored the fact that vilas said he picked a firing position from within a forested site. I'll bet money that given vilas's real life experience that the position was in shade, not in a sunny patch. So, let's put this all together:

vilas fired one round and killed one AI. The second AI whipped around. He then spotted a small puff of dust and/or nearly non-existent smoke through trees, bushes, and shadows that was more than 200 meters away. He then saw vilas behind it. Finally, the AI accurately shot on target either over open sights or through an aimpoint before vilas's sniper rifle had a chance to recover from recoil so vilas could acquire his target for the second shot.

I defy anyone, no matter how good a soldier you are, to duplicate that feat just after your buddy who was standing next to you is killed. I defy anyone, no matter how good a soldier you are, to manage that feat under simulated conditions with no fear of a second shot aimed at you. It just will not happen.

Nope, the AI's situational awareness really is too good sometimes. I like the idea of a sort of "cone of uncertainty" based upon how much information the AI has about a particular opponent. I'd imagine that it would be pretty tough to code. However, situations like the one detailed above clearly indicate that we do need something better than what we currently have.

Share this post


Link to post
Share on other sites
Nope, the AI's situational awareness really is too good sometimes.  I like the idea of a sort of "cone of uncertainty" based upon how much information the AI has about a particular opponent.  I'd imagine that it would be pretty tough to code.  However, situations like the one detailed above clearly indicate that we do need something better than what we currently have.

I wanted to share my opinions about the AI in this thread but i'm sick and tired of writing the same shit over and over again.

The above quote pretty much sums it up for me.

I havn't played ArmA since i witnesed an AI opfor run straight through a wall and shoot me. How can i compete against that kind of shit confused_o.gif .

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  

×