Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Trying to understand the AI / The tutorial's case

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Desert War 1940 - 1942 >> Trying to understand the AI / The tutorial's case Page: [1]
Login
Message << Older Topic   Newer Topic >>
Trying to understand the AI / The tutorial's case - 3/28/2018 9:23:19 PM   
Nico165b165


Posts: 419
Joined: 1/28/2007
From: Mons, Belgique
Status: offline
Following this discussion about the AI, this is an attempt to better understand how it works for future modding purposes.

Here's the plan:

- Read the scenario developers guide in the manual, check
- Open the tutorial (2nd battle of Bardia) in the editor and try to understand how the AI instructions work
- Launch an AI vs AI game to check if the AI does what I think it should

This is just me trying to understand what's under the hood with no prior knowledge of the engine, so of course I might be wrong quite often Hope a dev will help in that case !

Spoiler alert: the following posts will have a lot of infos about the AI in this scenario, so don't read any further if you want to play the tutorial with a fresh mind.

< Message edited by Nico165b165 -- 3/28/2018 10:43:01 PM >


_____________________________

Post #: 1
RE: Tryning to understand the AI / The tutorial's case - 3/28/2018 9:38:39 PM   
Nico165b165


Posts: 419
Joined: 1/28/2007
From: Mons, Belgique
Status: offline
Axis AI

That one looks simple. Only 3 orders for the whole scenario.

Id 1: every Axis unit (Bardia command is highest HQ and order apply to every sub HQ or unit) will have withdraw order for every combat during the scenario. No target hex to move. Instead of trying to hold their ground, Axis AI units will just retreat as soon as possible if attacked by the player. So this is how the scenario is made "easy" as a tutorial. I guess removing that order or changing it to hold at all cost would make a very different experience, but not quite a tutorial anymore.

Id 2: Bardia command = every Axis unit will have move+ supply for the whole scenario. Not very useful as they have no move order. Rommel won't be happy about that fuel allocation !

Id 3: Bardia command = every Axis unit will have combat+ supply for the whole scenario. That one is more useful, it means Axis units have better attack stats, so better chance to trigger some > 3 vs 1 combat odds auto attack (the AI will attack if they can find a 3 vs 1 or better odds, even if they have no AI order).

And that's all for the Axis AI. A very passive AI which won't do anything except retreat faster, make opportunity counter-attacks if the player makes mistakes in his frontline, and bombard what comes into its range.

Now onto Allied IA. 42 orders, won't be that simple...

_____________________________


(in reply to Nico165b165)
Post #: 2
RE: Tryning to understand the AI / The tutorial's case - 3/28/2018 10:22:09 PM   
Nico165b165


Posts: 419
Joined: 1/28/2007
From: Mons, Belgique
Status: offline
Allied IA

This one will be longer.

Id 7 (I'm starting here because Id 1-6 looks to me like particular cases and not actually triggered in this scenario... More about them later): Southforce has order "hold" for the whole scenario. Not sure why. They're not adjacent to any enemy unit.

Id 8 to 12: those orders script what Pilgrim force will do. Attack a first hex. Once it's taken, attack a second one. Then a third. Etc. And the last one is Bardia. To get that result every order has the next one as "next id". This means order 9 starts once order 8 is complete (= first hex taken). Then repeat the idea. This feels very heavily scripted, no initiative at all for the tactical IA. It ensures a very predictable outcome. Something interesting to test would be giving Pilgrim force only one objective - like Bardia - and see how the tactical IA finds its way.

Id 13: the same for the 1st Tank Bde, but they have only one objective, in the frontline, on Pilgrim's right flank.

Id 42: why Id 42 now ? Because that order also sets an attack objective for the 1st Tank Bde, but a different one. Trig turn is set to 0, I guess it means "always available". Priority is the same as Id 13. Id 13 is triggered first because its Id is lower. I think once order 13 is complete, 1st tank will go onto order 42. But really not sure about that one. Need to test.

Id 14 to 16: same as Pilgrim, now for 3rd SA Bde. A first hex to attack, then a second, then a third.

Id 17 and 18: Pilgrim force has move+ and combat+ supply for the whole scenario. Make sense as the main assault force, they need to fight and enter ZOC as best as they can.

Id 19 to 23: naval assets missions. Every naval asset gets an hex to attack. It starts on turn 1 and ends on turn 2. Not sure what the naval units do afterwards ? Nothing, or auto select targets like artillery unit ? More testing needed.

Id 23 to 28: air assets missions. Every air assets gets a target to recon, an hex to attack or an organisation (HQ + subunits) to support. No interdiction or counter air mission here, likely because there are no Axis air assets and Axis units dont need to move. Different durations here, from 1 to 6 turns. Support missions starts on turn 2. Same question as the naval assets, what happens once the order is over ?

Id 29 to 31: ground assets missions. Recce and 2 support missions starting from turn 2 for 4 to 6 turns. Also need to test what happens afterwards.

Id 32 to 35: 3rd SA Bde and 1st Tank Bde also have move+ and combat+ for the whole scenario.

Id 36 to 40: naval assets now receive a second batch of attack orders. This time, every one of them is asked to attack Bardia for 2 turns, starting on turn 3. So here's the complete naval plan: attack various hexes around Bardia or in the frontline on turns 1 and 2, then all guns blazing on Bardia on turns 3 and 4. Then what ? No more instructions.

Id 41: the last ground asset, 8th army main effort. Attributed to Pilgrim force starting on turn 2 and until the end.

Id 1 to 6: those are supposed to be successive attack orders for Northforce and Kingforce, like Pilgrim / 3rd SA / 1st Tank have. Problem is, they all have the trig test REF_SCRIPT_ONLY and no other script is set to activate them as "next id". My understanding is that those orders will never trigger -> the AI wont do anything with Kingforce / Northforce. Mistake or leftover ?

And that's it for the Allied AI. much more active than the Axis AI but with a very precise plan. More Monty style than Rommel !

_____________________________


(in reply to Nico165b165)
Post #: 3
RE: Tryning to understand the AI / The tutorial's case - 3/29/2018 1:56:01 AM   
bigus


Posts: 95
Joined: 10/25/2007
Status: offline
Excellent analysis.
I managed to make a small scenario from scratch with a few AI scripts in less than an hour last night.
This included making the map. Not a very functional game but I was testing the possibilities.
I think scripting is a perfect way to program the AI. So much potential.
The editor is extremely easy to use.

Now I hope some graphics guru can make some Russian Images and Icons.



(in reply to Nico165b165)
Post #: 4
RE: Tryning to understand the AI / The tutorial's case - 3/29/2018 5:06:34 AM   
giffin


Posts: 188
Joined: 3/24/2015
Status: offline

quote:

ORIGINAL: bigus

Excellent analysis.
I managed to make a small scenario from scratch with a few AI scripts in less than an hour last night.
This included making the map. Not a very functional game but I was testing the possibilities.
I think scripting is a perfect way to program the AI. So much potential.
The editor is extremely easy to use.

Now I hope some graphics guru can make some Russian Images and Icons.





Now we need a New Thread to Upload any New Scenarios & MOD's coming players have created.

(in reply to bigus)
Post #: 5
RE: Trying to understand the AI / The tutorial's case - 3/29/2018 8:50:41 AM   
Solaristics


Posts: 195
Joined: 2/20/2002
From: UK
Status: offline
Good work here Nico. I look forward to seeing how this thread develops.

(in reply to Nico165b165)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Desert War 1940 - 1942 >> Trying to understand the AI / The tutorial's case Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.953