Page MenuHomeFeedback Tracker

AI can accurately engage through near concealment when it has spotted an enemy which then moves out of LOS
Closed, ResolvedPublic

Description

ISSUE
An AI 'Shooter' can engage distant (>100m) moving 'Target' through concealment near 'Shooter' if 'Shooter' saw the 'Target' for only a moment and then went prone or otherwise lost all line of sight to the target.

This issue is enhanced if 'Shooter' has a teammate who can see 'Target,' in which case 'Shooter' will receieve periodic updates of the exact location of 'Target.' As a result, when 'Target' comes out from behind the viewblock near 'Shooter,' 'Shooter' will already be perfectly aimed on him and will engage and kill him. All of this happens from a view that if it were a human player, there would be no visibility, and there is no way that the Teammate could give such accurate position updates.

The video I have put together below shows this issue in a variety of circumstances on Altis. I am using Regular difficulty and all editor AI sliders are set to 0. No mods are used. I have an i5 3570k @ 4.2 GHz.

http://www.youtube.com/watch?v=fbwndKjjIHA

As can be seen at the end of the video, this issue is severely compounded when multiple AI are involved. If one AI teammate can see an enemy target, he transmits that info to his team perfectly -- and they will engage through dense and totally obscuring underbrush and kill the target without difficulty. {F22274} {F22275} {F22276}

Details

Legacy ID
1929658147
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
AI Issues
Steps To Reproduce

STEPS TO REPRODUCE
I have attached three missions which consistently reproduce the issues shown in the video on Regular difficulty settings on my computer.

AITest-TeamSpotting: shows how an AI that cannot see the enemy, but whose teammate (unarmed) can see the enemy, will predictively engage a moving target with high accuracy *through* solid branches and foliage with no visibility.

AITest-TeamSpotting: shows that the issue is not the foliage ViewLOD. The AI has no view of the enemy until his teammate turns around -- then he gets perfect knowledge and shoots through the brush.

AITest-ProneThroughBush: The AI will see an enemy move for a moment before his view is blocked by the bush in front of them. He will then go prone and shoot the enemy through the bush (lethally) with absolutely no line of sight to the moving target.

Additional Information

POSSIBLE CAUSE
I have a guess why this is happening.

When the AI sees a bad guy, they retain perfect positional knowledge of it for a bit, even if they lose line of sight. This is their memory. However, they are able to engage targets they remember with extreme accuracy even after losing line of sight due to a stance change.

I assume this has something to do with the timing of whatever internal loop updates the knowledge of the AI relative to the enemies around him based on his 'sensitivity' parameter. The AI's memory should be weakened when they lose line of sight and change stance. No human could exhibit the behavior shown.

Event Timeline

Taosenai edited Steps To Reproduce. (Show Details)Sep 25 2013, 4:57 AM
Taosenai edited Additional Information. (Show Details)
Taosenai set Category to AI Issues.
Taosenai set Reproducibility to Always.
Taosenai set Severity to None.
Taosenai set Resolution to Fixed.
Taosenai set Legacy ID to 1929658147.May 7 2016, 4:54 PM

Excellent report.

AD2001 added a subscriber: AD2001.May 7 2016, 4:54 PM

You know your report is excellent when Dslyecxi says it's excellent.

Your video doesn't prove anything about maximum knowledge of movement, just of position. It's clear that the AI retain full knowledge of the *position* of the enemy as originally spotted, and fire perfectly at it through bushes. This is your bug. You haven't demonstrated that there is unfair knowledge about prior movement of targets hidden by bushes. In addition, we need to make sure that the AI retains the ability to fire through bushes at suitable times. I kill people through foliage all the time.

If you were to duck behind cover while the AI was firing at you through the bush, they would be none the wiser. They DO switch to predictive behavior, as you can see in the video, with them tracking a target with perceived--not actual--movement.

"What should happen is that the AI should lose knowledge of the enemy target's position and movement as soon as they lose line of sight, and instead they should switch to their 'predictive' tracking. The AI routines need to check before every shot if they have a true line of sight to the enemy."

Absolutely not! The AI should have a memory, you know. I don't forget where the enemy is because a bus passes between us, like in the movies. The AI should retain full knowledge of the enemy's position, but they should not be able shoot at it with a high degree of accuracy over long ranges. The basic behavior is correct and human, but the precision is ridiculous.

Furthermore, AI NEED to be able to shoot through bushes and trees at perceived positions and area suppression targets. Players do this every day, but the AI are still hesitant to do so and it gets them killed unfairly--by us.

As for the rate of fire issue, there is no problem with a steady pace. As a human, I assess my impacts while continuing to shoot, so as not to give the enemy a breathing space.

Furthermore, the AI knowing that an unseen enemy has died is an issue that deserves its own ticket.

And also, does anyone remember that 'AI should not fire on units observed only b group members' ticket? Maybe this isn't actually fixed.

I would re-write the expected behavior as follows:
'AI should be unable to deliver precision fire on enemy positions that are not in their line of sight. Although firing through objects on targets that were observed earlier IS valid behavior, there should be a serious penalty in accuracy, turning the point target into an area target, whose size is based on range.

Lastly, error is introduced in your videos by the bushes and grass. We don't know exactly what the viewblock models look like. We need to find ourselves someone who can put a LoS script in the mission.

Linkin added a subscriber: Linkin.May 7 2016, 4:54 PM

I can confirm that AI are able to call out "scratch one" with no visual line of sight - and funnily enough, if human players zoom in through a crest or similar, they can do the same, with no line of sight on the unit.

Maturin,

You haven't demonstrated that there is unfair knowledge about prior movement of targets hidden by bushes.

That is not the bug I am reporting. In fact I specifically state that the test file AITest-TeamSpotting shows that the issue is NOT the foliage ViewLOD.

I kill people through foliage all the time.

Have you ever killed an enemy by blind firing through a bush at a moving target you spotted for fewer than 0.5s at more than 100m range, after a stance change (which unquestionably disrupts your exact reference to the enemy's position), in 2-3 shots? In my reproduction scenarios, I show these results with extreme consistency on only Regular difficulty. One can increase the AI skill to see more extreme cases.

I encourage you to try it by taking control of the AI yourself. As soon as you see the enemy and he disappears behind the bush in front of you, go prone and try to shoot him. You get 3 shots. Best of luck.

Furthermore, AI NEED to be able to shoot through bushes and trees at perceived positions and area suppression targets.

The issue is not about the AI firing through bushes. It has to do with them retaining a full '4' knowsAbout value for targets they cannot see, and using that information to make precision shots. They are not 'remembering' where their target is. They know exactly where it is even after losing line of sight to the target.

Furthermore, the AI knowing that an unseen enemy has died is an issue that deserves its own ticket.

No, it does not, because the cause is exactly the same and it is the same bug. Because the AI has knowsAbout = 4 for the target even after proning behind the bush, they know that it is dead. knowsAbout = 4 means that they have total information about the target -- position, movement, life state, class, weapons.

And also, does anyone remember that 'AI should not fire on units observed only b group members' ticket? Maybe this isn't actually fixed.

Reproduction case AITest-TeamSpotting shows that it is not fixed when linked with this issue.

I recommend that you try the reproduction cases rather than the video, which simply shows the issue, not the cause. In the missions I have included a tracker that shows the knowsAbout value of each AI regarding the other. While firing through the bush it remains at 4, the maximum, which means that the AI has perfect knowledge of the position of the target -- even if it is moving. They are not using predictive tracking because there's no need for it.

Increasing enemy inaccuracy is not a solution. Dispersion increases amount to a hack. It is far better for the AI to properly assess where they think the enemy might be and engage that location with aimed fire. The problem occurs when, as I clearly show, they do not 'assess' where the enemy might be. They know, at maximum value.

Lastly, error is introduced in your videos by the bushes and grass. We don't know exactly what the viewblock models look like. We need to find ourselves someone who can put a LoS script in the mission.

I could easily add such a check to my repro cases but there is no reason, because the issue has nothing to do with the viewblock models of the bushes, as I stated clearly in my report's reproduction case notes. I have also repeated this test with the grass turned off -- you can see me turn it off in video -- and it persists. If you put the AI behind the bush from the start, they will never spot the enemy. The issue occurs only when the AI spots a target, goes prone to engage it, and THEN the target is obscured by the bush's viewlod as result of the proning. The AI then ignores the bush and engages through it for a few seconds before the engine reassess whether or not the AI has knowledge of its target. (Or that's my guess about the engine behavior.) If they don't kill the target in the first few shots, they'll stop firing and just lay there.

Added a LOS check to the repros (see attached file).

Notes:

  • Player unit is now named "observer"
  • Player unit moved closer (still in cover from affected units), to facilitate changing to Spectator mode and better check the LOS (it is difficult from internal camera)
  • only "badguy" is checked for LOS but more units can be added to "GAM_unitsToCheckCoverage" array (check init.sqf)
  • added hint coverage information as a percentage (result is an aggregate of all threats being checked against)
  • coverage script is run processing an actual threat position, in the alternative mode it will only check against perceived position of known targets (returned by nearTargets), to activate this mode the line

"[_x, 500, true, allUnits - [observer]] call checkCoverage" should be changed to
"[_x, 500, true] call checkCoverage"

Comments:
I agree with maturin when he states that "The AI should retain full knowledge* of the enemy's position, but they should not be able shoot at it with a high degree of accuracy over long ranges. The basic behavior is correct and human, but the precision is ridiculous"

*Full knowledge is an overstatement though specially when there is no friendly additional info, even in which case it should never share the information neither at the rate, accuracy, and immediacy to which it does.

Another point is that while shooting through foliage should be an expected behaviour, we should further distinguish when that foliage (or other kinds of soft cover) is closer to the shooting AI.
IF COVER IS CLOSER TO TARGET
i agree with maturin, prediction routine should serve the purpose (with a lower level of accuracy as stated)
BUT
IF COVER IS CLOSER TO THE SHOOTING AI
the prediction routine should be even less accurate because being closer also means a higher range of possible wrong positions. This decreased level of accuracy should only be mitigated by the AI actually updating the perceive position to an actual position, since in this case it is also easier to move a smaller distance to see between intervals in foliage.

So this repro mixes some issues:

  • Rate, Accuracy, and Immediacy of Target sharing (ingroup)
  • Accuracy of prediction routines
  • Likelyhood of shooting under low expectations of success

"The issue is not about the AI firing through bushes. It has to do with them retaining a full '4' knowsAbout value for targets they cannot see, and using that information to make precision shots. They are not 'remembering' where their target is. They know exactly where it is even after losing line of sight to the target."

You have not proven this. The AI simply *remember* (I completely agree that this is unfair as currently implemented). I have tested this in A2, OA and A3, and specially for this ticket, and so far empirical evidence and Occam's Razor is on my side. I will continue doing my best to find otherwise and resolve the discrepancy in the ticket, but that' how it stands for now. The AI remember you last observed position with perfect accuracy, but they are oblivious to movements made after LoS is lost.

"No, it does not, because the cause is exactly the same and it is the same bug. Because the AI has knowsAbout = 4 for the target even after proning behind the bush, they know that it is dead. knowsAbout = 4 means that they have total information about the target -- position, movement, life state, class, weapons."

This just isn't true in my experience. I almost wish the community had never discovered KnowsAbout, because nobody understands it, and BIS doesn't bother talking about because it is a deceptive mess.

It has been exhaustively proven that if you run behind cover, the AI will lose knowledge of your exact position and begin predictive tracking. This is the easiest thing to test in the world, and nigh irrefutable. Despite this, KnowsAbout remains at 4. The maximum value does not necessarily denote full knowledge, it is simply a measure of their certainty that you exist as a threat. Complaining about changes in this imaginary number is meaningless. Only the results of the number matter. I highly recommend that you download a script that displays the perceived position of an AI unit's target. I will link you one, and in return try this repro to see if it differs from my own.

Food for thought: what happens if the target goes prone a split second after the AI? I bet you anything that all those bullets fly harmlessly overhead.

To reiterate: If the bush in your repro was located 2m in front of the (moving) target, the behavior would be completely correct: Shooting with a high degree of certainty at the bush (this doesn't happen, because of a separate issue that handicaps the AI).

A good workaround would be prohibiting the AI from shooting through nearby objects unless the target is within normal footstep hearing range (20m or so). However, if a target runs behind a tree canopy equidistant between target and shooter, the AI should hose down that tree based on predictive tracking.

Devs, please also reference kju's report from Arma 2 on Dev-Heaven:

#42413 Improve AI info share system and AI weapon use on non visible targets system
https://dev-heaven.net/issues/42413

This includes separate A2 reproduction cases and is the same issue.

gammadust,
Thanks for the additional repro. You're spot on in arguing that they AI should use predictive aim to fire at targets moving briefly behind bushes near the target. That's definitely desirable behavior and is well-implemented now. This bug with close bushes seems to be an unintended side effect of that behavior when combined with that ticks of perfect info obtained from a spotter (explained below).

Maturin,

You are correct in that the AI is partly using its predictive tracking to follow the target. I was incorrect in saying that it does not. You are wrong that it does not have precise information about the target's location when knowsAbout = 4. It is only predicting the target's position until it gets a new 'tick' from the engine giving it the target's exact location. These accurizing ticks do not happen except when knowsAbout = 4. The AI will indeed fail to track a moving target through a bush if his knowsAbout is 3.98.

You have not proven this.

Let me prove it to you then.

I have prepared a new repro case, AITest-TeamSpotPositionTicks.Altis, which shows some additional aspects of this bug.

  1. When the AI feels that they are viewblocked, they will not fire on a 100m target through the viewblock even with knowsAbout = 4. This is correct behavior and shows that the LOS checks are working as intended.
  1. When an AI has a teammate observing the target (i.e., when knowsAbout = 4 and at least one team member has direct Line Of Sight to the target), the AI will receive a periodic 'tick' from the engine giving them the exact position and velocity of the target at that time. They will then use that information to apply their predictive tracking for a short window between ticks.
  1. Even with this info, they will not shoot through the bush. However, because of the ticks of info, as soon as they could possibly engage the target through the edges of the bush (they still cannot actually see the target from the perspective of the camera) they will. And they'll kill it in 2-3 shots. Other bushes (such as the brush shown in my video that the AI shoots through the hard branches) they will shoot through in places other than edges.

Please reference this video and AITest-TeamSpotPositionTicks.Altis:
a) There is a drawIcon3d blue circle (hard to see on YouTube, sorry, please run the repro) showing the exact position of the target.

b) A teammate is observing the zigzagging target.

c) Observe that the AI periodically receives exact target pos/velocity information and jerks over to perfect aim, then updates his predictive tracking to match even after the enemy has made a direction change. Consequently he is already perfectly aimed when the target leaves the viewblock and he shoots and kills it nearly instantly. Note that in the camera we watch, it is impossible to see the target at any time.

http://www.youtube.com/watch?v=cHn3Tv1ahiU

Ah, now we understand each other.

However, I don't know why you are describing these position updates as 'ticks' of information when they are simply radio contact reports received from the teammate.

The main thing for me is that the engine is NOT 'cheating' by providing the AI with magical information. It's just that position information shared between AI in groups is WAY too accurate. The team mate spotter should indeed be transmitting the target's location (he does this for the player even, on the map and win on-screen engagement cues), but AI should not be able to engage based on this information. (Although in an ideal game, the AI would instruct teammates to engage obstacles that enemies were hiding directly behind, as this would revolutionize vehicle gameplay.)

So what does this mean?

It means that this last issue is actually a duplicate of a ticket that already exists, for a bug BIS believed already fixed.

Dslyecxi is wrong to call this an excellent report, because it lacks a central, serious bug. Instead, we have ended up discussing a wide variety of poorly-configured elements.

I recommend we delete this ticket, keep all the excellent repro missions and videos, and replace it with a series of concrete recommendations. Or really, like you pointed out, kju's ticket is ideal and still relevant.

@Taosenai
"This bug with close bushes seems to be an unintended side effect of that behavior when combined with that ticks of perfect info obtained from a spotter (explained below)."
Exacly my thoughts.

@maturin
"However, I don't know why you are describing these position updates as 'ticks' of information when they are simply radio contact reports received from the teammate."
If i am not mistaken he is refering to ticks (as in engine loop cycles). No one, but devs, really know what is the fraction of time these translate to. But it is observable that the perceived position (also actual position since the reporting unit has LoS) is being shared with a much faster rate than would be humanely possible by radio reports.

I've seen some issues now where current AI Target Sharing abilities really appears to facilitate misbehaviour, an example is "Grouped AI is aware of kills even when they shouldn't notice" (http://feedback.arma3.com/view.php?id=10143)

Let's sample a human target sharing:
<Threat seen>
"Contact, vehicle 2 o'clock"
2 secs later
"Enemy technical, 300 meters out... unware of our presence"
4 secs later
"Bearing 53, moving slow northbound. Infantry supported"

Current AI sharing:
tick1 - [[[2555.33,2535.33,1.32708],<generic class>,unknown,0,unknown]]
tick2 - [[[further updates position],"Class",EAST,214222,EAST 1-1-A:1]]
tick3 - ...

Between ticks we have fractions of seconds. Stressing that transmission of this information is humanly impossible at the observed rate, accuracy and immediacy.

Additionaly the whole group becomes aware of threats simultaneously with no degradation of information whatsoever. Independently if they have radios or are just shouting out to whoever is nearby to hear, independently of current occupation (ie. shooting - no one attempts to report while shooting), independently of general surrounding noise.

As in a hive to which they all contribute and access information from. Making me think there is no individual AI threat database at all.

Now removing this ability from AI should not be without it's other consequences. It is not surprising that there will be AI systems relying in this unrealistic behaviour providing the current "acceptable" balance, which would then become broken.

*there might be some assumptions here but they are according to my general experience. I'll try and make actual repros of these.

I think it would go a long way in individualising the threats database, limit the sharing of information to much slower updates, and also limit the span of information per update (once type of threat, once direction and distance / grid position, etc)

I have updated my original report to remove any speculative insight into the role of knowsAbout and to be simpler to read.

I want to stress that I am reporting the issue with engaging distant targets accurately through near concealment for a brief window after losing line of sight. I am not reporting about the info sharing of the AI. That is very relevant here and closely related, but it is not the bug I am reporting.

Exp

  1. Should not fire through foliage (at that skill level at least)
  2. Should loose some precision of enemy position after stance change
  3. No instant knowledge of a kill and must be visually confirmed

See also: https://dev-heaven.net/issues/23524

  1. Clutter/grass should block LOS (1:10+, 3:55+)
  2. Viewblock of bush buggy? (2:30+)
  3. AI not affected by getting hit (3:30+)
  4. AI info share within group needs rework.

See: https://dev-heaven.net/issues/42413 and related tickets(!)

For view block:
https://dev-heaven.net/issues/39946 and related

And perceived position stuff:
https://dev-heaven.net/issues/18956

Thanks kju.

This may also have relation to whatever internal bug was fixed with the note:

  • AI will not shoot you through bushes, if he did not see you before - fixed in OA and merged

from RiE 23.07.2013, 10:39, http://forums.bistudio.com/showthread.php?159711-Development-Branch-Captain-s-AI-Log

  1. Should loose some precision of enemy position after stance change

Disagree.

They shouldn't lose any precision just because of stance change. That's not fair. I don't suddenly forget my target's position when I drop to one knee, never haven taken my eyes of it.

Stance isn't the issue here. LoS is. If there's no LoS, the AI should aim at an inaccurate area target, not a point target.

As for the ticks, isn't it safe to assume that we are just seeing the interval at which the AI share information? Obviously the hive mind has to be removed or tweaked down to human levels.

"As for the ticks, isn't it safe to assume that we are just seeing the interval at which the AI share information?"
If i do believe that solving the target sharing interval will help in significantly decreasing the symptom shown on this ticket, the Tao's issue stands. To prove it is his first repro where there is no friendly AI reporting.

Specifically in regards to it, i think it is only a matter for AI to distinguish how close to itself the soft cover is affecting its own likelihood of shotting. (this reminds me how helpfull could the perceived position accuracy return of nearTargets be to represent this likelihood - and does it increase sufficiently as soon as LoS is false)

I agree with Taosenai in emphasising the need to deal with them differently.

unrelated notes:
[I've been doing some testing and some of my assumptions are not correct. There appears to be some actual limits implemented. I confirmed that the sharing of targets is not made to all members of a group simultaneously in every case. The point stands though since it is still too fast. Will further test this.

For anyone reusing the LoS script i uploaded: the script is bugged due ASL/ATL positions overlook on my part when adding the possibility to use a custom target list as opposed the one provided by neartargets. Working version on the way, but beware.]

work in progress

OMAC added a subscriber: OMAC.May 7 2016, 4:54 PM
OMAC added a comment.Oct 12 2013, 4:41 PM

Check this video which appears to demonstrate several aspects of this ticket: http://www.youtube.com/watch?v=wuXu-SdatgU.

rev 111178: decreased AI ability to shoot trough bushes when team member sees target

Did anyone test a repro of this issue since the latest improvements? Is it better or even fixed?

I've just run through my repro cases on the latest dev build and I am still seeing the reported behavior. I cannot observe any change (and I'm not sure what has been changed?)

roni added a subscriber: roni.May 7 2016, 4:54 PM
roni added a comment.Oct 31 2013, 8:26 PM

They say work in progress. Ye, maybe after 10 years they do something.

oukej added a comment.Nov 28 2013, 9:36 AM

Be not afraid. This hasn't gone into the oblivion.
Please understand, that any change introduced needs internal tuning, testing and evaluation first, even before it's subject to public evaluation.

This issue has received quite a priority, but because of the size of our team, any work literally goes down to individuals usually occupied with various parts of the game. Saying "they" can mean just one or two persons ;)

Any relation between this ticket and the changes pushed to dev branch on 5-6-2014?

http://forums.bistudio.com/showthread.php?149636-Development-Branch-Changelog/page28

Improved: AI's losing sight of target

oukej added a comment.May 7 2014, 11:00 PM

Oh, yes, I see I completely forgot to mention any progress in here. I'm sorry.

It has begun here http://forums.bistudio.com/showthread.php?159711-Development-Branch-Captain-s-AI-Log&p=2598737&viewfull=1#post2598737 and the one mentioned by you is another further improvement.

More info can be found here: http://forums.bistudio.com/showthread.php?159710-AI-Discussion-(dev-branch)&p=2684958&viewfull=1#post2684958

Let us know what you think about it!

The AI can still see truh bushes and reed !

Arkhir added a subscriber: Arkhir.May 7 2016, 4:54 PM
  • The AI can still see truh bushes and reed !

That is simply not true for Altis and Stratis, you must be playing on poorly configured terrain.

oukej added a comment.Sep 2 2015, 5:31 PM

More improvements

Closing as resolved.

If you think some issues mentioned here still persist, please create a separated ticket for individual issue, ideally with a simple repro mission.

Thank you for helping us improve the game!

Baraz added a subscriber: Baraz.Sep 24 2017, 9:49 PM