Jump to content

Autonomous CAP and GCI AI fighter script


SNAFU

Recommended Posts

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Make sure you are not loading the MIST version shipped with DAWS. Unless he has updated to the latest version.

 

 

It should be so, but as you can see in DAWS thread there seems to be some issues regarding using the DAWS version of MIST for other reason.

 

 

Otherwise loading another mist could cause issue to DAWS, but that's a different problem.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

  • 1 month later...

Agree with Pikey. MOOSE is your best bet these days. You would have to clone the current GCI script and then rewrite big chunks of it to end up with a analogue for CAS missions. Mainly in the detection side of things as the current script is completely geared to air contacts. lukrop hasn't been back to do anything with GCICAP for something like a year now nor has he responded to any of the questions people ask from time to time so I believe he's wandered off to other things. If I ever came back to it I would be trying to work with Flightcontrol and convert the whole thing to a group of MOOSE modules/classes.

Link to comment
Share on other sites

fwiw, I've created basic GCICAP in Moose with a few lines and an interceptor script with another. The CAS stuff has been quite mature in MOOSE for a long time now http://flightcontrol-master.github.io/MOOSE/Documentation/AI_Cas.html and there are a lot of inbuilt functions for doing it how you want. The demo missions need to be downloaded from https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases .

CAS-001 is 22 lines of user code, most of that was optional messages.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

  • 2 weeks later...

soooooooooooooooooooooo...

 

2.1 broke GCICAP. I spent a few hours trying to get my melon wrapped around the CAP function of Moose, Loaded the example mission in 1.5...and tried to replicate it in 2.1...

 

Nothing. Script seems to load but the subject aircraft do not spawn....

Anybody wanna offer some advice and help?

 

Sierra

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

soooooooooooooooooooooo...

 

2.1 broke GCICAP. I spent a few hours trying to get my melon wrapped around the CAP function of Moose, Loaded the example mission in 1.5...and tried to replicate it in 2.1...

 

Nothing. Scrip[t seems to load but the subject aircraft do not spawn....

Anybody wanna offer some advice and help?

 

Sierra

 

The MOOSE CAP, CAS and BAI works for Normandy. Some guys around are already using it and it is fantastic, in combination with AI_BALANCER and the TASKING. And the AI_FORMATION class is stunning ... :-)

 

What you need is a little assistence... What I suggest you do, is drop me a PM showing your email address, so I can join you up at our slack community.

 

Also, there are demonstration missions that explain how CAP needs to be modelled. It may not be perfect to what you need, so please drop me your email and we can chat / help around it.

 

Thanks for your interest in the framework!

 

Sven

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Agree with Pikey. MOOSE is your best bet these days. You would have to clone the current GCI script and then rewrite big chunks of it to end up with a analogue for CAS missions. Mainly in the detection side of things as the current script is completely geared to air contacts. lukrop hasn't been back to do anything with GCICAP for something like a year now nor has he responded to any of the questions people ask from time to time so I believe he's wandered off to other things. If I ever came back to it I would be trying to work with Flightcontrol and convert the whole thing to a group of MOOSE modules/classes.

 

I am a few days off releasing Air 2 Air tasking implementing INTERCEPT, ENGAGE and SWEEP tasking, which are dynamically allocated based on detection results done by EWR installations and AWACS.

This on top of the already present Air 2 Ground tasking implementation for CAS, BAI, SEAD...

 

This will be MOOSE release 2.2, so please a few days patience. I am heavily testing this stuff, because this release also comes with a whole new lot like settings management (imperial, metric), (LL, MGRS, BR BRA, BULLS) and now also for WWII an appropriate communication mechanism from that era.

 

And before I forget to mention, a lot of this came from the functional inputs and experience from the MOOSE community members, like Pikey, LooseCannon, Mechanist, WingThor, ... to name a few... Thanks guys!

 

Sven

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

I am thinking of writing a CGICAP replacement using Moose. One can already do it themselves with Moose pretty easily but I'm thinking more along the lines of a template mission that folks can grab, define what they need to ina few lines of code and Moose does the rest.

 

I just need to find the time to do this.

 

Maybe if I can work with Pikey we can get something out sooner.

Link to comment
Share on other sites

AI_A2A_DISPATCHER

 

Been thinking a bit how to "introduce" the developments that I'm doing at the moment in terms of a GCICAP in the MOOSE framework ...

In terms of the feedback that i am getting from various sources, would like to see what boundaries people are having with scripting...

I mean, everybody can import a lua file in a mission, correct?

Well, if you would use MOOSE, I will ask you to import two files:

1. The Moose.lua file, which contains the base code of the MOOSE framework.

2. Your script file, which contains your mission script logic.

 

What I though to do, is to show how a CGICAP like mission would look like using MOOSE...

 

 

So, got this prototype mission setup with a couple of units

 

Glo5NK.jpgpoKDXTUij

Glo5NK.jpg

This is the mission script:

EWR = DETECTION_AREAS:New( SET_GROUP:New():FilterPrefixes("AWACS"):FilterStart(), 6000 )
EWR:SetFriendliesRange( 30000 )

A2ADispatcher = AI_A2A_DISPATCHER:New( EWR )
A2ADispatcher:SetCAP( "CAP A", SPAWN:New( "CAP A" ):InitLimit( 10, 20 ), ZONE:New( "Patrol Zone" ), 500, 1000, 500, 600 )
A2ADispatcher:SetINTERCEPT( "Intercept Mineralnye", SPAWN:New( "INTERCEPT A" ), 900, 1200 )

Let me first promise you, this is not hard, a couple of lines ...

You'll need to learn a few things, but that would be the same with GCICAP.

People don't like change, but do if it is useful.

Well, if you're open to learn and help me, then consider the following.

 

EWR = DETECTION_AREAS:New( SET_GROUP:New():FilterPrefixes("AWACS"):FilterStart(), 6000 )

The above code will setup a detection. In the demo mission, an AWACS plane that if flying around and will act as an EWR.

 

The DETECTION_AREAS is a "class" that models the detection and grouping mechanism that is applied. That is, this detection mechanism will group the detected objects per area, and will report those areas.

Each area will have several units in there. Other detection methods exist with respective detection classes: DETECTION_UNITS groups detected units "per unit", thus each group has one unit... DETECTION_TYPES groups detected units per "type". It can be that other DETECTION_ classes will be made in the future.

 

Concerning the text :New() -- The ':'-point indicates that a method of the class is being used, in this case "New()" -- New() creates an object of the class and stores it in the variable EWR.

 

Now we have in EWR a copy of DETECTION_AREAS but now with configuration parameters. It is an instance of DETECTION_AREAS or object.

 

DETECTION_AREAS:New( SET_GROUP, Radius )as you can see, takes a parameter as input! This is a SET_GROUP object, which models a "set" of GROUPs (that is planes, vehicles, ships etc). You can look at it like a list of GROUPs of different types, forms, positions. What the SET_GROUP class does, however, it can dynamically grow or shrink the list as GROUPs that belong to this SET are born or destroyed during mission execution.

Of course, criteria is needed to specify which GROUPs belong to this SET_GROUP! That is what the Filter methods do. Each Filter method receives a parameter that specifies in a text the category, prefix name, type etc of the GROUP that should be added automatically.

Once you've described all the Filter criteria, the FilterStart() method starts the dynamic filtering and will scan the simulation for any GROUP that is alive, and matches the filter criteria. Those will be added in the SET_GROUP. On top, the FilterStart() returns also the object of the SET_GROUP, that is given as the parameter to the :New( ) method of the DETECTION_AREAS class!!!

The second parameter of the DETECTION_AREAS:New( SET_GROUP, Radius) is the Radius parameter. This is a number, that specifies the radius to be applies when new areas are being created. So as specified in the mission script, i provide 6000 meters, which will create areas of 6000 meters...

 

 

The next line of code, is

 

A2ADispatcher = AI_A2A_DISPATCHER:New( EWR )

This code activates the AI_A2A_DISPATCHER class, by creatiing a new object from it using the :New() method. You see that AI_A2A_DISPATCHER:New( EWR ) takes a parameter EWR, which is exactly the DETECTION_AREAS object EWR that we created above!

AI_A2A_DISPATCHER will use the EWR detection to scan the area. Any intruding plane detected will be mitigated by the A2A_DISPATCHER in a number of ways:

 

1. Through an INTERCEPT: Intruders are in friendly airspace, no friendlies airborne nearby. Urgent intercept required.

2. Through an ENGAGE: Intruders are in friendly airspace, friendlies airborne and nearby in a CAP. Those friendlies will engage. Any remaining targets will be intercepted.

3. Through a SWEEP: Previous detected intruders has been lost without any intervention. They need to be "searched". Friendly planes will sweep the area.

4. CAP: At regular intervals, friendly airplanes will take-off and CAP specified patrol zones. These zones can be of several formats: trigger zones, polygon zones, zones around moving vehicles, zones around moving planes etc...

 

To be able to spawn the right friendlies for the right task, configuration is required for AI_A2A_DISPATCHER.

 

This will be done using the methods of AI_A2A_DISPATCHER.

 

The first things that needs to be done, is setup the squadrons.

 

Lets discuss how a CAP squadron is setup:

 

A2ADispatcher:SetCAP( "CAP A", SPAWN:New( "CAP A" ):InitLimit( 10, 20 ), ZONE:New( "Patrol Zone" ), 500, 1000, 500, 600 ) 

The method A2ADispatcher:SetCAP( Name, SPAWN object, ZONE object, MinAltitude, MaxAltitude, MinSpeed, MaxSpeed ) will setup the CAP configuration...

- The first parameter is the Name of the squadron. Multiple CAP entities can be setup. At regular intervals, the dispatcher will start a CAP for a squadron.

- SPAWN object is used to create dynamically new groups of a certain type, weapon load etc. The SPAWN functionality is VAST, and is beyond this explanation. Those who have used MOOSE before, will know SPAWN, those who didn't, please check below for the documentation on it.

- The ZONE object is used to specify the zone where to patrol in. Again can be polygons, circle zones, moving zones etc...

- MinAltitude, MaxAltitude, MinSpeed, MaxSpeedspecifies the minimum, maximum altitude and speed that the CAP will executed in.

 

In my example, I have a CAP A group defined, that will be spawned dynamically when a CAP is being triggered by the dispatcher.

 

Similarly, an INTERCEPT task can be configured:

 

A2ADispatcher:SetINTERCEPT( "Intercept Mineralnye", SPAWN:New( "INTERCEPT A" ), 900, 1200 )

This will take:

- The first parameter is the Name of the squadron. Multiple INTERCEPT entities can be setup. Intercept groups need to be setup at different airbases. When intruders come, the CLOSEST interception point will be calculated for the interception of the intruders.

- SPAWN object.

- MinSpeed, MaxSpeedspecifies the minimum, maximum speed that the INTERCEPTION will executed in.

 

Other IA_A2A_DISPATCHER methods are being created, like options to specify the frequency and probability per squadron of the CAPs executed by the dispatcher. Probably also settings to configure the messaging. And later even a cooperation of the AI_A2A_DISPATCHER with the TASK_A2A_DISPATCHER ...

 

What I would like to task from you (sorry for the long explanation) is:

 

1. Do you think such scripting is DOABLE?

2. What are the barriers from doing or using such mechanisms?

3. How do you experience the current GCICAP setup process?

A few disclaimer notes, to avoid a deviating discussion:

We can go into a discussion like GCICAP does this and that and does that better than that etc. I understand that such is true and am at this moment not so much interested in those things. We will get there eventually. My main goal is to provide a good baseline. The bells and wistles will be added later as the experience and usage will grow. At the moment, I will be happy if I can release an A2A dispatcher that does CAP, INTERCEPT, SWEEP and ENGAGE with some intelligence and load balanced behaviour!

MOOSE documentation link:

http://flightcontrol-master.github.io/MOOSE/

 

Note that the AI_A2A_DISPATCHER is work in progress. You won't find it yet in the documentation!

So is this mission. A working demo will be added later in this thread to show the potential and the workings.

 

kind regards,

Sven


Edited by FlightControl

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Can't see the images of the units.

 

 

<edit> FlightControl, could you please replace the embedded imageshack pics with just attached ones? I don't have either an imageshack login nor do I use facebook and therefore cannot see the pics you've added to your post. I'm pretty sure I can guess what is in them but would like to be sure. I believe while that's probably not the average these days I do know that I'm definitely not the only person in that position who uses these forums so it would likely help more than just me. Thank you.


Edited by Stonehouse
Link to comment
Share on other sites

I am interested in figuring out a replacement for GCI-CAP. I just don't understand the MOOSE at all.

 

Have a look to what I wrote below. Please evaluate, let is sink in a bit, and respond.

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

I am thinking of writing a CGICAP replacement using Moose. One can already do it themselves with Moose pretty easily but I'm thinking more along the lines of a template mission that folks can grab, define what they need to ina few lines of code and Moose does the rest.

 

I just need to find the time to do this.

 

Maybe if I can work with Pikey we can get something out sooner.

 

Would be appreciated.

 

At the end of the day, most people don´t care for tools, but care for results. You can say, if you want to eat fish, learn how to fish and here are some materials you need for a fishing rod. But most will just go for the bag fish and chips.

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

Would be appreciated.

 

At the end of the day, most people don´t care for tools, but care for results. You can say, if you want to eat fish, learn how to fish and here are some materials you need for a fishing rod. But most will just go for the bag fish and chips.

 

See here an outline:

 

https://forums.eagle.ru/showpost.php?p=3155138&postcount=1015

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

I think the appealing thing of GCICAP for some was the simplicity to edit a few variables and call it done. That being said MOOSE seems to provide far more flexibility. It's been challenging to learn LUA coding but slowly it's making sense. I like the idea of having a dispatcher and the ability to utilize AWACS or EWR stations. I've currently got a mission in 2.1 I'm learning moose on and now have 5 groups of aircraft repeatedly capping separate areas. When you say polygon zones does that mean I can make a border much like an engage zone with a unit and it's waypoint on late activation?

[sIGPIC][/sIGPIC]

Asus Z97-A/ i7-4790K/ Hyper 212 EVO/ 16GB RAM/ GTX1080 Strix OC/ Supernova 750/ X-55/ TiR

Link to comment
Share on other sites

I think the appealing thing of GCICAP for some was the simplicity to edit a few variables and call it done. That being said MOOSE seems to provide far more flexibility. It's been challenging to learn LUA coding but slowly it's making sense. I like the idea of having a dispatcher and the ability to utilize AWACS or EWR stations. I've currently got a mission in 2.1 I'm learning moose on and now have 5 groups of aircraft repeatedly capping separate areas. When you say polygon zones does that mean I can make a border much like an engage zone with a unit and it's waypoint on late activation?

 

 

ZONE_POLYGON would be the class name to use. DETECTION can use different zones and zone types... See the concepts here...

 

On your comment... I don't think you need to be a super knowledgeable person in lua to setup a dispatcher if you have a mission template and if it is well documented, correct? And once people have something working, they will want more, want do try other things, and add things.

It's the first baby steps that are important. With a proper example that should go.

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

ZONE_POLYGON would be the class name to use. DETECTION can use different zones and zone types... See the concepts here...

 

On your comment... I don't think you need to be a super knowledgeable person in lua to setup a dispatcher if you have a mission template and if it is well documented, correct? And once people have something working, they will want more, want do try other things, and add things.

It's the first baby steps that are important. With a proper example that should go.

 

Awesome will look into use of the zones to define detection. So the only thing I noticed and this my just be an AI fault, I've specified an engagement zone as well as several patrols. Immediately on take off the 6 blue fighters fly across the channel and engage the Russian fighters immediately. Then all blue fighters RTB as well as surviving red, however on the next takeoff they all go to their patrol zones and CAP.

 

No it would seem you don't need to be very knowledgeable as long as you understand what some of the things you're trying to achieve are. I used one of the CAP missions as a template and reworked it from there adding in more aircraft, more CAP zones etc. It didn't take long once I figured out the structure required. Although I imagine I could make the code a tad more organized on my part haha.

[sIGPIC][/sIGPIC]

Asus Z97-A/ i7-4790K/ Hyper 212 EVO/ 16GB RAM/ GTX1080 Strix OC/ Supernova 750/ X-55/ TiR

Link to comment
Share on other sites

Been thinking a bit how to "introduce" the developments that I'm doing at the moment in terms of a GCICAP in the MOOSE framework ...kind regards, Sven

 

Thank you so very much! I am going to start studying and watching the Youtube on MOOSE. I am just fuzzy on that external program to prepare a mission. I will get it.

 

Again, thank you!

Link to comment
Share on other sites

  • 3 weeks later...

*** REPOST ***

Sry, but i had included the wrong link :-(

Now it contains the correct one.

---

 

Guys,

 

Been working on the AI_A2A_DISPATCHER module, which is a new capability that may be an addon or something similar like the GCICAP module, but in its current form may require some coding experience or coding practice to use it and set it up. Why? Because there are a lot of parameters that you can set and define.

 

What i suggest you do is, can you please have a look at this video here, which is explaining how it works, and what to expect:

 

 

After watching the video, do you think the methods as explained in the video would be something you could apply? Or is this totally out of the question.

 

I know that opinions may differ, as there is a broad audience.

 

I haven't released this module yet, as I want to have it fit for purpose. I am getting some very good feedback on slack, and need to let this sink in a bit.

 

I don't want to release something that people will reject or find too difficult to use. I get mixed feedbacks from the moose community, but wanna try with a larger audience, like here ... (It takes some courage to write this...)

 

@Stonehouse and Pikey, and @beamrider14, I have understood the views and will try to accomodate those.

 

If okay would like to hear other people and understand their unbiased opinion.

 

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...