Jump to content
Sign in to follow this  
fabrizio_t

FlexiAI (WIP) discussion

Recommended Posts

Wow I got alot of quotes from that, I see alot of people on here are Extremely Biased.

The quote was because you posted as much as to say the AI in total is better than any specifics.

As regards biased, not realy, Its just that simply saying its better is subjective and counter to what this thread is all about, improving arma2. Im sure theres some neat things with DR, but my interest is firmly here, no matter how good DR gets .. it wont do what I want in Arma2 .. which is what I want and the sim I own :)

The difference here is Vanilla AI in Arma2 is not as bad as DR in certain ways, and its being improved and this thread/mod is making it even more-so ontop of what we already have.

Edited by mrcash2009

Share this post


Link to post
Share on other sites
The quote was because you posted as much as to say the AI in total is better than any specifics.

As regards biased, not realy, Its just that simply saying its better is subjective and counter to what this thread is all about, improving arma2. Im sure theres some neat things with DR, but my interest is firmly here, no matter how good DR gets .. it wont do what I want in Arma2 .. which is what I want and the sim I own :)

The difference here is Vanilla AI in Arma2 is not as bad as DR in certain ways, and its being improved and this thread/mod is making it even more-so ontop of what we already have.

Im with you man, but if it wasnt for that AI mod for OFP DR I would've already thrown the game away and uninstalled it from my HDD.

Im hard at work converting more friends to buy Arma 2, because I dont have a Squad to play with right now and thats all im missing, a Sqaud who loves to play Small Teambased Coop missions using authentic military tactics and COC. :D

Share this post


Link to post
Share on other sites
I've seen my AI squaddies in Arma2 aiming out towards the sea when the only known threat were in the opposite direction.

Yes that's weird.

I am trying to address this specific problem.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

How did you solve the problem that lider group ruch to enemy without waiting for rest od the team.

How did you make your units to by so close to each other?

Last question, how did you do that your team do eg crouch, i meam your team crouch when spot enemy or when lider said it through the radio? All commends to change behaviour or formation or state is triggered by situation or just lider is "calculating" how to act and send proper message through the radio and team just make the orders?

1. (just pseudo-code)

...

_targets = lider nearTargets 300;

_enem = //here I have only enemies from _targets

if(count _enem > 0) then {

{_x setUnitPos "DOWN"} forEach _units;};

...

or

...

_targets = lider nearTargets 300;

_enem = //here I have only enemies from _targets

if(count _enem > 0) then {

//lider give order through the radiu to stay down (sideRadio or groupRadio ??)

...

---------- Post added at 12:25 PM ---------- Previous post was at 12:22 PM ----------

How you collect info about AT/AP/AA capabilities?? is there any command or just study enemy weapons??

Share this post


Link to post
Share on other sites
How did you solve the problem that lider group ruch to enemy without waiting for rest od the team.

How did you make your units to by so close to each other?

Last question, how did you do that your team do eg crouch, i meam your team crouch when spot enemy or when lider said it through the radio? All commends to change behaviour or formation or state is triggered by situation or just lider is "calculating" how to act and send proper message through the radio and team just make the orders?

1. (just pseudo-code)

...

_targets = lider nearTargets 300;

_enem = //here I have only enemies from _targets

if(count _enem > 0) then {

{_x setUnitPos "DOWN"} forEach _units;};

...

or

...

_targets = lider nearTargets 300;

_enem = //here I have only enemies from _targets

if(count _enem > 0) then {

//lider give order through the radiu to stay down (sideRadio or groupRadio ??)

...

---------- Post added at 12:25 PM ---------- Previous post was at 12:22 PM ----------

How you collect info about AT/AP/AA capabilities?? is there any command or just study enemy weapons??

I don't care much about radio messages and i wouldn't add new communications, they're already too many.

Just code like in your first example, then you'll be able to eventually build other "minor" features upon that, if really needed.

About keeping group cohesion: plenty of ways to do that, my very personal approach is keeping things as-simple-as-possible, so i do it with a basic 3 steps routine:

1) "Regroup routine": issue a follow order to all units when nearest unit distance from leader is over a certain threshold (dynamically changing based on many factors);

2) "Follow routine":issue a follow order to any units whose distance is over a certain threshold (dynamically changing based on many factors)

3) In the meantime, for both cases, you'll have the leader to wait: easy little magic is set "forceSpeed=0" for him;

So it's as simple as that: "regroup" routine takes care to force the group as a whole to stay close to leader.

"Follow" routine will make farthest units fall back in formation gracefully one by one (while others keep covering), a cheap inverse bounding-overwatch procedure. ;)

About AT/AP/AA capabilities: i have found no reliable config info to retrieve this kind of data, so i created my own "dictionary" file, containing a simplified set of data for each and every unit classes. This way you can fine tune any existing units stats and add your own new units.

I have a standard format to collect this data, just a simple 5 members array, so for example:

"Ins_Soldier_AA", [0, 0.7, 0, 0, 0.7]

describes the capabilities of a insurgent AA soldier in the format [A, AA, T, AT, P/AP], meaning:

A(AIR)= 0: unit is not a AIR unit. The value is >0 for air units and describes a DEFENCE strength vs. AA, max = 1;

AA(ANTI-AIR) = 0.7: unit has 0.7 anti-air "ATTACK strength" and it's theoretically able to destroy any AIR units having A <= 0.7 and damaging others;

T(TANK) = 0: unit is not a ARMORED unit. The value is > 0 for armor and describes a DEFENCE strength vs. AT, max = 1;

AT(ANTI-TANK) = 0: units has zero anti-tank "ATTACK strength";

P/AP(PERSONNEL/ANTI-PERSONNEL) = 0.7: this unit has both 0.7 anti-personnel "ATTACK strength" and "DEFENSE strength";

An additional 3 members array stores AT/AP/AA information about some weapons (machineguns, AT and AA weapons) and it's intended as a complement for the first one in very particular cases.

As you can see the values are arbitrary and need some careful tuning, but all-in-all the solution in compact, simple and is flexible enough for my own needs.

What's still a bit complex is the way group strength "matrixes" (built upon these arrays) are actually compared.

I am working on simplifying/streamlining this comparison, going for a "qualitative" rather than a "quantitative" approach.

There are probably dozens of different (maybe better) ways to handle AI mechanics, i always try to go for the simplest as a design choice, for sake of better reliability ad lesser resources footprint.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Beta patch out.

ftp://downloads.bistudio.com/arma2.com/update/beta/ARMA2_Build_60141.zip

[60129] Fixed: AI subordinates now move faster (use less cover) to catch up when leader is way ahead of them.

[60102] Fixed: AI subordinates should now respect formation more when moving in combat.

[60101] Fixed: Group leader was often running far ahead alone in combat.

[60092] Fixed: AI leader did not wait for a player to cover him when moving in combat.

It sems FlexiAI won't need to fix these issues anymore :)

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

First 601141 impressions:

- AI group movement generally vastly improved

- Units keep cohesion

- Units keep formation

- bounding overwatch working straight out-of-the box (try FILE formation and see)

Still perfectible, i've seen many glitches, but overall a giant leap in fire&movement.

Trash your previous beta versions and install it promptly ;)

Still two big gripes :

- AI targets detection still not fixed;

- AI units still fail to return fire efficiently in many circumstances;

---------- Post added at 07:10 PM ---------- Previous post was at 07:06 PM ----------

You know if these patches create some problems with mods ??

I don't think so, but It really depends on what mods are supposed to do, better ask to authors.

In the case of FlexiAI the new behaviour duplicates some features that right now i am going to strip.

Better for overall performance and reliability.

Share this post


Link to post
Share on other sites

Well, nice to see that BIS does some of the work with the AI, so you can work on expanding its functionality rather than repairing it :)

Share this post


Link to post
Share on other sites

Hmmmm...

[*] Support: AI group issues calls for artillery strikes or CAS;

Can this be deactivated? I usually run my own scripts for stuff like this.

Share this post


Link to post
Share on other sites
Hmmmm...

[*] Support: AI group issues calls for artillery strikes or CAS;

Can this be deactivated? I usually run my own scripts for stuff like this.

Of course. Up to you.

Share this post


Link to post
Share on other sites

Was messing around with Troopmon to test your first scenario of a squad set to Never Fire and a simple move command which skirts near a much larger East squad. The West squad does not seem to know what to do once they spot East even and actual draw fire rather than proceeding to their waypoint.

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/watch?v=8sBxo5D7kMc&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=8sBxo5D7kMc&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Share this post


Link to post
Share on other sites
Was messing around with Troopmon to test your first scenario of a squad set to Never Fire and a simple move command which skirts near a much larger East squad. The West squad does not seem to know what to do once they spot East even and actual draw fire rather than proceeding to their waypoint.

Yes,vanilla AI groups become somewhat "confused" when detecting some nearby enemies while ordered to hold fire. Normally they end up being detected and just start a firefight. FlexiAI has its own routines to try overcoming this problem.

Update:

Yesterday i worked on testing thoroughly FlexiAI suppression fire feature in "brute force" attacks, while in the meantime checking its resources (CPU) foorprint .

I simulated a frontal attack scenario with a FlexiAI powered USMC platoon (around 60 marines 80% skill ) attacking with squads in-line a little town presidiated by overhelming enemy forces (around 130 insurgents 40% skilled and some pickups).

Around 200 men and half a dozen vehicles where on the field.

Enemy got bigger numbers and plenty of cover.

Marines had to open their way frontally in the open, relying on just the advantage of better skill.

I've run this scenario with both Vanilla and FlexiAI.

In both cases it was a pitched battle, in case of FlexiAI it lasted more than 45 minutes.

I'll eventually post some details later, for the moment i'll results were somewhat encouraging.

About CPU footprint: FlexiAI overhead was negligible with 60 men handled, i was not even able to tell the difference in FPS between vanilla and FlexiAI.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites
About CPU footprint: FlexiAI overhead was negligible with 60 men handled, i was not even able to tell the difference in FPS between vanilla and FlexiAI.

Seems lovely to me :p

I wish I could use it for groups led by Special Forces by default.

Share this post


Link to post
Share on other sites

just AI? really impressive :icon_eek:, but if you will give them orders, they will perform? in what way will affect the order given by players (with FlexAI mod enabled)?

Share this post


Link to post
Share on other sites
just AI? really impressive :icon_eek:, but if you will give them orders, they will perform? in what way will affect the order given by players (with FlexAI mod enabled)?

FlexiAI is targeted to AI led groups.

On a sidenote, since i hate micromanaging things, i am also willing to activate some FlexiAI-like features for Player led groups (automatic formation and stance switch, automatic hold fire, automatic catchup with leader), but that's a whole different story / many people won't like it ...

Share this post


Link to post
Share on other sites
On a sidenote, since i hate micromanaging things, i am also willing to activate some FlexiAI-like features for Player led groups (automatic formation and stance switch, automatic hold fire, automatic catchup with leader), but that's a whole different story / many people won't like it ...

Yes I can see that splitting people into 2 camps, but maybe for later it could be implemented as something you can "Opt out" of config wise?

Also thinking about this how does/would FlexAI initialise itself in a high command type situation? I guess via script in the leaders init as normal?

What about testing and having it detect and attach itself using the "hybrid command" system, where you can pick a team and break them off as high command ai teams on the fly .. could this work or will it not attach itself to the teams leader if not set on mission init?

If this would work dynamically with Hybrid Command then I will send you my friends wife for 1 year of funtimes :)

Share this post


Link to post
Share on other sites
Yes I can see that splitting people into 2 camps, but maybe for later it could be implemented as something you can "Opt out" of config wise?

Yes, "Later" being the key word :)

Also thinking about this how does/would FlexAI initialise itself in a high command type situation? I guess via script in the leaders init as normal?

Well, actually FlexiAI activation is a 2 steps process:

1) you add the FlexiAI module and sync it to a group leader

2) you type some basic config info into leader's init line (Mainly you tell FlexiAI the type of the group; 4 alternative types are allowed: INFANTRY, TAXI, CAS, ARTILLERY). Syntax is just straightforward:

Example of a minimal Artillery group init line:

[group this] setvariable ["FLEXIAI_type", "ARTILLERY"];

What about testing and having it detect and attach itself using the "hybrid command" system, where you can pick a team and break them off as high command ai teams on the fly .. could this work or will it not attach itself to the teams leader if not set on mission init?

If this would work dynamically with Hybrid Command then I will send you my friends wife for 1 year of funtimes :)

Splitting and merging of groups is not handled by the current very preliminary buggy FlexiAI build, but i'll look into this later.

Further speculation:

If "hybrid command" author will think that's worth his effort, the feature you're requesting shall be possibily handled calling a couple of simple .sqf instructions upon group split/merge function execution (first instruction for FlexiAI module sync, second for inherited FlexiAI config info) .

Thx for your kind offer, but 1 wife is already enough to me :)

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  

×