Jump to content
Sign in to follow this  
fabrizio_t

FlexiAI (WIP) discussion

Recommended Posts

Yes sorry wasn't a sideways "whent it coming out" post :) However long it takes, but keep us informed with your very own "AI Dev Diary" :man3:

Share this post


Link to post
Share on other sites

Just had time to catch up with this thread and what you showed us so far in pics/videos looks great!

Take your time mate and let us know your progress from time to time...

/KC

Share this post


Link to post
Share on other sites

Hi, some off-topic good news:

bugtracker issue: 2209 / "AI units can't spot standing enemy at 250m. with clear line of sight" is now being looked in and it will be fixed in patch 1.05BETA. Let's hope that detection problems will be definetely solved.

Back on topic, i hope to be able to publish a new video update tomorrow.

Nothing extraordinary, just some longer footage including a simple urban skirmish ;)

More details to come.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

I support 100% what you're trying to do and the bug tracking you're doing about AI. That's very well done and clever, hope BI will closely look into this, because this game is mainly about AI. Good job.

Share this post


Link to post
Share on other sites

Looking forward to this. Will the AI be able to sneak up from behind to shoot the enemy in the back?

Share this post


Link to post
Share on other sites
I support 100% what you're trying to do and the bug tracking you're doing about AI. That's very well done and clever, hope BI will closely look into this, because this game is mainly about AI. Good job.

²

We support you 100% Fabrizio_T ;)

Share this post


Link to post
Share on other sites

Thx you all, glad to see so much interest for this little project.

I'm very sorry to say i am not able to upload the new video today as planned, i am wishing to polish things just a little bit more before showing them.

Good news is i finally managed to correctly capture audio too with gamecam, so next vids will finally have sound working.

Just for anybody interested in my work and progress: i am currently testing and refining the existing flank / engage infantry routines in order to have them working reasonably well also into (small) urban environments where (with some basic CQB involved).

As usual, more news to come ...

---------- Post added at 09:43 PM ---------- Previous post was at 09:30 PM ----------

Looking forward to this. Will the AI be able to sneak up from behind to shoot the enemy in the back?

With current "faulty" detection routines i don't think it would be a reliable option.

With a proper fix by BIS then ... well maybe.

Share this post


Link to post
Share on other sites

Hey, I had a thought for a suggestion today:

Is it possible to make the Formation: No change mode cause infantry groups to move in a column through trees and automatically change to a wedge in open terrain?

Share this post


Link to post
Share on other sites

Hi fabrizio_T, Are you able to create your video in comparison with vanila AI? maybe issuing the same commands side by side to see the differences/improvements so that it will be much more tangible for some of us. Just an idea. Thanks

Share this post


Link to post
Share on other sites
Hey, I had a thought for a suggestion today:

Is it possible to make the Formation: No change mode cause infantry groups to move in a column through trees and automatically change to a wedge in open terrain?

Formation already changes dynamically, for example FILE formation and STAG COLUMN are used if some houses are very close or nearby.

FILE formation is also used when group is trying to stealthily flank .

Through forests (without enemy contact) i tend to let team move in WEDGE formation, since AI seems to be able to better spot threats.

That may change in the future, of course.

More testing needed.

---------- Post added at 08:31 AM ---------- Previous post was at 08:29 AM ----------

Hi fabrizio_T, Are you able to create your video in comparison with vanila AI? maybe issuing the same commands side by side to see the differences/improvements so that it will be much more tangible for some of us. Just an idea. Thanks

Having some time i think i may be able to post a couple of comparison map screenshots showing the path/behaviour taken by Vanilla vs. improved AI.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

(See image below)

In this test mission a 6 men SF group (MAX. skill) starting N of a village should move towards a destination waypoint roughly 1km SW. Two enemy groups (25 men total - MIN. Skill) are positioned near the southern border of the village and given a GUARD waypoint. The SF group is given STEALTH waypoint behaviour from start.

Since the SF group is not supposed to be able to win a frontal clash, the main purpose of the mission is to check whether the SF group is somewhat able to reach its destination waypoint and evaluate the average casualties rates.

The mission has been run 5 times for both vanilla and improved AI.

aa2bx.th.jpg

- Improved AI showed a 60% (3/5) success rate.

- Vanilla AI showed a 20% (1/5) success rate.

Improved AI was able to inflict to enemy > 90% casualties rate 3 times out of 5.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Great work so far fabrizio_T.

I have question in those test missions you are not applying your scripts to the enemy AI as well right?

If you do apply them to the enemy AI would the SF group be able to archive similar results considering the lower skill level of the enemy ?

Basically I am asking if you have implemented some sort of skill modifier to be able to use those scripts more effectively yet? or is that dependent on BIS fixing the skill difference issue ?

Share this post


Link to post
Share on other sites
Great work so far fabrizio_T.

I have question in those test missions you are not applying your scripts to the enemy AI as well right?

If you do apply them to the enemy AI would the SF group be able to archive similar results considering the lower skill level of the enemy ?

Basically I am asking if you have implemented some sort of skill modifier to be able to use those scripts more effectively yet? or is that dependent on BIS fixing the skill difference issue ?

Improved AI was never applied to enemy in any examples.

The problem with SKILL is that actually there is very little difference between maximum and minimum skill in terms of spotting time, distance and firing accuracy. Only BIS can fix that effectively (or at least i won't be able to do that).

What i am trying to do here is giving AI some rudiments about "self-preservation" and somewhat better "leadership".

Currently that will improve the same way the behaviour for low and high skilled units.

---

UPDATE: At the moment i'm just stuck with the nasty problem of AI randomly "freezing" and refusing to move towards actual waypoint position.

AI Group leaders (only them) randomly got stuck that way and stall/freeze.

That seems to happen mostly when in combat/stealth mode and GREEN combat mode.

That's happening also with vanilla AI, but rarely.

I am struggling to find a way around of this since friday :(

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Looks like my dream is slowly becoming a sweet reality! Hope you can figure out all the issues and release it very soon!

Share this post


Link to post
Share on other sites

fabrizio_T, do you use setSkill array command? You can set different types of skill with that command and for me it gives a huge difference at least in terms of aimingAccuracy, aimingShake, aimingSpeed. Sorry if that is a silly question and you're familiar with this command (which is most likely), but really, setting the above components of skill to 0.1 in my experience changes the gameplay a lot (much longer firefights, sometimes ridiculusly low accuracy of the AI). I didn't make any tests but I think that amingShake affects the accuracy the most, just like it did in OFP times (it could be achieved by using setDammage command to a negative value).

Anyway your work looks great and I can't wait to try it out. (And I'm also a great fan of crouch run in Arma2, maybe we should form some kind of association ;) ).

Edited by lecholas

Share this post


Link to post
Share on other sites
fabrizio_T, do you use setSkill array command? You can set different types of skill with that command and for me it gives a huge difference at least in terms of aimingAccuracy, aimingShake, aimingSpeed. Sorry if that is a silly question and you're familiar with this command (which is most likely), but really, setting the above components of skill to 0.1 in my experience changes the gameplay a lot (much longer firefights, sometimes ridiculusly low accuracy of the AI). I didn't make any tests but I think that amingShake affects the accuracy the most, just like it did in OFP times (it could be achieved by using setDammage command to a negative value).

Anyway your work looks great and I can't wait to try it out. (And I'm also a great fan of crouch run in Arma2, maybe we should form some kind of association ;) ).

I use "setSkill array" of course.

I agree that varying "aimingShake" makes a lot of difference, but variation on other params have much less effect. Changing spotDistance and spotTime shows almost no difference at all, in my opinion, and that's a problem.

Another point is that minimizing/maximizing the unit SKILL slider in editor

does make close to no difference in terms of unit capability (spotting and accuracy show very little variation), so it's useless now.

I see no reason to force mission editors to set skill params by script for each and every units on the field, so i wish to see that slider fixed.

---------- Post added at 04:51 PM ---------- Previous post was at 03:43 PM ----------

New video online:

Direct Link [FIXED ;), thx MfG Lee ]:

10 min. footage of AI squad flanking and engaging enemy.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

That youtube link goes to profile and asks me to login (cant view it unless) ... have you got a direct link to that specific video without login?

Share this post


Link to post
Share on other sites
That youtube link goes to profile and asks me to login (cant view it unless) ... have you got a direct link to that specific video without login?

MfG Lee

Share this post


Link to post
Share on other sites

MfG Lee

Thankyou sir.

This is beyond superb, watching that looks like a combined effort of MP players SF tactics, this is a winner before its even arrived :)

Edited by mrcash2009

Share this post


Link to post
Share on other sites

Wow that video was great, the script looks awesome! :)

One question though does the AI move, flank shoot back, LOL it looks like they didnt do anything but that just could be me.

First day download for me! :D

Share this post


Link to post
Share on other sites
Didnt shoot

They are 6 SF vs over 20 enemy AI - they try to get through the town without getting killed. Damn impressive if you ask me. If they would shoot instantly (standard BIS) they would surely all die. Its like the SF AI now hold fire if there is too much OPFOR(?). Dont know if thats how the script works - but i think thats the point in the video. :)

Great stuff - cant wait to test it.

Alex

Share this post


Link to post
Share on other sites

UPDATE: At the moment i'm just stuck with the nasty problem of AI randomly "freezing" and refusing to move towards actual waypoint position.

AI Group leaders (only them) randomly got stuck that way and stall/freeze.

i think answer here

I use "setSkill array" of course.

# courage

# commanding

# general

i think this values must be untouchable

and play with other array more carefully))

but really realy impressive and hard job))

I think all who's interested here are ready to help any way))

Share this post


Link to post
Share on other sites
They are 6 SF vs over 20 enemy AI - they try to get through the town without getting killed. Damn impressive if you ask me. If they would shoot instantly (standard BIS) they would surely all die. Its like the SF AI now hold fire if there is too much OPFOR(?). Dont know if thats how the script works - but i think thats the point in the video. :)

Great stuff - cant wait to test it.

Alex

Some days ago i posted a screenshot with a comparison between vanilla and improved AI when SF group is outnumbered. It showed clearly vanilla AI does not stand a chance.

The improved AI holds fire while trying to evaluate enemy strength.

What it does later actually depends on the assigned ROE (Rules of engagement). If ROE ask for some stealthy job, then AI will try to move around and won't engage even a single enemy unit, unless detected.

For example i can modify the way the SF group acts in the mission seen in latest video by simply changing their ROE.

What you've seen is what happens when group is told to hold fire and keep stealth at all costs (they are detected and open fire in the latest part of the video, but that's a different story).

I can make them free to engage and they will probably take down any spare hostile threat, trying to outflank only if outgunned ...

---------- Post added at 11:04 AM ---------- Previous post was at 11:00 AM ----------

i think answer here

# courage

# commanding

# general

i think this values must be untouchable

and play with other array more carefully))

but really realy impressive and hard job))

I think all who's interested here are ready to help any way))

Thx for the hint, but after trading the STEALTH behaviour for

COMBAT behaviour i had no more problems. Some more testing is needed, maybe just a coincidence ...

---------- Post added at 11:05 AM ---------- Previous post was at 11:04 AM ----------

I finally decided to name my set of scripts FlexiAI, for sake of simplicity and lack of a better idea :).

Here i am sharing with you some basic information about scripts internals, i'll try my best to simplify things and hope to be able to give you a general idea on how the whole thing is working.

A. THREAT EVALUATION, SUCCESS PROBABILITY

Any FlexiAI group is regularly collecting information about spotted threats (and friendly groups) into a predefined radius (configurable, Default = 300m.).

Sensible enemy information is stored into a in-memory array named THREATS MATRIX.

The THREATS MATRIX holds many variables defining the number, strength and AP/AT/AA capabilities of each known enemy group.

A similar approach is taken to calculate the strength of the flexiAI group itself, so we have also a friendly STRENGTH MATRIX.

The reference AP/AT/AA capabilities are stored into a "dictionary" file on a per-unit-class basis, so you may tweak these values and are able your own classes.

Nearby friendly and enemy groups (any kind and not necessarily FlexiAI powered) are also accounted in the STRENGTH MATRIX/THREATS MATRIX, with their respective strength reduced by a configurable coefficent (default = 0.5).

Finally SUCCESS PROBABILITY is defined as the result of a (over-simplified) comparison between THREATS MATRIX and STRENGTH MATRIX.

The range for SUCCESS PROBABILITY is always 0 < SUCCESS PROBABILITY < 1, with the upper bound equal to 100% expected success.

B. GROUP STATES

FlexiAI defines a set of "group states", layered on top of vanilla AI, overriding group behaviour and combat mode.

The ordinary states are actually "READY", "CONTACT","ASSAULT", "ENGAGE", "ADVANCE", "PINNED", "RETREAT".

Some "special" states control additional behaviours for logistics, reinforcements and fire support.

Any FlexiAI group defaults to the READY state, basically instructing it to hold fire.

Most states automatically manage dynamic creation of temporary waypoints, that are cleared after use.

C: CONTACT GROUP STATE

A FlexiAI group in READY state that is suddenly detecting enemies is automatically put into CONTACT state.

Group is supposed to hit the dirt, face enemy in line formation and wait there for some more enemies to come in field of view.

"CONTACT" state may time out or exit abruptly if group is detected / attacked.

D. ROE SETTINGS

ROE settings are the "brain" triggering the group states.

ROE settings are defined by 3 different configurable script thresholds, assigned on a per-group basis.

Each threshold defines the (min. or max.) SUCCESS PROBABILITY value triggering the corresponding rule.

_grp_ratio_attack	= 0.75;		// assault if SUCCESS PROBABILITY >= 75%
_grp_ratio_engage	= 0.60;		// engage if SUCCESS PROBABILITY >= 60%
_grp_ratio_retreat	= 0.20;		// withdraw if SUCCESS PROBABILITY <= 20%

_grp_ratio_attack rule

it's a lower bound and should always be equal or higher than _grp_ratio_engage value;

Group will expose itself assaulting frontally and engaging at will, if SUCCESS PROBABILITY >= _grp_ratio_attack;

This rule triggers the ASSAULT group state;

_grp_ratio_engage rule

it's a lower bound and should always be equal or higher than _grp_ratio_retreat value;

Group will open fire while advancing cautiously in cover, if SUCCESS PROBABILITY >= _grp_ratio_engage

This rule triggers the ENGAGE group state;

_grp_ratio_retreat rule

it's an upper bound;

Group will retreat, if SUCCESS PROBABILITY <= _grp_ratio_retreat value;

This rule triggers the RETREAT group state;

Implicit "Advance" rule

We have 3 explicit basic rules: "Assault", "Engage", "Retreat";

Then we have a fourth implicit rule: "Advance".

It is triggered in the range: _grp_ratio_retreat < SUCCESS PROBABILITY < _grp_ratio_engage.

The "Advance" rule is very important, since it triggers both the ADVANCE and PINNED group states (responsible for holding ground and flanking maneuvers).

E. SOME SPECIAL ROE SETTINGS

The ROE settings for the group seen in latest video (

) were:

_grp_ratio_attack	= 1;		// assault if SUCCESS PROBABILITY >= 100% = NEVER triggered
_grp_ratio_engage	= 1;		// engage if SUCCESS PROBABILITY >= 100% = NEVER triggered
_grp_ratio_retreat	= 0;		// withdraw if SUCCESS PROBABILITY <= 0% = NEVER triggered

Quite special, isn't it ;) ?

Here i am basically making AI use only the "Advance" rule, hence triggering only ADVANCE and PINNED group states (as well as READY and CONTACT), so the AI will slowly try to outflank enemy after detection and hold ground/ defend itself when under fire.

F. FORMATION, SPEED AND STANCE

Group formation, speed and units stance are controlled by many different parameters including:

- group state / ROE

- group combat mode

- group behaviour

- timestamp of last shot fired by the gropup

- enemy distance

- enemy awareness

Thx for your time and sorry for my bad english, people ...

Cheers.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Wow, this is very comprehensive. Do I take it that different factions use different values and tactics then? Or is that already modelled into the game? Looking forward to this one! :D

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  

×