Jump to content
Rydygier

HETMAN - Artificial Leader

Recommended Posts

Quote

Do you mind sharing this test mission you are talking about? 

 

Linked already in this post. :) Same link added also in the front page. 

  • Like 1

Share this post


Link to post
Share on other sites

Good to see that HAL is getting love again.

HAL is the best AI commandin script/mod that i know.

:icon_dj:

 

If it is possible. It would be nice that the trigger size for objects define the objective(RydHQ_Obj1 etc.) size for HAL.

Also way to forbit HAL to order troops to go near some places in map or even force them go around. I mean if i put minefield in one place, i would love to tell HAL not to go there. Or some maps got death traps for Ai (Like beketov) where is small lake where AI just drive in and get stuck.

 

And maby one day. This and VCOM AI working side by side. Making arma AI taking over the world. OR at least whole ALTIS.

Share this post


Link to post
Share on other sites

Making radius of the objective area dependent on trigger's size (and/or shape) is logical and good idea, should be doable, we'll see. Blacklisting an area from pathfinding however may be not that doable. HAL designates a waypoint, how a group reaches that waypoint is up to Arma's pathifiding algorithms, and I can't recall right now any way to influence these algorithms via SQF, I'll check that though (there's such functionality in VBS3 IIRC). If not, the only way would be to replace simple waypoint with dense chain of nav points, I could control their positioning - CPU expensive, something, I would prefer to avoid, although there's partially such mechanism for foot infantry movement implemented.  

  • Like 1

Share this post


Link to post
Share on other sites

Cool.

 

Well it would be enough if HAL only dont give waypoints in thoes areas, instead give waypoints go around it. It is just one of those nice to have things.

 

How about Headlles Client?

Share this post


Link to post
Share on other sites
Quote

How about Headlles Client?

 

Don't know really. In fact any HC mumbo-jumbo is completely out of HAL focus, thus should be scripted out of HAL, separatelly. Perhaps something may and should be done in HAL however to make it work with such external scripting, if it doesn't already, not sure, barely touched that topic and this was long time ago. MP scripting never was my speciality. What exactly, in details, HAL should do about HC, that it doesn't?

Share this post


Link to post
Share on other sites
4 minutes ago, Rydygier said:

 

Don't know really. In fact any HC mumbo-jumbo is completely out of HAL focus, thus should be scripted out of HAL, separatelly. Perhaps something may and should be done in HAL however to make it work with such external scripting, if it doesn't already, not sure, barely touched that topic and this was long time ago. MP scripting never was my speciality. What exactly, in details, HAL should do about HC, that it doesn't?

 

Well does HAL work with HC?

I mean can HAL command units who are owned by HC?

I have been thinking to use HC on my coop missions to get those rare Frames. I dont know almost anything HC but that it share cpu work from server.

 

I dont need that HAL run on HC. Just that it can command units what are owned by HC.

 

 

BTW. Is there anything specific to test in that new test version? I try to make some missions with it and force play them in my community :sigh:. Do you have some debug messages in RPT or something what you want to see? (not promising when i have time to arrange these test missions but one day)

 

Share this post


Link to post
Share on other sites

Well, while testing 1.23 you may focus on new things, it brings, besides that it's simple bug hunt, scripting errors in particular, no special debug logs, but most scripting errors leave a trace in RPT - that's valuable info. 

 

BTW, since I'm not really certain, if HAL can properly control units controlled by (local to?) HC, or not, if you wish, you may test that too. Run some scenario, where HAL operates as usual, from the server, but some of controlled units/groups are passed to the HC. Even, if I would like, I can't really test that myself, since AFAIK HC by definition means two PCs, with own Arma 3 copy each? I own only one. If two machines are indeed required, for me it is hard to achieve anything in that field (apart from current lack of time of course), but maybe all will be working just fine as is, who knows. 

Share this post


Link to post
Share on other sites

AFAIK you dont need a 2nd copy of Arma3 to run an HC (however you do need a 2nd PC for the server).  It is the equivalent of running a dedi server.

Share this post


Link to post
Share on other sites
4 hours ago, kremator said:

AFAIK you dont need a 2nd copy of Arma3 to run an HC (however you do need a 2nd PC for the server).  It is the equivalent of running a dedi server.

 

Not 100% accurate.

You can run a dedicated server, a HC and your regular client on one single PC with one single licence of Arma 3.

Each will use one core and, as most modern CPU have 4 cores at least, it won't be an issue at all. 

Share this post


Link to post
Share on other sites

Then there's a hope, I'll be able to test that too some day. 

Share this post


Link to post
Share on other sites
55 minutes ago, 1212PDMCDMPPM said:

You can run a dedicated server, a HC and your regular client on one single PC with one single licence of Arma 3.

I wouldn't recommend that.  Your machine you run like shit.  Perhaps this IS a good way to test the 3FPS bug :)

 

 

Share this post


Link to post
Share on other sites
25 minutes ago, kremator said:

I wouldn't recommend that.  Your machine you run like shit.  Perhaps this IS a good way to test the 3FPS bug :)

 

 

 

I'm not saying you should do that to host a 64 player server. But to test missions, scripts, addons...etc in a real MP env with HC, it's perfectly fine.

And again, as long as you have 16 GB of RAM, it should run without issue. Remember that Arma is unable to use more than one core.

Many people are running multiple servers or server+HC on the same hardware in real MP env. Yo can check the official Arma discord, server admin channel if you like.

Share this post


Link to post
Share on other sites

 

 1st time I tried this got bored following a squad leader who kept reversing direction for no apparent reason -guess we were on patrol. Gave it another whirl and really do like it - it just takes patience to get into it. One thing I really like and which SaOK uses as well as the the text hints on the map which give the player an idea of whats going on with other squads -this is a huge much needed add for an element of cohesion on what the hell is going on and I wish BI themselves would use it. Obviously radio calls and real voices would be too expensive for the amount of circumstances but text is cheap and can be just as useful. Id like to see it expanded upon or learn how to in Hetman, all the way down to the squad level. For instance in the above first impression of just roaming about following the ai squad leader, have him say in text bubble - "looks like were back to patrol boys" with other "Groan" and "F**** this" among squaddies :D

 

 Question: How are you filtering units such as AT soldiers AA soldiers etc from among mods? I use a 2000 lines database of units from all mods to try and list them all am wondering did I use a fools errand? Looked thru scripts and only spotted Vanilla list of units.

Share this post


Link to post
Share on other sites
On 3/12/2017 at 0:44 PM, kremator said:

I wouldn't recommend that.  Your machine you run like shit.  Perhaps this IS a good way to test the 3FPS bug :)

 

 

 

Not necessarily. In most cases, there is sufficient idle CPU and memory to do this without issues. Often, people even report better performance compared to a single instance of Arma 3 handling everything. Give it a whirl.

  • Like 1

Share this post


Link to post
Share on other sites
Quote

 

Id like to see it expanded upon or learn how to in Hetman, all the way down to the squad level. For instance in the above first impression of just roaming about following the ai squad leader, have him say in text bubble - "looks like were back to patrol boys" with other "Groan" and "F**** this" among squaddies :D

 

 

 

 

I like the idea, and it seems doable, just would require per frame loop to handle text displayed in 3D, over head. Something to think about. 

 

Quote

 Question: How are you filtering units such as AT soldiers AA soldiers etc from among mods? I use a 2000 lines database of units from all mods to try and list them all am wondering did I use a fools errand?

 

I'm using filters going through every unit's config entries, looking for some crucial values there. That's primary, automatic way. As a backup there are manually filled RHQ categories (primary way does same, just autonomously), where user may put class name of the unit to tag all units of that class for HAL as, say AT infantry or MBT or whatever. It's useful for example for more exotic mods, where config may be weird and misleading for auto-filling algorithm, which assumes typical, vanilla-like config. As for automatic way, it may looks for example like this:

 

Spoiler

							_mag = _mgs select 0;
							_ammo = getText (configfile >> "CfgMagazines" >> _mag >> "ammo");
							_ammoC = configfile >> "CfgAmmo" >> _ammo;
							
							_isAA = ((getNumber (_ammoC >> "airLock")) > 1) or {((getNumber (_ammoC >> "airLock")) > 0) and {((getNumber (_ammoC >> "irLock")) > 0)}};
							
							if not (_isAA) then
								{
								_isAT = ((((getNumber (_ammoC >> "irLock")) + (getNumber (_ammoC >> "laserLock"))) > 0) and {((getNumber (_ammoC >> "airLock")) < 2)})
								};
							
							if (not (_isAT) and {not (_isAA)}) then
								{
								
									{
									_ammo = getText (configfile >> "CfgMagazines" >> _x >> "ammo");
									_ammoC = configfile >> "CfgAmmo" >> _ammo;
									_actHit = getNumber (_ammoC >> "hit");

									if (_actHit > 150) exitWith {_isAT = true}
									}
								foreach _mgs
								};
							
							if (_isAT) then 
								{
								RHQ_ATInf pushBack _veh
								};
								
							if (_isAA) then  
								{
								RHQ_AAInf pushBack _veh
								};

 

 

That's for AT and AA infantry searched amongst infantry/soft vehicles in general. Goes through every magazine, takes ammo class used, then checks, if there's defined special property in this ammo class config used by homing AA/AT. If not, checks for this ammo "hit" value, and if high enough - passes it as AT too. There are possible various approaches often. Whole code pasted in this post

  • Like 1

Share this post


Link to post
Share on other sites
On 3/8/2017 at 9:58 AM, Rydygier said:

with empty "to do" queue, I'll be able to think further about something new.

 

What about : alternative ("Eastern Bloc" like) attack doctrine mode (?); (wip: 1.?)

 

What was the idea for that?

 

I've been playing HAL 1.23 on A3 1.68 all day and so far no errors.

 + I did not get stuck disembarking / boarding our truck yet (happened several times in HWS missions)

 + The UAV recon feature works great

 + I like the DefRange variable, making it smaller to keep everyone inside a town worked well

 

The only thing I can't quite get is RydHQ_Berserk, where the LeaderHQ seems to still give up after the first few resets, even with Muu set to 0. I'm guessing he's looking for what to do with what he has, and if half of his groups are dead he can't quite figure out who to send where?  I'm trying to configure a leader who will eventually send every last group to the target.

Share this post


Link to post
Share on other sites

Great. :)

 

Quote

What was the idea for that?

 

That's an old request to make alternative doctrine for HAL - Soviet like, based on echelons (waves) "steamroller" kind of thing with heaviest push, where enemy is weakest etc. I've started this, but so far didn't finished. It's like writing additional 1/4 of HAL or, in other words, writing another mind for HAL decison-making.  Maybe someday...

 

Berserk:

 

Quote

RydHQ_Berserk = false if true, Leader will keep offensive stance regardless of circumstancies. This will overwrite also RydHQ_Order = “DEFEND” setting;

 

So basically HAL will never ever go into defensive mode if this is true, regardless morale, odds, losses... It will stay in the offensive mode. That's the idea (works? I can review that, if not). But staying in the offensive mode wouldn't mean, he'll send all, he has under control no matter what, like rabid. Combat ineffectve groups will be still excluded, reserves will be kept, groups facing too much opposition around may be withdrawn etc. It will keep normal behavior pattern, just always staying in the offensive mode. 

 

You can try maximize RydHQ_Recklessness, also minimize circumspection or use this (define both as 0):


 

Quote

 

RydHQ_ReconReserve = 0.3 * (0.5 + RydHQ_Circumspection)  multiplication of total number of available in given cycle recon capable groups by this value will return number of such groups, that HAL will keep as recon reserve;

 

RydHQ_AttackReserve = 0.5 * (0.5 + (RydHQ_Circumspection/1.5))  multiplication of total number of available in given cycle combat effective groups by this value will return number of such groups, that HAL will keep as main reserve (part of them may be used for main flanking maneuver);

 

 

 

 

To force reserves to 0, and set to 0 also that:

 

Quote

RydHQ_Withdraw = 1 – multiplier of needed “danger level” (indicated in “debugII” mode as number at group’s position) for tactical withdrawal overwhelmed groups. The higher value, the bigger danger is needed for withdrawing. If set to 0 – withdrawal is turned off;

 

but there's no way to make him use combat ineffective groups (no ammo, no fuel, too many/sewere wounded, too many dead), unless you wish to edit HQOrders.sqf. 

Share this post


Link to post
Share on other sites

No errors for me too.

 

Our server HC is broken (nobody rembered to use it and now there is too much dust over it) Soo maby later this month i have chance to test HAL and HC in dedicated.

 

 

I like that we have now way to set the range for defence or attack.

But instead of multipliers. Would it be easier just to set exact range instead ( RydHQ_DefRange = 500; //  defensive perimeter sizes is now 500 meters)

I mean. I have no idea what default size is so i can just guess what multiplier is good.

 

 

Is there reason for RydHQ_Front go false when HAL start?

I have defined RydHQ_Front = True; in init.sqf, But after HAL say "Good morning, Dave". It goes False again.

I have one leader (LeaderHQ) and trigger named HET_FA.

I get the green marker for the front but that leader still give waypoints outside of that area.

So does this works as intended? or im doing something wrong?

Share this post


Link to post
Share on other sites
Quote

ut instead of multipliers. Would it be easier just to set exact range instead ( RydHQ_DefRange = 500; //  defensive perimeter sizes is now 500 meters)

 

Vanilla ranges, except garrisoning, depend on number of groups in given perimeter, so it changes. There's no hardcoded number, but formula, and the outcome is multiplied. Technically however, I can add another variable(s) with plain number, that would overwrite any formula outcome with set value. Similar for initial flanking position from target distancies - exact value depends on some factors. 

 

Quote

Is there reason for RydHQ_Front go false when HAL start?

 

Yep, a typo in my code, that makes anything, you define, overwritten with false. I'll fix this, till then try workaround: apart from RydHQ_Front, define also RydHQ_FrontA with any value (doesn't matter, anything but nil), eg. RydHQ_FrontA = true; 

  • Like 1

Share this post


Link to post
Share on other sites
22 hours ago, Rydygier said:

RydHQ_ReconReserve = 0.3 * (0.5 + RydHQ_Circumspection) 

RydHQ_AttackReserve = 0.5 * (0.5 + (RydHQ_Circumspection/1.5)) 

Thanks for explaining those.

Is there a way I can do a check for the total number of remaining effective groups, like: when (¿) RydHQ_EffectiveGroups = 0 (?), or when the number of capable groups for any mission = 0, switch off HAL, and doMove all of them to a marker, for example?  

 

Also, straight from the RPT:

5:52:21 Warning Message: Radio message HAC_OrdConf1 not found

and

19:54:41 Error in expression <etSkill ["spotTime",1]
}
foreach (units _gUAV);
_excl = _HQ getVariable ["RydHQ>
19:54:41   Error position: <_gUAV);
_excl = _HQ getVariable ["RydHQ>
19:54:41   Error Undefined variable in expression: _guav

 

 

Share this post


Link to post
Share on other sites
Quote

Also, straight from the RPT:

 

Thanks, will be helpful. 

 

Quote

Is there a way I can do a check for the total number of remaining effective groups, like:

 

Indirectly should be possible. 

 

_nonEffective = (group LeaderHQ) getVariable ["RydHQ_Exhausted",[]];

 

will give you a current list of non-effective groups (according to HAL's judgement). Not sure, but hopefully I'm not using this variable to store any other groups, so should be reliable. But also not all may be sent there, IIRC excluded may be natively combat ineffective (eg unarmed) or maybe also designated for recon. 

 

_allControlledGroups = (group LeaderHQ) getVariable ["RydHQ_Friends",[]];

 

should give all controlled at the moment groups. Count both arrays, subtract noneffective count from all count. 

 

OR:

 

Directly.

 

_combatEffective = (group LeaderHQ) getVariable ["RydHQ_CombatAv",[]];

 

IIRC in this array HAL stores groups available for recon/attack tasks. But without those designated as reserve sadly (and no obtainable array for reserve). 

 

So no perfect way, it seems, unless you set reserve to 0. 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Will AI leaders register units spawned in-mission for their side and assume control over them?

I'm trying to make a mission where an ambient battle is taking place, with two enemy leaders fighting over a town with continuously respawning groups.

Share this post


Link to post
Share on other sites
Quote

Will AI leaders register units spawned in-mission for their side and assume control over them?

 

Yes. In unlimited (default) control mode - just like that, in the next HAL's decision cycle, in limited mode - spawned groups has to be added to the pool of controlled groups via proper way described in manual (eg RydHQ_Included array). 

 

Also note, new groups will be considered as reinforcements, and may positively affect morale. 

  • Like 1

Share this post


Link to post
Share on other sites

While you're here, do you know how HAL will react to groups being affected by the BIS dynamic simulation system?

Will de-simmed groups be viewed as lost/destroyed?

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

×