Jump to content

Autonomous CAP and GCI AI fighter script


SNAFU

Recommended Posts

I would really look at moving to using MOOSE, it isn't as daunting as it seems.

 

I have pretty much recreated what i had using the old script in one evening, and added more complexity to it.

 

Here is a post i made which includes the template.miz file, the template simulates a seperate Abkazhia and Russian borders with cap flights. Simple right now, but might give and idea on setting up the moose script call files.

 

It really does off so much flexibility.

 

https://forums.eagle.ru/showpost.php?p=3222403&postcount=640

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Hey SH, thanks for your reply. I've taken CAPs out of the server completely and it hasn't hung up since. One thing to note, it never actually crashed. No crash log was generated. It simply hung up and stopped running without dying.

 

 

UPDATE:

 

restarted server and froze up within an hour. Please find dcs.log attached.

 

thx

dcs.rar


Edited by Invisibull
update

i9 9900k - GTX 2080 Ti - MSI Z87 GD65 Mobo - 64GB HyperX Predator RGB DDR4 3200MHz - Win10 64 bit - TM Warthog w FSSB R3 mod - TrackIr 5.

 

 

 

Link to comment
Share on other sites

Hi Shadow,

 

I much prefer Nevada and I have been messing with Moose quite a lot but the following two issues have me discouraged. One, CAP flights don't seem to engage clients on the server and Two, GCI flights allow themselves to get really slow and eventually crash into mountains. Hopefully Sven had time to look into it when he gets back from VACA.


Edited by Invisibull

i9 9900k - GTX 2080 Ti - MSI Z87 GD65 Mobo - 64GB HyperX Predator RGB DDR4 3200MHz - Win10 64 bit - TM Warthog w FSSB R3 mod - TrackIr 5.

 

 

 

Link to comment
Share on other sites

The AI getting slow and low is not related to MOOSE or any other script, it`s DCS core which is bugged. Breaks many DLCs and makes mission involving flying AI redundant at the moment.

  • Like 1

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

The AI getting slow and low is not related to MOOSE or any other script, it`s DCS core which is bugged. Breaks many DLCs and makes mission involving flying AI redundant at the moment.

 

Yep its ED's fault this is happening, the odd plane goes full speed but most just cruise at stall speed

 

I switched to using MOOSE and its a great system, very flexible and Sven is open to suggestions on how to improve it

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

I'm just hoping that all this effort in developing MOOSE, means that when/if ED get their act together a bit with core engine features, everything is in place to make the most of it.

 

I have to be honest though, i'm rapidly loosing faith that we're going to see the engine at a level that might be considered stable and workable enough, with the multiplayer and performance, especially for bigger scenarios, never mind inbuilt framework for something dynamic.

 

I would hate to think what has to go into making sure MOOSE is working with updates etc. anyway bit offtopic there.

Link to comment
Share on other sites

Ok it seems to be having trouble with a table somewhere in that it is trying to use an index that has been set to null for some reason.

 

 

Looks like perhaps (and it may be something completely different) that you have a blue intruder aircraft that is going in and then out of red airspace so it is launching a red GCI and then trying to clean it up because there is no intruder and via a bug failing.

 

 

You would have to systematically debug the script to find the actual root cause and then figure out a code patch.

 

 

Honestly you are better off advising FC of whatever you feel is the shortcomings of MOOSE's GCICAP as he is quite keen to give the community a well maintained replacement. If you really want to stay with the old script I can try to look at the problem but I make no guarantees I can fix it and it will take me a long time to do what is required as life is very busy and I have little time for DCS beyond the time I read the forums to keep in touch.

 

 

If you can log your issues here

 

 

https://github.com/FlightControl-Master/MOOSE/issues

 

 

He'll look into them I am sure and I'm guessing it will be reasonably soon after he gets back from vacation. Try to give as much detail as you can to help him and make it plain that it is a GCICAP feature/enhancement you are requesting. You made need to create a github account if you don't have one already.

 

 

Hey SH, thanks for your reply. I've taken CAPs out of the server completely and it hasn't hung up since. One thing to note, it never actually crashed. No crash log was generated. It simply hung up and stopped running without dying.

 

 

UPDATE:

 

restarted server and froze up within an hour. Please find dcs.log attached.

 

thx

Link to comment
Share on other sites

Thx SH - I know Sven and I'll speak to him when he gets back. I'm using Shadow's formulation of Moose and it's working much better now.

i9 9900k - GTX 2080 Ti - MSI Z87 GD65 Mobo - 64GB HyperX Predator RGB DDR4 3200MHz - Win10 64 bit - TM Warthog w FSSB R3 mod - TrackIr 5.

 

 

 

Link to comment
Share on other sites

  • 5 weeks later...
Thx SH - I know Sven and I'll speak to him when he gets back. I'm using Shadow's formulation of Moose and it's working much better now.

 

 

Guys, is the AI_A2A_GCICAP and AI_A2A_DISPATCHER now working?

 

Beside the additional requirements from Rivvern on the MOOSE thread, on airbase capture.

 

What are the satisfaction levels these days? The question is important for me to understand the readiness for release 2.2.

 

So if you would be so kind to brind some light in the darkness?

 

Thanks!

 

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

I use MOOSE AI_A2A_GCICAP and spawn for controlling AI targets for training

 

It works great


Edited by Johnny_Rico

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Guys, is the AI_A2A_GCICAP and AI_A2A_DISPATCHER now working?

 

Beside the additional requirements from Rivvern on the MOOSE thread, on airbase capture.

 

What are the satisfaction levels these days? The question is important for me to understand the readiness for release 2.2.

 

So if you would be so kind to brind some light in the darkness?

 

Thanks!

 

FC

 

I can get AI_A2A_GCICAP working but must be doing something wrong as I'm not getting a satisfactory result.

 

For example, I spawn a combat box of B-17 and the GCI spawned 36 groups of one Fw-190 to intercept it, each one acting independently. Once, one gets shot down, it is replaced. Then end result is that it feels more like an arcade experience, like playing Space Invaders rather than a Mil SIM that is responding to a situation based on doctrine. All in all GCICAP was easier to set up and could be massaged to make it feel like you were getting a doctrinal response from a thinking enemy.

 

 

AI_A2A_DISPATCHER is much better but still does not feel like a doctrinal response. For example it can generate a response of three or five aircraft which feels artificial. GCICAP could do that but could be forced to respond in fours.

Link to comment
Share on other sites

Have you got some better detail around your statements of "doctrinal response"?

It might go a long way to explain exactly what you are looking for, for example, both scripts replaced CAP and spawned fighters for intercept, but what are the fundamental differences you notice that you object to?

 

I can get AI_A2A_GCICAP working but must be doing something wrong as I'm not getting a satisfactory result.

 

For example, I spawn a combat box of B-17 and the GCI spawned 36 groups of one Fw-190 to intercept it, each one acting independently. Once, one gets shot down, it is replaced. Then end result is that it feels more like an arcade experience, like playing Space Invaders rather than a Mil SIM that is responding to a situation based on doctrine. All in all GCICAP was easier to set up and could be massaged to make it feel like you were getting a doctrinal response from a thinking enemy.

 

 

AI_A2A_DISPATCHER is much better but still does not feel like a doctrinal response. For example it can generate a response of three or five aircraft which feels artificial. GCICAP could do that but could be forced to respond in fours.

___________________________________________________________________________

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

Link to comment
Share on other sites

I can get AI_A2A_GCICAP working but must be doing something wrong as I'm not getting a satisfactory result.

 

For example, I spawn a combat box of B-17 and the GCI spawned 36 groups of one Fw-190 to intercept it, each one acting independently. Once, one gets shot down, it is replaced. Then end result is that it feels more like an arcade experience, like playing Space Invaders rather than a Mil SIM that is responding to a situation based on doctrine. All in all GCICAP was easier to set up and could be massaged to make it feel like you were getting a doctrinal response from a thinking enemy.

 

 

AI_A2A_DISPATCHER is much better but still does not feel like a doctrinal response. For example it can generate a response of three or five aircraft which feels artificial. GCICAP could do that but could be forced to respond in fours.

 

Hi Rob.

 

Thank you for the great feedback.

 

AI_A2A_GCICAP inherits all from AI_A2A_DISPATCHER.

 

 

Send me your mission so I can have a look at it.

 

The snappiness is configurable. Detection runs every 30 seconds. That is your issue on snappiness.

 

May I ask you why you used some words which were expressing frustrations.

You are already on slack.com. I invited you about a year ago.

Come on board and ask your questions online.

No need for frustrations. If possible you will be helped.

 

I made these modules to help you all and the DCS community.

To make something better and expandable.

 

If you feel that goal has not been reached, then I am sorry.

 

Maybe there is indeed something wrong and can be fixed.

 

Sven


Edited by FlightControl

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Try this...

 

Note I fixed some stuff.

 

Reload moose.lua and embed in your mission again from here:

 

https://github.com/FlightControl-Master/MOOSE/releases/tag/2.2.0.pre

 

 

Find demo mission attached.

 

---
-- Name: AID-100 - AI_A2A - Demonstration
-- Author: FlightControl
-- Date Created: 30 May 2017


-- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
DetectionSetGroup = SET_GROUP:New()
DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
DetectionSetGroup:FilterStart()

Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )

-- Setup the A2A dispatcher, and initialize it.
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )

-- Enable the tactical display panel.
A2ADispatcher:SetTacticalDisplay( true )

-- Initialize the dispatcher, setting up a border zone. This is a polygon, 
-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
-- Any enemy crossing this border will be engaged.
CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
A2ADispatcher:SetBorderZone( CCCPBorderZone )

-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly 
-- without an assignment within 100km radius from a detected target, will engage that target.
A2ADispatcher:SetEngageRadius( 80000 )

-- Setup the squadrons.
A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 )
A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 )
A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 )
A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 )
A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )

-- Setup the overhead
A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 )
A2ADispatcher:SetSquadronOverhead( "Maykop", 1 )
A2ADispatcher:SetSquadronOverhead( "Mozdok", 1 )
A2ADispatcher:SetSquadronOverhead( "Sochi", 1 )
A2ADispatcher:SetSquadronOverhead( "Novo", 1.5 )

-- Setup the Grouping
A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 )
A2ADispatcher:SetSquadronGrouping( "Sochi", 2 )
A2ADispatcher:SetSquadronGrouping( "Novo", 3 )

-- Setup the Takeoff methods
A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air )
A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" )
A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" )
A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )

-- Setup the Landing methods
A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" )
A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" )
A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" )
A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" )
A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway )


-- CAP Squadron execution.
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )

CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )

CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )

-- GCI Squadron execution.
A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )

CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } )


-- Blue attack simulation
local Frequency = 300

BlueSpawn1 = SPAWN
 :New( "RT NATO 1" )
 :InitLimit( 2, 10 )
 :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } )
 :InitRandomizeRoute( 0, 0, 30000 )
 --:InitDelayOn()
 :SpawnScheduled( Frequency, 0.4 )

BlueSpawn2 = SPAWN
 :New( "RT NATO 2" )
 :InitLimit( 2, 10 )
 :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } )
 :InitRandomizeRoute( 0, 0, 30000 )
 --:InitDelayOn()
 :SpawnScheduled( Frequency, 0.4 )

BlueSpawn3 = SPAWN
 :New( "RT NATO 3" )
 :InitLimit( 2, 10 )
 :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } )
 :InitRandomizeRoute( 0, 0, 30000 )
 --:InitDelayOn()
 :SpawnScheduled( Frequency, 0.4 )

BlueSpawn4 = SPAWN
 :New( "RT NATO 4" )
 :InitLimit( 2, 10 )
 :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } )
 :InitRandomizeRoute( 0, 0, 30000 )
 --:InitDelayOn()
 :SpawnScheduled( Frequency, 0.4 )

 

Hope this fixes the doctrinal response.

 

425678 bugs to go.

 

FC

AID-100 - AI_A2A - Demonstration.miz

AID-100 - AI_A2A - Demonstration.lua

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

  • 1 month later...

Could someone plz take a look at this mission, the CAP/GCI dosent seem to spawn, and I cant figure out whats wrong...

 

In advance thanks

GCICAP Danica Templet.miz

Intel Core i7-6700K Cpu 4.00 GHz OC 4.8 GHz Water Cooled|32 GB DDR4 ram OC| Nvidia RTX 2080Ti| TrustMaster Warthog|Saitek Battle Pro Pedals | Logitec G13| Oculus Rift S :joystick:

 

I´m in for a ride, a VR ride:pilotfly:

https://www.youtube.com/channel/UCBX_-Hml7_7s1dggit_vGpA?view_as=public

Link to comment
Share on other sites

Could someone plz take a look at this mission, the CAP/GCI dosent seem to spawn, and I cant figure out whats wrong...

 

In advance thanks

With moose or the old one?

 

Sent from my SM-N950F using Tapatalk

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...

I believe this thread could be unstickied now as MOOSE's version of GCICAP provides at least 95% of the required functionality and to all intents this script is not being developed further.

@Webber assuming that the DCS api's all work as expected then I would tend to think the last version of GCICAP published would theoretically work under 1.5.8 and 2.5 OB but can't be sure. Even though it wasn't my script anymore I probably should have replied earlier out of courtesy so apologies for the extremely late reply. I would suggest trying out the MOOSE version of an autonomous air defence network instead.

Link to comment
Share on other sites

I'm pretty sure that most of the elements will work, what it missed is an owner who can support it when issues arise, so the code is essentially frozen since 2016 with no work or support, hence the problems back around 1.57 time got people panicking and looking for alternatives. (not sure if these were purely MIST related or what the issues actually were)

There is an alternative under heavy active support that duplicates most of the features now, so really this thread is redundant bar people repeating questions on it that will only be able to get answers based on historical knowledge. Going back to 2016 is a long way for the little details.

Works fine in DCS 2.5.

___________________________________________________________________________

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

Link to comment
Share on other sites

  • 3 months later...

I've been trying to set up a test with red GCI flights only but I can't get any GCI to spawn. Can anyone help me out? I must be missing something. :)

The red EWR unit detects the blue aircraft but does not spawn a red GCI.

 

Trigger Zone placed over Sukhumi-Babushara with the same name. Sukhumi made red.

Placed a late activated template fighter named "__GCI__red1" as per default.

 

All I get from the log is:

 

2018-06-27 07:33:06.116 WARNING SCRIPTING: GCICAP|getAirfields|937: No airbase for blue found
2018-06-27 07:33:06.117 WARNING SCRIPTING: GCICAP|getAllActiveAircrafts|958: No active aircraft for red found
2018-06-27 07:33:06.117 WARNING SCRIPTING: GCICAP|getAirfields|937: No airbase for blue found
2018-06-27 07:33:06.117 WARNING SCRIPTING: GCICAP|getAllActiveEWR|991: No active EWR for blue found
2018-06-27 07:33:13.344 WARNING SCRIPTING: GCICAP|getAllActiveAircrafts|958: No active aircraft for red found
2018-06-27 07:33:13.344 WARNING SCRIPTING: GCICAP|getAirfields|937: No airbase for blue found
2018-06-27 07:33:13.344 WARNING SCRIPTING: GCICAP|getAllActiveEWR|991: No active EWR for blue found
2018-06-27 07:33:13.344 INFO    SCRIPTING: GCICAP|checkForAirspaceIntrusion|1066: New Airplane Group (Pilot #001) intruded airspace of red detected by New Vehicle Group (Unit #001)
2018-06-27 07:33:13.344 INFO    SCRIPTING: GCICAP|getClosestFlightsToUnit|1291: No CAP or GCI flights of side red active


Edited by chrisofsweden

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

Just a guess but I would suspect that the code that checks through the groups/units in the mission looking for GCICAP template units is no longer working or you have a naming issue ie the prefix the code is using to look for templates is different to what you've used (maybe an embedded blank or extra _ or something) and you need to find the typo and fix it. It'd be well over 2 years ago that I looked at lukrops version of the code sorry. I actually thought everyone had transitioned over to using the MOOSE equivalent these days. Do you actually have a blue airbase and EWR in the mission? Looks like the script can't see those either if you do. Airbase logic might not be working so well now too.

Link to comment
Share on other sites

Thanks for answering Stonehouse :)

 

Yeah I've since I asked this question started looking a the MOOSE equivalent, got it working, but ran into another issue.

 

But FYI, no I hadn't set a Blue Airbase and/or EWR. As you see, the script does not complain "No airbase for red found", so I assume it found the red airbase. Also double, triple, quadruple checked template names in the ME and in the script and they are the same. :/

 

Do you think Blue Airbase and EWR would be required for the script to work even though I'm not going to use it?

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

No I think theoretically you can do what you are trying to do and have a red air defence driven by GCICAP while blue aircraft might be either player or otherwise controlled by mission triggers and scripts and so have no blue templates or bases declared as GCICAP bases. Was just curious since you had quite a few messages in your log.

 

 

If you are sure that your template aircraft names are correct then it must be a code issue. I do recall that non numeric bort numbers were an problem with lukrop's version of the script - do you have any alphas in your bort numbers on the template aircraft? If so change them and see if it works.

 

 

Other than that I think it will be just that the code no longer works as it stands and would need to be debugged and corrected. I suppose possibly if you are using other scripts there also might be a clash but it's a bit of a stretch. I'm assuming you have also checked all the set up of global parameters up near the front of the script and everything is correct for what you want to do. If you post up your dcs.log I'm happy to have a quick look through it to see if anything else jumps out at me but wading through lukrop's code isn't do-able sorry as I just don't have that much spare time between work and normal family life these days.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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