Jump to content
Sign in to follow this  
Rydygier

ARTEMIS - Hunting Instinct AI algorithm

Recommended Posts

ARTEMIS - Hunting Instinct

1. Description

ARTEMIS is an AI algorithm that simulates animal-like hunting behaviour of controlled unit (Hunter) against chosen units (Prey). It is based on
for Arma 2.

This code does some heavy calculations, was tested for single Hunter, and this is recommended number of controlled units.

ARTEMIS is designated as opponent for player, but should work well also against AI.

Hunter has to his disposal two customizable senses: sight and smell.

Sight is specified by two parameters: light sensitivity and movement sensitivity. It decides, how easily Hunter will spot the Prey according on daytime, weather, size, speed, background (sky or not, surrounding terrain) and knowledge factor (memory).

Smell helps to follow not visible Prey by its trail. Each Prey will leave "footprints", that Hunter can scent. Old footprints will be erased, also rain gives small chance for removing some parts of the trail. Smell (range) is strongly affected by wind (direction and strength).

If there is no Prey nor trail known, Hunter will loiter randomly starting from last known position of last prey.

If Hunter see the Prey, his behaviour depends on situation. His goal is surprise attack, prefferably from behind. Will charge anyway, if close, but otherwise will approach, fast, or stealty, only, when flanking the Prey (out of Prey's FOV). If catched in the FOV depends on situation can hide low or run out of LOS, then try to outflank keeping out of sight.

Is most dangerous at night, in the dense forest when visiblity is poor.

Hunter strikes with bare hands (melee).

2. Usage

Package contains two demo missions, one per code version (pure SQF and FSM&SQF mix, both should give same or nearly same effect, just different implementation).

Init.sqf files of these missions provide some details about setup and default parameters along with some simple debug option for testing purposes in form of map markers:

RYDHnt_Dbg = true;//debug

//Parameters:
//
//1. Hunter unit (object)
//2. Hunted unit(s) (array)
//3. Smell (positive number)
//4. Eyes sensitivity: [light factor,movement factor] (array of positive numbers)
//5. Loiter radius - unlimited, when 0. (number)
//6. Hunter's strike strength - multiplier of damage dealt by Hunter each strike (number)
//7. Hunter's min/max random placement radius from first hunted. Leave empty array to disable

[hunter1,[hunted1],3,[1.5,1.5],200,1,[60,150]] execVM "Artemis\ArtemisInit.sqf";

Put these missions where all unpacked missions are stored an preview in editor. You are a prey here.

3. Known issues

- Artemis AI would work best with some FSM-less agile and fast animal unit allowing same degree of AI control, as unarmed soldier models. There is no such model known to me, so in the demos are used simple civilians, that are sometimes a bit clumsy.

- So far not found in Arma 3 animations proper for bare hand strike, thus strange looking hunter's melee attacks.

Enjoy

Script was created "by player for players", source scripts you can freely modify, copy, "cannibalize", to use in your projects. It is released under APL-SA license. I'll be grateful for notification about each such usage.

Edited by Rydygier

Share this post


Link to post
Share on other sites
Guest

Thanks for the headsup about the release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Thanks for sharing this.

I have Ryd_Hunter, is this the same or slightly different ?

I have been playing around a little with hunter, and its proving very interesting. There also seems to be no real performance hit, although I think you were expecting some, maybe ?

Could this be adapted for a spotter and sniper duo, never mind I'll play around some more.

Thanks, great thing, very interesting.

Share this post


Link to post
Share on other sites

Thanks, Foxhound. :)

I have Ryd_Hunter, is this the same or slightly different ?

Do you refer perhaps to the addon included in Sneaky Hunter AI for A2? It is only helper customizing unit used in demo there, so better works with the script. Artemis is slightly modified Sneaky Hunter ported to A3.

There also seems to be no real performance hit

Yes, calculations are really heavy sometimes (code can rapidly spawn hundreds of locations, perform LOS scan per each and delete all), but all is done via SQF, so no performance hit, only uses more CPU power given for scheduled scripts, so possibly may cause exec delays if used with other scripts.

Could this be adapted for a spotter and sniper duo,

I think so, still, animal AI demands another approach than human-like, so adaptation will need some deep changes here and there.

Share this post


Link to post
Share on other sites
Thanks, Foxhound. :)

Do you refer perhaps to the addon included in Sneaky Hunter AI for A2? It is only helper customizing unit used in demo there, so better works with the script. Artemis is slightly modified Sneaky Hunter ported to A3.

Yes, calculations are really heavy sometimes (code can rapidly spawn hundreds of locations, perform LOS scan per each and delete all), but all is done via SQF, so no performance hit, only uses more CPU power given for scheduled scripts, so possibly may cause exec delays if used with other scripts.

I think so, still, animal AI demands another approach than human-like, so adaptation will need some deep changes here and there.

Thanks for your reply.:)

Share this post


Link to post
Share on other sites

A most awesome piece of code.
 

Share this post


Link to post
Share on other sites

You have very interesting projects, Ryd. Will test it.

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  

×