• Blitz Shadow Player
  • Caius
  • redboot
  • Rules
  • Chain of Command
  • Members
  • Supported Ladders & Games
  • Downloads


Editing AI performance
11-18-2020, 08:09 AM, (This post was last modified: 11-18-2020, 05:41 PM by neonlicht.)
#1
Editing AI performance
I buy military wargames with scenario editors in order to learn something about the period while having fun experimenting with custom scenarios.

I'm not an expert in the SYW but, as I understand it, armies of the period marched to the battlefield in Column but then formed into Line within cannon-shot of each other, and remained in Line as long as they remained in contact (advancing, manoeuvring, firing & charging in Line).  

The Seven Years War game is advertised at JTS as being playable against the AI, and as simulating the linear tactics of the period, and that's why I bought it.

I created a scenario in the Editor, placed both armies in Line formation about 1 mile apart, and gave them attack orders via the AI Scripts utility. Then I tested the scenario by placing both sides on "Automatic", thereby making the AI play against itself. I was surprised to see both armies (Prussian & Russian) immediately change from Line to Column formation, then advance in Column, and then engage each other in Column. In other words--no linear tactics.

I checked the Editor's manual and noticed that it's possible to modify AI behaviour via "flags" that you add to the scenario's Header Dialog. But--while there is an option to force the AI to manoeuvre in Column (?!?)--there is no option to force the AI to manoeuvre in Line. Unless I'm missing something? Maybe I'm setting up the scenario wrong or making some basic error?

Update: I had the idea that maybe units could be forced to stay in line by increasing the cost of changing formation in the PDT file. But looking at the "Notes" document, which describes & explains the coding of the PDT files for this game, there seems to be no relevant coding line for change-formation cost. And, unfortunately, the game has no dedicated PDT editor.
Quote this message in a reply
11-20-2020, 06:14 AM,
#2
RE: Editing AI performance
(11-18-2020, 08:09 AM)neonlicht Wrote: I buy military wargames with scenario editors in order to learn something about the period while having fun experimenting with custom scenarios.

I'm not an expert in the SYW but, as I understand it, armies of the period marched to the battlefield in Column but then formed into Line within cannon-shot of each other, and remained in Line as long as they remained in contact (advancing, manoeuvring, firing & charging in Line).  

The Seven Years War game is advertised at JTS as being playable against the AI, and as simulating the linear tactics of the period, and that's why I bought it.

I created a scenario in the Editor, placed both armies in Line formation about 1 mile apart, and gave them attack orders via the AI Scripts utility. Then I tested the scenario by placing both sides on "Automatic", thereby making the AI play against itself. I was surprised to see both armies (Prussian & Russian) immediately change from Line to Column formation, then advance in Column, and then engage each other in Column. In other words--no linear tactics.

I checked the Editor's manual and noticed that it's possible to modify AI behaviour via "flags" that you add to the scenario's Header Dialog. But--while there is an option to force the AI to manoeuvre in Column (?!?)--there is no option to force the AI to manoeuvre in Line. Unless I'm missing something? Maybe I'm setting up the scenario wrong or making some basic error?

Update: I had the idea that maybe units could be forced to stay in line by increasing the cost of changing formation in the PDT file. But looking at the "Notes" document, which describes & explains the coding of the PDT files for this game, there seems to be no relevant coding line for change-formation cost. And, unfortunately, the game has no dedicated PDT editor.

Sadly there is not much you can do, the AI is like this for all the tactical games ( MP, Nap, Early American Wars)  ie it appears to be be hard coded to want to maneuver in column.   ( it does occasionally revert back to line on an individual unit basis, but not en masse like you are looking for)   

The Ai does tend to stay in line when its coded to be defensive minded, and most of the scenarios that are for "single player"  tend to suggest you play the side of the attacker...

I played around a bit after brainstorming some ideas in the Getting Started scenario, to no avail.
First I tried to script the Ai to be defensive but with an Objective behind the enemy battle line, hoping it would like to stay in line, but alas it didnt seem to have any impact at all.

I then changed the PDT movement rate for infantry in column to be 0 in clear hexes (like blocked hexes)   Didnt stop then from from changing to column and sitting there( or moving on roads as I didnt change those values)  

I then changed it to 18 ( as the infantry in game generally have 18 action points  so it can only move one hex per turn vs 6 in line) in the hope that the AI did some sort of analysis on the most efficient way to get to an objective, and another no go, the AI changed to column and dithered about.....   I tried 20 too and this seemed to give the AI fits and it actually moved side ways into clear hexes when it shouldnt have been able to ... ( funny when i tried to do it as the human player the engine would not let me...)

Anyway, I think we are stuck unless JT tweaks the engine  ( in this case it would have to be a specific tweak to 7 years war, perhaps a proximaty check to the enemy where it automatically changes to line...)  the engine could also do with an OOB tag so that units can ONLY be in line formation  ( just like there are currently tags for a unit to only be able to form column, only line and column, and finally line, column and block)

Good luck, perhaps an experienced scenario designer can give you some tips on the various AI codes flags and scripting to AID the AI to form line more often, but I dont think you really can, especially for a fluid "meeting engagement" type scenario you are looking to build.    Unfortunately Hot Seat or PBEM might be your best bets.
Quote this message in a reply
11-20-2020, 07:42 PM,
#3
RE: Editing AI performance
The thing is - it isn't the lack of an editor that wouldn't allow something - if it isn't able to be hand-coded then it isn't part of the engine.

I only know this because of working with the most recent engine changes where there were some changes introduced into the engine that were missed being added to the scenario editor at first -and you could always hand code them in despite the editor not handling it.

I imagine that has to be because there is a hard coded movement point allowance cost for formation changes (in the same sense that there is a hard-coded movement point allowance for 'has boats' toggle.  Chances are though something can always perform one movement function per turn, so that would probably count as a formation change.  It is in the same way that a 0 movement point rated emplaced gun can picot one hexside despite having no movement points assigned to it.
Bydand
Send this user an email
Quote this message in a reply
11-21-2020, 12:38 AM,
#4
RE: Editing AI performance
(11-20-2020, 06:14 AM)TheGrayMouser Wrote:
(11-18-2020, 08:09 AM)neonlicht Wrote: I buy military wargames with scenario editors in order to learn something about the period while having fun experimenting with custom scenarios.

I'm not an expert in the SYW but, as I understand it, armies of the period marched to the battlefield in Column but then formed into Line within cannon-shot of each other, and remained in Line as long as they remained in contact (advancing, manoeuvring, firing & charging in Line).  

The Seven Years War game is advertised at JTS as being playable against the AI, and as simulating the linear tactics of the period, and that's why I bought it.

I created a scenario in the Editor, placed both armies in Line formation about 1 mile apart, and gave them attack orders via the AI Scripts utility. Then I tested the scenario by placing both sides on "Automatic", thereby making the AI play against itself. I was surprised to see both armies (Prussian & Russian) immediately change from Line to Column formation, then advance in Column, and then engage each other in Column. In other words--no linear tactics.

I checked the Editor's manual and noticed that it's possible to modify AI behaviour via "flags" that you add to the scenario's Header Dialog. But--while there is an option to force the AI to manoeuvre in Column (?!?)--there is no option to force the AI to manoeuvre in Line. Unless I'm missing something? Maybe I'm setting up the scenario wrong or making some basic error?

Update: I had the idea that maybe units could be forced to stay in line by increasing the cost of changing formation in the PDT file. But looking at the "Notes" document, which describes & explains the coding of the PDT files for this game, there seems to be no relevant coding line for change-formation cost. And, unfortunately, the game has no dedicated PDT editor.

Sadly there is not much you can do, the AI is like this for all the tactical games ( MP, Nap, Early American Wars)  ie it appears to be be hard coded to want to maneuver in column.   ( it does occasionally revert back to line on an individual unit basis, but not en masse like you are looking for)   

The Ai does tend to stay in line when its coded to be defensive minded, and most of the scenarios that are for "single player"  tend to suggest you play the side of the attacker...

I played around a bit after brainstorming some ideas in the Getting Started scenario, to no avail.
First I tried to script the Ai to be defensive but with an Objective behind the enemy battle line, hoping it would like to stay in line, but alas it didnt seem to have any impact at all.

I then changed the PDT movement rate for infantry in column to be 0 in clear hexes (like blocked hexes)   Didnt stop then from from changing to column and sitting there( or moving on roads as I didnt change those values)  

I then changed it to 18 ( as the infantry in game generally have 18 action points  so it can only move one hex per turn vs 6 in line) in the hope that the AI did some sort of analysis on the most efficient way to get to an objective, and another no go, the AI changed to column and dithered about.....   I tried 20 too and this seemed to give the AI fits and it actually moved side ways into clear hexes when it shouldnt have been able to ... ( funny when i tried to do it as the human player the engine would not let me...)

Anyway, I think we are stuck unless JT tweaks the engine  ( in this case it would have to be a specific tweak to 7 years war, perhaps a proximaty check to the enemy where it automatically changes to line...)  the engine could also do with an OOB tag so that units can ONLY be in line formation  ( just like there are currently tags for a unit to only be able to form column, only line and column, and finally line, column and block)

Good luck, perhaps an experienced scenario designer can give you some tips on the various AI codes flags and scripting to AID the AI to form line more often, but I dont think you really can, especially for a fluid "meeting engagement" type scenario you are looking to build.    Unfortunately Hot Seat or PBEM might be your best bets.

Many thanks indeed for this detailed reply--much appreciated. I was wondering if tweaking movement values in the PDT file would have an effect--but I now see that you've tried it without success. A shame. And so I'd have to agree with you that an engine tweak is needed.

As I mentioned above--my main reason for buying games such as this is to learn some history via a "hands-on" task like scenario design. I do like the Seven Years War game, and have had some fun & enjoyment with it, but I feel a bit disappointed & let down that the AI can't cope with the formations & tactics that made the period famous.

Maybe the "Renaissance" game plays better with regards to the AI? Would be interested to know if this is the case.

Thanks again & best wishes.
Quote this message in a reply
11-21-2020, 12:45 AM,
#5
RE: Editing AI performance
(11-20-2020, 07:42 PM)_72z Wrote: The thing is - it isn't the lack of an editor that wouldn't allow something - if it isn't able to be hand-coded then it isn't part of the engine.

I only know this because of working with the most recent engine changes where there were some changes introduced into the engine that were missed being added to the scenario editor at first -and you could always hand code them in despite the editor not handling it.

I imagine that has to be because there is a hard coded movement point allowance cost for formation changes (in the same sense that there is a hard-coded movement point allowance for 'has boats' toggle.  Chances are though something can always perform one movement function per turn, so that would probably count as a formation change.  It is in the same way that a 0 movement point rated emplaced gun can picot one hexside despite having no movement points assigned to it.

Hi & many thanks for this. Yep--I see what you mean. And it's interesting to get your take on this. I think--having tried a few JTS titles--that I had unrealistic expectations of these games re. AI performance & scenario editing. It's still fun to mess about with this stuff though! :-)
Quote this message in a reply
11-22-2020, 12:59 PM,
#6
RE: Editing AI performance
Oh man - apologies- I was asleep for a few days (figuratively speaking).

AI and REN - I would expect that you might actually find REN to work worse with the AI - and that is almost entirely due to the way that the OOBs were built.

In REN altohugh you might find a few scenarios using a combined shot and pike set of attributes those were not in the test (and I doubt they ever really were tested outside of the scenario designer having played around with it on his own). And I am saying that because I had access to the development team boards - and I know that no one at the time provided any feedback.

Partly that was due because it wasn't in the initial release, and was sort of a 'hrm - I've tried this out.... ' type of thing - and no one ever did - mind you that is semi-irrelevant in the sense that the engine allows you to do this - so one scenario designer's take on something is not going to be the last say over and above the capabilities of the engine  - and just sort of brainstorming it and putting it out there is only one take on it.

The pike and shot interplay -and the fact that nearly all of the stock (probably all - as I am not 100% sure the units that were rated for both pike/shot ever got added as anything other that someone's experiment --- is what trips up REN royally.  The AI is essentially seeing block as Square in the Napoleonic series and functions accordingly.  In other words- there are some units that can only initiate melee in block formation ... but the AI probably won't assume a block formation without cavalry in the vicinity. . . if you follow, then you can probably 'game' the AI infantry into never going into block formation -thereby preventing it from effectively functioning as a unit that's primary function is to melee.

Now, the answer (or closer to the answer) is to rate units with both functions -and that requires using modifiers. Luckily you can apply negative ratings, although I don't think I have ever seen any in use in any stock scenarios in either title in the series (the one I was working on -was- going to make use of this).  However I decided talking about techniques and why I was doing them was a bit more along the lines of what I would rather be doing with my time.

Believe me - you will learn some history ... :) it's largely in the books and then playing around with things like it sounds like you are doing.   I might have to come back to this.. sorta tried doing it quickly - might have missed some things.
Bydand
Send this user an email
Quote this message in a reply
11-23-2020, 01:45 AM,
#7
RE: Editing AI performance
(11-22-2020, 12:59 PM)_72z Wrote: Oh man - apologies- I was asleep for a few days (figuratively speaking).

AI and REN - I would expect that you might actually find REN to work worse with the AI - and that is almost entirely due to the way that the OOBs were built.

In REN altohugh you might find a few scenarios using a combined shot and pike set of attributes those were not in the test (and I doubt they ever really were tested outside of the scenario designer having played around with it on his own). And I am saying that because I had access to the development team boards - and I know that no one at the time provided any feedback.

Partly that was due because it wasn't in the initial release, and was sort of a 'hrm - I've tried this out.... ' type of thing - and no one ever did - mind you that is semi-irrelevant in the sense that the engine allows you to do this - so one scenario designer's take on something is not going to be the last say over and above the capabilities of the engine  - and just sort of brainstorming it and putting it out there is only one take on it.

The pike and shot interplay -and the fact that nearly all of the stock (probably all - as I am not 100% sure the units that were rated for both pike/shot ever got added as anything other that someone's experiment --- is what trips up REN royally.  The AI is essentially seeing block as Square in the Napoleonic series and functions accordingly.  In other words- there are some units that can only initiate melee in block formation ... but the AI probably won't assume a block formation without cavalry in the vicinity. . . if you follow, then you can probably 'game' the AI infantry into never going into block formation -thereby preventing it from effectively functioning as a unit that's primary function is to melee.

Now, the answer (or closer to the answer) is to rate units with both functions -and that requires using modifiers. Luckily you can apply negative ratings, although I don't think I have ever seen any in use in any stock scenarios in either title in the series (the one I was working on -was- going to make use of this).  However I decided talking about techniques and why I was doing them was a bit more along the lines of what I would rather be doing with my time.

Believe me - you will learn some history ... :) it's largely in the books and then playing around with things like it sounds like you are doing.   I might have to come back to this.. sorta tried doing it quickly - might have missed some things.
This is very interesting & useful info--much appreciated. I'll experiment some more--time allowing--and also do some more reading. Thanks again :-)
Quote this message in a reply
11-23-2020, 07:50 AM, (This post was last modified: 11-23-2020, 07:52 AM by -72-.)
#8
RE: Editing AI performance
You didn't ask this, but since it is sort of related --- when coding OOB files you can set the Army name as whatever you want.

Here's an example.

Ottoman_Turks A Mansfeld's Army
Begin
L 3 4 13 24 Mansfeld

S 100 110 0 0 Powder Barrels



What it does in the game is it only shows the name that you typed in for the Army -so 'Ottoman_Turks' although it is the official designation that the engine uses to call the side - in the game itself it only shows as 'Mansfeld's Army' in my example. 

You also then can adjust the graphic files to show something less Turk (if it is in there) and more 'Mansfeld-like'.

By this way you can start working and not actually be limited to just the sides given you in the game.

SYW is a little odd in that for whatever reason the first slot was never used for anything and I don't actually know if it has a name in the engine.  It also (off the top of my head) only uses 7 nation slots; personally-speaking as an end user I would have come up with the full 15 allowed in order to have made the title as usable as possible for ... well, for customers.  It'd definitely have been some added value  -it is why I wanted the full 15 in what I had been working on.

I guess that didn't come up yet- but in Musket and Pike the engine allows for 15 total sides to be used.  REN uses all 15 *but* the publisher did not yet update REN -and I assume a graphic change will happen with that ... no idea what their plans are with that one - it should be out eventually.


*PS: by reading -- I meant the history books -the user guides sometimes make users read between the lines -- but the history books ... now that is really where you'll have a blast :)
Bydand
Send this user an email
Quote this message in a reply
11-23-2020, 11:55 PM,
#9
RE: Editing AI performance
(11-23-2020, 07:50 AM)_72z Wrote: You didn't ask this, but since it is sort of related --- when coding OOB files you can set the Army name as whatever you want.

Here's an example.

Ottoman_Turks A Mansfeld's Army
Begin
L 3 4 13 24 Mansfeld

S 100 110 0 0 Powder Barrels



What it does in the game is it only shows the name that you typed in for the Army -so 'Ottoman_Turks' although it is the official designation that the engine uses to call the side - in the game itself it only shows as 'Mansfeld's Army' in my example. 

You also then can adjust the graphic files to show something less Turk (if it is in there) and more 'Mansfeld-like'.

By this way you can start working and not actually be limited to just the sides given you in the game.

SYW is a little odd in that for whatever reason the first slot was never used for anything and I don't actually know if it has a name in the engine.  It also (off the top of my head) only uses 7 nation slots; personally-speaking as an end user I would have come up with the full 15 allowed in order to have made the title as usable as possible for ... well, for customers.  It'd definitely have been some added value  -it is why I wanted the full 15 in what I had been working on.

I guess that didn't come up yet- but in Musket and Pike the engine allows for 15 total sides to be used.  REN uses all 15 *but* the publisher did not yet update REN -and I assume a graphic change will happen with that ... no idea what their plans are with that one - it should be out eventually.


*PS: by reading -- I meant the history books  -the user guides sometimes make users read between the lines -- but the history books ... now that is really where you'll have a blast :)

Hey, thanks for this--useful to know re. coding OOBs etc. Best wishes. :-)
Quote this message in a reply


Forum Jump:


Users browsing this thread: 7 Guest(s)