Jump to content
Sign in to follow this  
Dreepa

Does AI ignore grass?

Recommended Posts

Hey,

anyone knows how AI and grass interact? When I approach them,

I can barely see them due to all that high grass in my view,

but they shoot me with pinpoint accuracy. It seems like they dont care much for that matter...

Share this post


Link to post
Share on other sites

Although they sometimes detect you through the grass and shoot you, you are generally less visible to AI in grassy areas. Of course the AI doesn't see the invidual grass blades like you do so it's not 100% fair and accurate.

Share this post


Link to post
Share on other sites

Hi Dreepa

AI cannot see period!

No AI in any game can see at all.

Visual recognition is one of the most complex areas of current research in computers, but it is not at the capability levels where recognition is any where near the pattern recognition humans or animals can achieve.

As in all games in ArmA there is an algorithm that deals with the AI's ability to spot other entities and yes it has a grass element in it.

This has been discussed in this forum before

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

Kind Regards walker

Edited by walker

Share this post


Link to post
Share on other sites

I´ve done a few tests a while ago to see how well the AI can spot you while being prone. I´ve used the Force Recon teamleader, and a default squad of russian soldiers, letting them walk past me at settings "safe" "column" "slow". They only noticed me when they got within 20 meters or so, or if I moved (then they will notice you within about 50 - 80 meters).

As Walker stated, they don´t "see" per se, but instead use an algorythm that can distinguish between ground types (tall grass, road surfaces, empty ground), and I think it also includes a camouflage value included in the character pbo, as well as their own skill level.

Rule of thumb: don´t move, especially not when somebody is looking in your direction. Also take into account that the AI can hear you.

If an AI is looking the other way, you can crawl literally right up to their heels, even in daylight.

Cheers

Insta

Share this post


Link to post
Share on other sites
Hi Dreepa

AI cannot see period!

No AI in any game can see at all.

Visual recognition is one of the most complex areas of current research in computers, but it is not at the capability levels where recognition is any where near the pattern recognition humans or animals can achieve.

As in all games in ArmA there is an algorithm that deals with the AI's ability to spot other entities and yes it has a grass element in it.

This has been discussed in this forum before

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

Kind Regards walker

You know what he meant, quit acting like a smartass.

Share this post


Link to post
Share on other sites
You know what he meant, quit acting like a smartass.

In detail:

What Marek BIS CEO has to say on the subject is here;

As a matter of fact and unlike popular belief, the AI is affected by grass in Arma 2. There is approximation for clutter surrounding every unit affecting how well the AI can see it.

As always, there is a room for improvements in fidelity, so feel free to complain (but probably with better words, can you?)

That "lame" layer as present in Arma 1 was not very compatible with new rendering system and we are trying to come up with a better and more accurate solution but that of course is only visual effect important for human players, AI is unfair and doesn't use image recognition from the real rendering of game world :p

same thread I linked above to 2nd Page

What I said on the subject.

Hi novafluxx

Sorry but IMHO that is cheating.

You are only improving the players ability to see while the AI is stuck with the affects of the grass clutter algorithm.

At 350m in long grass with a suppressed automatic rifle vanilla ArmA II will allow you to kill a 5 man AI squad without them spotting you at all. I have tested this they cannot spot you unless you do additional things such as standing up or moving a lot so as you bust your concealment. When using a non suppressed weapon the AI will localise and spot you fairly quickly. Once spotted they take between 1 to 6 rounds to hit you, this is comparable to what I would take.

300m and under I tend to hit the target first round certainly by the third. I would think the AI overly simplified ego shooter AI if it could not do the same. At 350m I take just under a mag to take out 5 AI.

A non suppressed weapon and the AI will localise the sound and see the puff of smoke fairly quickly as would a human player. Test it your self.

Once again and as Marek pointed out:

THE AI DOES NOT SEE ANYTHING IN ANY GAME!

For the AI Grass clutter is a statistical factor this is true in all games not just BIS's.

Ray tracing eye to object for each AI in waving grass with the entity count in ArmA II would just be too costly in terms of CPU, that said offloading it to the GPU may prove profitable. While I think single ray-trace from object to spotter happens, just because you can register a pixel of a target in grass does not mean you would recognise it!

So one must use a statistical model.

Until we have decent real object heuristic recognition algorithms in games the AI does not recognise anything. Instead the game state knows all the time where all targets are, and applies a statistical probability to whether and how much a particular AI knows about the subject.

I think distance, surface that the target is on, previous experience of the subject, camouflage, object and subject type and capability, speed of movement, stance and noise produced, all play their part in that statistical calculation; incidentally firing a loud gun with smoke coming out of the end makes even a single pixel obviously a target.

Maybe number of pixels ray-traced after a probability threshold is reached also plays its part but the AI does not see anything, to do that the human brain sorts complex factors from information given by the human eye in a neural area devoted to pattern recognition that has developed by evolution for over five hundred of millions of years back in the Cambrian age or may be even the Precambrian era; as well as a personal lifetime of experience to the problem of recognising a subject. This is not what any game does; ArmA like every other game applies some kind of probability formulae that approximates human ability.

I am sure BIS are trying to match human capability to spot to their algorithm but short of sticking human eyes and a human brain inside every computer it will always be an approximation.

I am not saying such debates should not take place like Marek and Suma I hope that one post in such a thread can come to some new insight that improves our understanding of what is after all one of the most researched and studied subjects in computer software.

I am just going over the basics of the debate that has been discussed many times, so we do not repeat ourselves for the umpteenth time.

Interestingly ArmA is an ideal tool with which to test and experiment in this subject area, anyone one know of any grants going? As I am interested in money for research.

Kind Regards walker

The AI does not see. There is an algorithm which decides when an AI has a Chance of spoting an entity, it is a statistical model; among the factors affecting an AI's chances of it spotting an entity, is how deep is the grass the entity it is spotting is in.

Please be aware that if you are in long grass laid down, it is easier for your oponent to see you if they are stood up. What people fail to take acount of is the rest of their body may be not covered by the grass. This can easily be classic case of peekaboo behind the blankie; where the players face is covered by the grass, but their own body flatens the grass under them alowing the enemy to see their back side and legs.

Also as in reality what often gives you away is firing; with a non supressed weapon the sound and flash all give away position and even "smokeless" ammunition releases smoke from the oil in the gun barrel and even the metal burning as the round whizzes down.

When spotting incoming fire I am listening for sound and looking for flash and smoke in that direction.

Kind Regards walker

Edited by walker

Share this post


Link to post
Share on other sites
You know what he meant, quit acting like a smartass.

and FYI - many a slap on the wrist has been handed out by the mods for creating an identical thread instead of using the search feature.

Share this post


Link to post
Share on other sites

Mostly it's that "AI have a harder time detecting you through grass, but they can still detect you through grass". Everything else is of a minor effect.

Similar things can be said about smoke, too. If they hadn't seen you before, then smoke completely blinds them, but once you fire a shot, they will see you AND track you good enough to shoot directly at your position even if you move 10 meters away. With Zeus AI I've actually been shot by a DShKM from ~800m through a huge wall of smoke because the AI probably saw me before the smoke screen went up (going to them only after the smoke screen is up allowed me to advance all the way through undetected).

So AI don't ignore grass, but they also don't treat it the same way as players. For you it's either "can see" or "can't see", while for them it's often somewhere in between so sometimes you'll have an unfair advantage and sometimes they will, depending on the situation.

Share this post


Link to post
Share on other sites

You can notice the prediction yourself if you play on easy mode and set the AI tags to show. Then have an AI squad leader and when he tells you to target someone you can often see them run behind some bushes/grass/trees/heavy cover and you'll see the read box keep moving but then when it comes out of cover the read box doesn't have a unit on it, because the unit actually stopped moving and the prediction was that the AI would keep moving.

A similar thing happens with enemy tags. As I mentioned the enemy tags targets the unit, but a lot of the time you'll move to the units location and there's no one there. Because that was the last known location that the AI was spotted, and he snuck away without anyone noticing.

Share this post


Link to post
Share on other sites

Well, AI compensates well with "hearing" (at least with 1.05) where shooting is coming from as he open us indirect-fire to the ambush position. To test that open fire, lay on ground, switch to 3rd view and roll right with E key to see where AI is suppressing. Its possible to fool AI, but the best way is to find nice hard cover, lay low and try to pick off any AI that is in "flanking role" in your heading while other guys in squad watch other directions. Rush rarely works, but it might if you have 1-2 guys covering you and supressing AI from taking a shot. But often a retreat and regroup is the best solution to catch AI "off guard".

One other thing is that AI is "extra allergic" to leaders (officers) and AT guys ;) they are "priorities" on their targeting list.

Edited by IceBreakr

Share this post


Link to post
Share on other sites

In my opinion topic starter talks about different thing: while you lay in grassy areas, your line of sight is affected by nearest grass, so sometimes you hardly see anything within several meters. At the same time AI has no such disadvantage, and only affected by "distant" grass layer, which is not very fare. That's all.

Share this post


Link to post
Share on other sites

"distant grass layer" also exists for AI at close distance. It's just the visual that changes for players, the clutter for AI is the same at all distance (and player don't see it)

Share this post


Link to post
Share on other sites

sure thing. i just wanted to devide visual part for players from programmed part for AI.

Share this post


Link to post
Share on other sites

the proble lies in the matter of how such things (probably) are done. For the AI, they wont check of how much they can see. The visibility check is probably a pixel sized LOS check and if you're unlucky, exactly on this pixel there might be no grass covering you. After that, just general calculations are made, like how good can the particular AI spot, how is the overall visibility set of the player? These are unit-based settings.

Colors (camo texture) is completely irrelevant, you could wear a hawaiian Magnum memorial shirt, it wouldn't affect the calculations in any way.

This is all just a guess but it would explain some things as why sometimes the AI can spot you and sometimes not.

Share this post


Link to post
Share on other sites
In my opinion topic starter talks about different thing: while you lay in grassy areas, your line of sight is affected by nearest grass, so sometimes you hardly see anything within several meters. At the same time AI has no such disadvantage, and only affected by "distant" grass layer, which is not very fare. That's all.

Hi all

Once again:

The AI Does not see anything Nada, nothing, nowt.

It has no eyes with which to see. It has no visual cortex with which to interpret anything its non existent eyes could see.

The ArmA program; server in conjunction with various clients in a mission; is aware of every object in the game. The program in this sense is omnipotent. This is true of every game you have ever played.

An "AI" as you call it, more correctly an "entity" with in the program, is assigned a knowsAbout value for other entities around it. This is a calculated value that includes values such as previous knowledge; sound made; intervening terrain including: buildings, bushes, trees, between the subject eye and any single pixel (percentage of pixels) of the target; attitudes of the subject and target entities eg stood up kneeling or laid down; the interaction between camouflage and type of terrain etc.

here read:

http://community.bistudio.com/wiki/knowsAbout

The peekaboo behind the blankie effects

NB You are not concealed by the fact your eyes are behind something!

This is the lesson you learn after many games with your parent or guardian of peekaboo behind the blankie! You remember this game :) The adult holds the blankie up in front of your eyes so you cannot see them. They watch your little legs kick in joy and listen to your little giggles of anticipation; because this the great all time bestseller, Game of the Eon (GOTEee) classic, "Peekaboo behind the blankie" game; and suddenly they pull the blankie away from in front of your eyes and say Peekaboo and you laugh and they laugh and much merriment is had by all!

One Day after much merriment and mirth playing "Peekaboo behind the blankie" you realise that the adult is in fact behind the blankie and that they can see you all the time; at this point the merriment becomes less and the joke appears lame, much to the distress of all concerned, because the little baby is growing up.

The grass may be covering your eyes but it ain't concealing your ass or your legs; because your fat ass lying down in it flattened it! Ever see those gaps in the corn where two people have been eh? nods as good as wink to the blind soldier with a grass blankie in front of his eyes!

Also we probably work out the adult is behind said blankie because they giggle too, and we saw them put the blankie up, which when you think about it later is a dead give away.

NB You are not concealed by the fact you are behind something!

Following on from this, the excuse of: I ran behind the tree/bush/house(insert object) and the AI still new where I was, so it must be cheating; is equally lame.

Shooting, making a noise, such as rustling in the bushes, or stomping your boots around, moving about and sky lining your head to take a peak when in the AI's or players arc of view, or trying to be stealthy with the telegraph poll of an AT weapon on your back; all bust concealment.

Concealment does not magically reappear because you want it to.

Kind Regards walker

Edited by walker

Share this post


Link to post
Share on other sites

Not sure if its relevant....

When playing as a sniper in a ghillie suit I found that moving anything at all resulted in me being spotted by a nearby patrol, laying stock still for 10 minutes and they never saw me despite standing less than 10m away and looking in my direction :)

I wasnt in heavy grass, laying next to a bush and whilst perfectly visible to the human eye I was invisible to AI.

Share this post


Link to post
Share on other sites

Damn it, walker, we know about it, but we talking about VISUAL representation and GAMEPLAY, not about exact ways arma interact with user.

Share this post


Link to post
Share on other sites
Damn it, walker, we know about it, but we talking about VISUAL representation and GAMEPLAY, not about exact ways arma interact with user.

Hi abel

The peekaboo behind the blankie game describes exactly the visual representation of grass in front of face.

Kind Regards walker

Edited by walker

Share this post


Link to post
Share on other sites

You're partially wrong, Walker, as a LoS calculation is made, I agree taking into account a different representation of the world than the one seen by player, but it's a LoS calculation anyway. "Line of Sight" means "Sight". So there something about true "visibility" of the unit for AI.

When you're behind a rock twice your size, not moving, on a AI that just spawned, your chance of being spot is 0%, and that's because there's a LoS calculation

Share this post


Link to post
Share on other sites

Hi whisper

I realise that there is an LOS calculation and said as much when talking about intervening terrain between the subjects eye and the target but it is not seeing.

...intervening terrain including: buildings, bushes, trees, between the subject eye and any single pixel (percentage of pixels) of the target...

Seeing is something far more complex than sight and is at the bleeding edge of computer science and not yet in games.

Having Line Of Sight on a pixel maybe sight but it is not seeing. Seeing takes place in the brain.

No game can see yet.

Kind Regards walker

Share this post


Link to post
Share on other sites

we are not asking silicon brains to write poems and recognize peoples faces (in terms of ARMA), we just asking for LoS simulation, that is similar to players LoS (which can be done in the following way: if AI unit stand still, than it can spot enemy unit with the chance near 100%, and if AI unit goes prone, then this chance may decrease (this is just the first thing, that came into my head))

Share this post


Link to post
Share on other sites
we are not asking silicon brains to write poems and recognize peoples faces (in terms of ARMA), we just asking for LoS simulation, that is similar to players LoS (which can be done in the following way: if AI unit stand still, than it can spot enemy unit with the chance near 100%, and if AI unit goes prone, then this chance may decrease (this is just the first thing, that came into my head))

Do you think they don't already have that?

Share this post


Link to post
Share on other sites

Ofc it's not seeing per se, but it's not a simple percentage calculation depending on unit type and terrain type either. There's more than just that

but it's not LoS calculation based on what player sees. My wild guess : LoS is made on fare less complex shapes than visible LoDs of objects. The huge number of object in A2 would make complex shape LoS calculation a nightmare, I guess

Share this post


Link to post
Share on other sites

Following on from this, the excuse of: I ran behind the tree/bush/house(insert object) and the AI still new where I was, so it must be cheating; is equally lame.

Shooting, making a noise, such as rustling in the bushes, or stomping your boots around, moving about and sky lining your head to take a peak when in the AI's or players arc of view, or trying to be stealthy with the telegraph poll of an AT weapon on your back; all bust concealment.

Concealment does not magically reappear because you want it to.

To add a bit, if you run behind thick vegetation or hard cover, your position is usually mathematically predicted based on your speed and direction of movement when you disappeared. The AI will retain a man-sized target of you in their memory that may speed away across the map and disappear 200m away even if you hid behind the only house in Chernarus. They may also fill the house with rounds, providing the illusion that they can see you, when they actually KnowAbout your theoretical ghost.

This applies to you as well, if you check your map. You will sometimes see tanks going full speed though ponds or over mountaintops, all based on the glimpse your internal AI saw.

But I am convinced that there are glitchy loopholes to what the AI can see. Squad leaders in particular will call out targets they saw through entire towns and hilltops. So beware.

Back to what you were saying, though. The problem with sound is that it is exact. The AI has bionic ears. Usually, you fire a couple of supersonic rounds past their head and they are completely oblivious. Then you fire the magic one and they know your position down to the millimeter. Then you get hit on the first round with an AP cannon round or AGS-30 grenade from over 300m away.

Edit: I think someone posted the shape of your average bush as the AI sees it. It had a lot of faces, but also jagged concave edges that made it smaller than the rendered object you hide behind. AI see the corners of walls fairly exactly, but I bet the rest of the house is less exact. Like roof edges and parapets, for example. Same with tree canopy.

Edited by maturin

Share this post


Link to post
Share on other sites

Hi abel

As I pointed out twice now and this will be the third time in this thread the LOS calculation is made in ArmA!

...intervening terrain including: buildings, bushes, trees, between the subject eye and any single pixel (percentage of pixels) of the target...

Seeing is something far more complex than sight and is at the bleeding edge of computer science and not yet in games.

Having Line Of Sight on a pixel maybe sight but it is not seeing. Seeing takes place in the brain.

In all cases in all games the program is aware at all times of every entity in other words it ray traces from a subject entity to a target entity where it already knows where the target entity is! And that is where you make your mistake abel. The game/simulation already knows where the target is, other wise the LOS calculation could never take place!

No game can see yet. Pure LOS based AI is why games get it wrong! And why COD player complain that ArmA AI can see them when they run behind a bush.

You do not see a thing because a photon reflected from it impinges on the rods and cones at the end of your optic nerve. It is your brain that sees not the eye.

Most Games ray trace from a notional entity centre to entity centre.

More advanced games ray trace from a notional entity eye of the subject to any single pixel of the target.

ArmA in fact does this.

The next step up is percentage of total pixels seen. And as whisper points out. Obviously as more pixels are ray traced there is a consequent cost of CPU cycles per pixel tested. So this is a very CPU intensive process. Theoreticaly these can be offloaded to a GPU but even so it is an exponetial load problem, so large numbers of entities make this an impossible task in large simulations like ArmA. And even if you can decide how many pixels are sighted by the LOS calcualtion it is not the same as being seen!

Recognition is fundamental part of seeing. Patern recognition and image analysis is very very complex and like many things humans find easy is very hard for a computer to achieve. Hense the use of human reconizable letters and numbers on complex backgrounds in order to prevent spam robots from accessing forums and the like.

Pure seeing where the entity with its own AI scans all around to spot any threats is far beyond what any computer or program can do today. Recognising part of a human shape against a background where it is camoflaged so that the pixels look the same is way beyond the capabilites of PCs that people have in their homes. It is the kind of thing that is performed by cloud networks and government supercomputers. Yet human beings do it instantly.

So in order to simulate human abilities to see rather than rely on the inferior LOS method of other games; and the human congnative ability to know about other entities BIS use the more complex knowsAbout concept.

http://community.bistudio.com/wiki/knowsAbout

Essentialy a variable describing the congantive sum of all aspects including the LOS that the subject entity has on the target entity.

Kind Regards walker

Edited by walker
when they run behind a bush

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  

×