Jump to content
nkenny

LAMBS Improved Danger.fsm

Recommended Posts

I noticed that AI "hearing" is very bad, an explosion with HE grenade at a distance of 100m from an enemy patrol, did not alert them at all; another strange reaction was when from a distance of 600m I eliminated with a HMG, half of a group on patrol, and after a few seconds the others went into safe mode. It's weird that I noticed this reaction after the last update.

Share this post


Link to post
Share on other sites

Thanks for the kind words everyone. 

@vafana
Aside from the ability to configure communication ranges the code has not changed appreciatively between versions 1.42 and 1.43.  Perhaps a video or more context could be provided? Keep in mind that the danger.fsm does not overrule existing scripts or way points that are given top the unit by mission parameters-- nor are any changes to way points or AI settings. 

 

Regarding Suppression fire

I will be investigating the issues closer in the near future. On my end it is hardly a constant torrent of messages-- it instead happens much more occasionally. From my brief attempt at debugging I notice that the negatives are not entirely consistent. It is neither when the target is out of sight, nor  when the unit is busy.  Briefly toggling the voice might be the best solution overall-- through spawning a new thread for each suppression attempt won't be 😉  

My experiments have found that the AI is willing to doSuppressionFire positions which are not fully visible as accessed by checkVisibility. I will be playing around with checking these things too. If someone has any experience with the finer workings of these commands, by all means pitch in! 

 

Design goal and perspectives

The fact is I want the suppression attempts to occasionally fail. To clarify: The intention is to avoid forcing suppressive fire and to avoid forcing extra movement orders to an already busy AI schedule. I fear the result would be a confused and ineffective AI.  Instead I rely on the built in movement and fire checks that are present in Arma. These are both high performance and effective. It also adds a fuzzy dynamism to the AI logic.  The result appears more contextual and situational.

One interesting change in the danger.fsm is that the AI is given a very short term memory. If the AI spots you at T1, he may potentially engage that position at T2-- unless he has received new data. This also feeds into the loop described above. More deliberate section wide suppression fire is currently in place in version 2.0-- which in turn is a refinement from what is available in 1.43.  There will be a video soonish that looks at group actions. 

@jfone
Out of interest. Which functions did you tweak? :) 

Kind regards, 

Ken 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey.  I like the idea of ai using flares.  The vanilla flares are trash.  In your mod please consider making flares more bright.  This is not my code but I have used it and works great.

class CfgPatches
{ class KLS_FlareFix { units[] = {}; weapons[] = {}; requiredAddons[] = {"A3_Weapons_F"}; }; };
class CfgAmmo { access = 1; class FlareCore; class FlareBase: FlareCore { timeToLive = 80; brightness = 200; intensity = 1000000; };
class F_40mm_White: FlareBase { timeToLive = 40; brightness = 125; intensity = 1000000; };
class Flare_82mm_AMOS_White: FlareCore { timeToLive = 30; brightness = 200; intensity = 1000000; }; };

 

what do you think about adding some flanking maneuvers once players position is found?

 

Also, could you add some code to check and add gun lights to ai like resistance faction that may not already have them?  Johnnyboy code for ai chatter and gun lights is a great idea.

 

Thanks for your time in making the ai better.

 

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

@jandrews

Modifying flares and gun lights is unfortunately outside the scope of the mod. You've posted two excellent stand ins. Why not just use those :) 

As for flanking. Yes and no. As the mod studiously avoids tweaking existing way points, it is somewhat cumbersome to add fully formed flanking actions.  However, version 2.0 will offer a massive improvements to low level movements-- you will see tactical manoeuvres executed faster and with more authority than before. While the exact settings are still being tested internally, there are considerable potential improvements ahead. 

 

So changes to the strategic, or planninglevel of remains firmly in the mission and scenario designers hands. LAMBS instead works seamlessly with existing content to bring tactical improvements to the game; make buildings part of the tactical landscape and increase the feedback of AI states and behaviours. 

 

-k 

  • Like 6

Share this post


Link to post
Share on other sites

Thanks Jester 🙂

--


Here is a stream-of-consciousness overview of the tweaks and changes done to the core pathfinding and selection process which will be live in version 2.0 

 

 

  • Like 9

Share this post


Link to post
Share on other sites

Very impressive. been waiting for an AI blog from an AI dev like that for years now. firing while moving -awesome. How are you noticing AI subSkills effecting their AI performance especially in CQB? For instance I bump all Spec Ops to 1 while average soldiers settings like aimingAcuracy to maybe 0.04 so that the advantage goes to spec ops. Also when the two guys are reloading simultaneously in first example (i think around 6 min mark) theres was cover there would it be possible for the AI to sprint for that cover while reloading or pulling out a pistol?

 

Really love watching the progress of this -if we ever get new combat/fear/flee/evade animations to add, Arma 'd be a whole new game. Eagerly awaiting version 2.0

  • Like 2

Share this post


Link to post
Share on other sites

This is really impressive job, keep up the good work!

Share this post


Link to post
Share on other sites

Impressive! What’s the ETA for 2.0?

 

Regarding deactivating LAMBS for the squad AI, would it be possible to implement a toggle button for that? I know that 2.0 gives the option to disable it in the settings but during my play I have situations where I would like to have it activated/deactivated for my squad AI. 

 

Thanks you!

rainbow

Share this post


Link to post
Share on other sites

can you add infantry reactions like flee/hide/garrison when enemy armoured vehicles are nearby like tanks and such... maybe artillery attack as well ??

the reaction of the Ai towards vehicles are the worst ever maybe making them popping smoke when tanks behave like bulls knocking down everyone while they stand down looking and chilling around , it would be a clever idea to make them sprint away when enemy tanks pass over 😉

 

  • Like 1

Share this post


Link to post
Share on other sites
15 minutes ago, AirShark said:

can you add infantry reactions like flee/hide/garrison when enemy armoured vehicles are nearby like tanks and such... maybe artillery attack as well ??

the reaction of the Ai towards vehicles are the worst ever maybe making them popping smoke when tanks behave like bulls knocking down everyone while they stand down looking and chilling around , it would be a clever idea to make them sprint away when enemy tanks pass over 😉

 

This sounds cool as well.   After seeing the latest video it would be nice to tweak the ai to take cover a bit more and move even more organized.  They seem to stand out in the open move during gun fights.  Also that 1v1 in the video was funny.  Being it's for coop I doubt players vs ai would be anything close to it.  

Share this post


Link to post
Share on other sites
20 hours ago, jandrews said:

This sounds cool as well.   After seeing the latest video it would be nice to tweak the ai to take cover a bit more and move even more organized.  They seem to stand out in the open move during gun fights.  Also that 1v1 in the video was funny.  Being it's for coop I doubt players vs ai would be anything close to it.  

 

The downside to having the Ai taking cover on "everything" is that they will take forever to traverse open terrain or perhaps even a straight line. Sometimes you just want your Ai soldiers to go from point A to point B as fast as possible. 

 

There is a thin line between too much CQB style combat vs open terrain style combat.

 

Too much of one or the other and the gameplay suffers.

 

That is why BI never got to do CQB right, they figured that having both open terrain combat and CQB was incredibly hard to balance so they went full Open terrain all the way. Therefore sucky CQB on default Arma 3.

 

I would say right now is almost perfect in that regard. In fact I find that the Ai tends to wallHug a little bit too much for too long so if anything right now CQB is favored by the mod.

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, LSValmont said:

 

The downside to having the Ai taking cover on "everything" is that they will take for ever to traverse open terrain or perhaps even a straight line.

 

There is a thin line between to much CQB style combat vs open terrain combat.

 

Too much of one or the other and the gameplay suffers.

 

That is why BI never got to do CQB right, they figured that having both open terrain combat and CQB was incredibly hard to balance so they when Open terrain all the way. Therefore sucky CQB on default Arma 3.

 

I would say right now is almost perfect in that regard. In fact I find that the Ai tends to wallHug a little bit too much for too long so if anything right now CQB is favored by the mod.

 

I see.  From my testing and style for me personally it's the opposite.  I guess it always depends on what ai considers to be cover.  And if I was an ai I would want to be in more cover then in the open I guess.  Ai life matters too.  😉

 

Anyways, would be a cool parameter to have the option of either more open terrain or more cover based movements.

 

Another question I have is what does the ai do in vehicles?  The last time I had one drive in a wide circle wasnt sure if he was trying to run me over or just confused.  

Share this post


Link to post
Share on other sites

Thanks everyone for the kind words. 

 @froggyluv
Regarding subskills. Because this mod does not modify cfgWeapons settings, the actual weapon performance will not be affected as such.  Though you will be seeing significantly more aggressive and active AI than vanilla settings. The biggest difference between high and low skill settings, as it related to the danger.fsm, is that I reference suppression variable of the AI.  This is MASSIVELY affected by unit skill.  In vanilla a 0.2 skill soldiers will be suppressed for 10 seconds. A skill 1 unit, 1 second...

 

In regards to cover, I am hoping to hit a nice medium of cover and mobility.  As the video notes, it is unfortunately impossible to alter this variable dynamically (without access to the source code).  Perhaps further experimentation will hit gold.  For reasons of not wanting to overload the AI, I try to avoid adding additional weapon changes and such to the fsm. Instead letting the default cfgWeapons carry that weight. 

 

@rainbow47
The plan ahead looks like this. The 2.0 is feature frozen. We are now only seeking to document and clean up existing features.  We're doing a larger scale test of version 2.0 in my community this Tuesday.  After which will comes period where we fix any bugs or add tweaks as necessary. Provided there are no massive issues, we're looking at a 1-2 week period. 

@AirShark
In fact, infantry already hide from Air and armoured assets 🙂  I'll make a video about it.  As for artillery, I actually haven't thought about adding specific handling of that! 

@LSValmont and @jandrews
We're currently trying to reach a nice compromise. At the current level of access there are unfortunately limits to what we can and cannot do-- though this is massive compared to any other game. So props to Bohemia. 

I also suspect that CQB is a little too aggressive in the current state. This is really a matter of getting timings and settings right.  It is possible to alter the CQB range (that is, at what range the AI consider itself in CQB). Lowering this will increase use of cover in a sense. 

- nkenny

 

 

 

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

I've been using your mod in the mod Overthrow and notice that the civilian AI "try" to find cover but get stuck running in place.  Now Overthrow has a danger.fsm in there so I was wondering if you think that there may be a conflict between the two.  It also has vcom scripted into it but there was mention that vcom shouldn't be an issue.  I would really appreciate your advice/suggestions on this 

Share this post


Link to post
Share on other sites
On 10/15/2019 at 9:35 AM, nkenny said:

Here is a stream-of-consciousness overview of the tweaks and changes done to the core pathfinding and selection process which will be live in version 2.0 

 

 

In this video you mention the problem of AI too close and it would be nice if there was an AI melee animation you could use.  I've built something for my scripted movement scripts that you are welcome to use any part of if you like.:

 

  • Like 3

Share this post


Link to post
Share on other sites

@CW4 Carrera

debug information is unfortunately only shown where the unit is local. Unless zeus is in play, this will most likely be the dedicated server itself. 


@gerhart
I'm unfortunately not familiar with Overthrow. If there is a custom danger.fsm. These may indeed be competing, in the sense that one will supplant the other.  Civilians running in place may potentially happen if they are path locked. Once 1.96 is released we will have more ways to avoid this. :) 

Ken 

Share this post


Link to post
Share on other sites

I'm really intrigued with this mod.  Things I've noticed:

 

1) The AI is really, really inaccurate.  Even at distances of 20m, they will unload on each other and rarely hit; they will only score hits when they have walked right up to each other to practically point blank distance.  I figure that this is because the vanilla AI allows the AI to aim until it reaches a certain probability of a hit, and then fire, while the implementation you've introduced perhaps lets the AI shoot well before they have a probability of a hit.  I haven't tested this extensively (default units have 0.5 skill?) but raising the skill of a unit to 1 didn't seem to have a practical impact on accuracy.

2) The AI doesn't seem to take into account the weapon they are using.  In your last video example, AI: Dylan Faulkner is using an MX with underbarrel grenade launcher, and doesn't think to use it, preferring instead to charge to CQB.  I can only imagine what the AI would do if they were equipped with a sniper rifle.

3) The settings (fn_zettings.sqf) file allows you to set the danger_panic_chance, where I feel this should be intrinsically linked to the unit's courage skill.

 

That said, the changes you are bringing to the gameplay are excellent and I would love to see where this mod goes.  For mission makers you'd do them a great service by providing toggle variables to allow them to disable any of the custom behaviours you have implemented (panic and AI suppression, for example).

 

Best regards

 

Ryko

  • Like 2

Share this post


Link to post
Share on other sites

@CW4 Carrera
Just run the following command line in any relevant init field: 

 

lambs_danger_debug_fsm = true;
lambs-danger_debug_functions = true; 

 

These will be handled with CBA settings in version 2.0

 

@Ryko
Thank you for your extended description. I will attempt to answer in order.  (1) and (2), the mod does nothing to vanilla or mod weapon configuration. Hence the perceived inaccuracies or erratic use of weapon capabilities (grenade launchers, burst modes, and so on) are products of other settings. Earlier in this thread and across some of my videos I explore the difference in what is configured and what is not. 

If you play with @LAMBS_suppression there will in a passive, secondary way be added inaccuracy.  This is because AI units loose accuracy on becoming suppressed and this this mod increases the time a unit remains suppressed.  LAMBS_Suppression is developed to increase the difference between highly trained troops and lesser ones.  It also develops ideas explored in my investigations in AI weapon accuracy (Link given above).  If your unit plays with exaggerated, or significantly decreased AI skills (as many do). Your mileage may vary some.  This is especially true when CUP configured weapons are used interchangeably with RHS ones. This for reasons explored in the aforementioned link resource. 

 

In CQC the movement cycles of the AI of greatly sped up. It may indeed merit further investigation. :) 


(3) I explore in some detail the design considerations behind these settings in a post a few pages back. Panic is a function of suppression, and suppression is very much affected by skill settings. For lack of consistency of configuration, I have avoided adding more arbitrary links to skill.  Perhaps when the mod reaches a higher level of maturity. 

Like mentioned. Version 2.0 will see many more CBA variables. :) 

Kind regards, 
Ken
 

Share this post


Link to post
Share on other sites
13 minutes ago, nkenny said:

the mod does nothing to vanilla or mod weapon configuration. Hence the perceived inaccuracies or erratic use of weapon capabilities (grenade launchers, burst modes, and so on) are products of other settings.

Comparing your FSM to the vanilla FSM, the vanilla FSM builds in a forceSpeed 0 for 4-8 seconds, presumably, to allow the AI to aim before firing.  I haven't fully parsed through your FSM, but I see in CQC assault mode they are made to forceSpeed 3, which will allow them to move and shoot (which I love!) except it probably plummets their accuracy.  But what I can't figure out is how a stationary AI (no other mods than yours, by the way) can miss me from around 100m until they run out of ammo.

 

33 minutes ago, nkenny said:

Panic is a function of suppression, and suppression is very much affected by skill settings.

I believe this (though I can't find out the exact dynamics of what gets affected).  However your code checks both the current level of enemy suppression and a flat random to your zettings file variable, so you're overriding an enemy's behavior with your own constant.  I suppose I could as a mission designer override you by just making that variable (lambs_danger_panic_chance) astronomically high.

Share this post


Link to post
Share on other sites

Panic behaviour is triggered when suppression (from getSuppression) is higher than 0.97 and a random chance (1 in 20 by default) is hit. Because the FSM does not cycle at perfect intervals, the rate which this check is performed will vary somewhat.  I consider this fluctuation reasonable. In version 2.0 panic chance is in terms of setting increased, but in actuality is generally lower. As the panic effect is somewhat less invasive and there is generally more time between cycles. Setting lambs_Danger_panic chance very high will indeed remove panic as a game mechanic. 

 

I would like to experiment a little more with accuracy related to the constant movement. Offhand I would say that more mobility is a fair trade off for loss of accuracy at close range. 

 

-k 

Share this post


Link to post
Share on other sites

Hi nkenny,

 

I just wanted to comment and say how impressed and excited I am for the work you have accomplished already for the community to enjoy. I also had a quick question to ask:

 

Do you personally have any suggestions for the ai/difficulty values that you would personally suggest that you find compliments your mods to get the optimal result? I was considering getting another Arma server in the near future and want to have this running, so I was thinking about the values and decided to ask if you had any suggested values that you found personally worked the best with your LAMBS mods?

 

-J

  • Like 2
  • Thanks 1

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

×