Home

Sign In

Subscribe

Subscribe to the Cave of Distraction.


Jun 23
Tuesday
PC
Can the AI in ArmA2 see through grass?

Random screenshot - not from my test session
Random screenshot - not from my test session

ArmA2 is out in some areas, and if you are willing to buy from France or the like you too can be running around killing people in a lush countryside environment in no time. I got my copy last week and have been enjoying the hell out of it despite some of the bugs that are typical for these games. One thing I’ve been wondering about (and hearing some questions about) is whether or not the AI can see through grass. All seeing AI has been a contentious issue with some since Operation Flashpoint, so I decided to do a little test to see if I could get any answers.

Unfortunately I have no clue how big the map grid is in the game so I’ll just say I tested at less than one grid unit away (about hand grenade range), then two and finally three grid units away. For each test I placed one enemy squad in a level field of tall grass facing away from me, and myself as a lone rifleman behind them. On spawning in I would immediately go prone (down in the grass) and throw one grenade towards the enemy soldiers and wait for the result. (I was able to keep an eye on their movements by switching to third person view and raising the camera up a bit.) Results of these tests follow, with my interpretation as to what was going on along with each. Note that I say “my interpretation” because I am not prepared to say definitively what the motivates the tiny minds of these AI soldiers. I am merely explaining what appears to have happened in each particular case.

Test 1 (one grid unit away) : Threw grenade which went off amongst soldiers, killing several. The rest immediately began looking around when one spotted me and shot me dead within seconds. Second attempt, same result. On the third attempt I accidentally rolled after going prone, the AI apparently heard this then turned and shot me before I even threw the grenade.

Interpretation : Now given that from the third person view, the grass doesn’t quite go above my helmet (while it appears to in first person view) I can’t say for certain they can see through grass. I can say they spotted me from grenade distance easily and quickly, whether that is because of x-ray vision or my helmet peeking up into the line of sight is uncertain. The AI also has what I consider super-human hearing. If you are within grenade range and make any movement, they’ll kill you and steal your wallet.

Test 2 (two grid units away) : Threw grenade which went off about half way to the soldiers, who immediately reacted and began looking around etc. After about 30 seconds two soldiers went running off to my right apparently looking for me. At the same time two more soldiers came running in my direction. Shortly after that, one of them fired several rounds in my direction but not hitting me. They then continued to move around the area while getting closer, occasionally firing in roughly my direction. When the first one got to within grenade distance I was spotted and shot dead.

Interpretation : It appears that the AI could not see me right away through the grass from this distance, and it appears as if they sent a few soldiers out in different directions to find me. As the two who came my way got closer it seems as if they had a general idea of where I was and were reconning by fire. On getting as close as in test 1, they spotted me and killed me.

Test 3 (almost three grid units away) : Threw the grenade which landed well short of the soldiers, who were quite far out across the field. When it went off they all reacted and started moving about by going prone, scanning the horizon etc but none of them fired or spotted me. After awhile some soldiers were dispatched in different directions, including directly away from me. I watched this for awhile but it was clear they were not going to find me, so I fired off a single burst in their direction while remaining prone. Their reaction was to begin firing in my direction, none of it accurate but all in my general area. While that was going on two soldiers ran off towards my right flank. Once they got close to even with me they turned towards me and began moving closer and firing in my direction every now and then. As soon as they got within grenade range the spotted me and shot me dead.

Interpretation : This was very encouraging. It seems as if the AI had no clue where I was after the grenade went off, even sending some guys running in the other direction to look for me. Once I fired a burst they got a better idea of my location presumably from the sound and muzzle flash. They then started firing in my area what amounted to suppression fire. I can’t say this was actually intended as such, but it was inaccurate and would have had the effect of making me keep my head down. From there it appears as if the AI sent two soldiers to flank me, which they successfully did by going out to the left flank (their left), moving about abreast with me then to their right firing most of the time.

This batch of testing leads me to believe that the AI cannot omnipotently see through long grass at anything beyond grenade range. At grenade range and closer they will definitely see  you almost instantly. They’ll also hear you which is a bit annoying but if you’re farther out going prone in the grass does seem to have some benefit. Once again, the above information relates what happened to me during my tests, and the interpretations are just that… interpretations. YMMV.

EDIT: Further testing has been completed.


Post Tags: ,

11 Responses to “ Can the AI in ArmA2 see through grass? ”
  1. Very interesting experiment.

    I think it may speak to how the developers handle visibility testing for the AI. Given that the only practical test for AI visibility would be casting a ray to nearby targets, the issue becomes one not of whether the AI can see you, but whether how well the AI is trained to ignore you under certain circumstances to give the impression of imperfection. That the AI does not fire at animals appears to confirm this.

    If I had to wager, I’d suggest that when an AI unit is combat-aware, a ray cast to a target that is both in line-of-sight and within a certain range returns a true regardless of what intervening flora may be in the area (though trees are likely treated differently than tall grass). This would save a large number of intersection tests against grass objects (even if they’re numerically modeled as boxes). This is implied by your range tests. It also makes sense from a technical perspective.

    I guess one question to ask is whether simply being combat-aware is sufficient for the AI to locate you using this method or whether you need to have given some indication of your presence.

     

  2. Do the same on bare ground like desert or tarmac and you will get exactly the same results as in tall grass that would supposedly hide you completely.

    Grass blocking the LOS or surface type/color are not a part of the equation. Only your visibility value (camouflage value from soldier class * posture visibility) and detection capability of the enemy soldier (eyesight value of the soldier class * skill value of the soldier).

  3. That is an interesting point, I might just try that out. I was also thinking about what meeper said above, and maybe trying to set something up such that the enemy soldiers start far out and move closer while set to various combat awareness levels. Maybe “safe” the first time for instance, then have them walk towards me (prone in the grass or wherever) and see when they spot me.

  4. I wonder what the results would be like while wearing a ghillie suit.

  5. ah thanks that’s worth looking into also… is the ghillie suit actually effective?

  6. Well, one could say it’s not the suit model, but a config value. It’s possible to make a sniper unit wearing a bright pink bunnyrabbit costume, armed with a “shoot me”-sign yet have him invisible to the AI.

    ——— (AddOns\characters2.pbo\config.bin)
    class USMC_Soldier_Base: SoldierWB
    camouflage = 1.8;

    class USMC_SoldierS_Sniper:USMC_Soldier_Base
    camouflage = 0.5;
    ———

    Based on these values, a normal soldier would be over three times as visible as a sniper.

  7. Well yes, that’s a given but I’d like to ascertain how well the default values for the ghillie suit actually affect the AI’s ability to spot the player in a similar way to how I tested the grass above. I don’t necessarily care about specific config files and values, and how the game is programmed… what I care about is the end experience. As in the post up there for instance, I can’t say if the AI was actually flanking me or not. Nor can I say that they were using suppressing fire. What I can say is that the end result of their actions felt like they were, and that’s what’s important. The end experience, not so much all the 1’s an 0’s about how it got there.

    “Real world” testing of what the game does and does not do right now. That’s the ticket.

  8. arma 2 is the exact same tired game as arma gold, they just updated the graphics! still getting shot from 600 yards in cover from a shitty AK! the ai is so pathetic bumping around aimlessly yet they balance this by making them see through grass, shrubs trees and blow you away from half a mile with a 9mm handgun, this game need to be tweaked hard, shame on you bohemia!

  9. I get your frustration, and heartily recommend to you… any other game. ArmA2, just like all the versions before it really, really isn’t for everyone. It’s like liver, and Radiohead. You either like it a lot, or you don’t like it at all. Wanting to like it doesn’t count for much I’m afraid.

  10. There was a very similar problem with Crysis.  The machine gunners on the PT boats would nail ya dead accurate from 1km away every time, even if you were in some bushes and hadn’t exposed yourself at all since they been in the area.  I know ya’ll hate COD4 references, but their ghiellie suit system worked great.  The AI couldnt detect you for crap if you were laying prone in the grass, even if they came within a foot of you.  (see cod4 mission: “All Ghiellied Up”).  The game really loses its fun factor when AI can nail you with AK’s etc before u can even spot them with a sniper rifle.  You cant always stay prone and be able to detect targets, especially with the tall grass obstructing your vision.  As soon as you go to kneel/crouch or erect, you get sniped by a damn ak.   I read your newest report on the ai detection in grass but the system is still screwed up.  Automatically see us within a grid, WTF!?!  You cant even fire and change position which is the whole basis for a sniper team to remain alive.  Im looking forward to what changes are made to this game but i’m certainly not gonna invest in any more hardware untill they make it less annoying.

  11. The key to sniping in long grass is crawling maybe 4/5 yards ahead of where you plan on shooting from.
    This clears a space, to spot targets and fire, without needlessly exposing yourself to enemy fire.
    I’d also recommend taking a look at this addon which modifies the accuracy of the east weapons (AKS-47, AKM, AK74 etc), should help you against the AI.


Post a Comment



All content © 2009 caveofdistraction.com and its respective author | Site built and maintained by Finaldog Media