Latest topics
» SOW Replay Viewer
by Uncle Billy Today at 12:00 am

» Sunday 20 May 2018 Napoleonic Kriegsspiel
by Martin Yesterday at 9:25 pm

» Impromptu Games
by Morsey Mon May 21, 2018 11:36 pm

» Discussion on Formations
by Grog Mon May 21, 2018 8:42 pm

» ✯ TWC - PBEM Strategy Wargaming Club ✯
by Lancier Mon May 21, 2018 8:05 am

» OOB accuracy of standard scenario's
by Uncle Billy Thu May 17, 2018 3:36 pm

» The Groghead Crew just finished a 1 1/2 year of Vol de a'igle III
by Iconoclast Wed May 16, 2018 9:16 pm

» 1914 WW1 Kriegsspiel
by Iconoclast Wed May 16, 2018 1:10 pm

» Experimenting with the KS Mod sound files
by Didz Tue May 15, 2018 1:45 pm

» A gift from the Southern California Kriegsspiel Society to the Kriegsspiel community of Little Gaddesden
by Martin Mon May 14, 2018 11:51 am

» Kriegsspiel in Battles Magazine
by Martin Sat May 12, 2018 9:53 pm

» SOWWL Napoleon Mod 1.27 Released
by Uncle Billy Fri May 11, 2018 6:41 pm

Statistics
We have 1013 registered users
The newest registered user is GeeDub

Our users have posted a total of 24764 messages in 1972 subjects
Log in

I forgot my password


Deciphering the AI system

Page 2 of 2 Previous  1, 2

Go down

Re: Deciphering the AI system

Post  Didz on Thu May 03, 2018 6:24 pm

Uncle Billy wrote:Actually, it has a much greater effect. Battalions constantly ask their commander what they should do in many situations, (should I charge, should I form square, etc.). The commander's stance influences the answer to these questions. When the stance is set to none, the brigade commander tells the battalion to figure it out on its own, (the KS mod takes this a bit farther than the stock game). The battalion must decide what to do based on the generic rules it has for dealing with certain situations. sometimes times it leads to disastrous consequences, sometimes everything is fine. This is why the player should always set a stance for his subordinate.
Yes! I read that somewhere else but hadn't extended the impact as far as considering what happens if your AI Commander has been given a 'Non-Stance'.  

BTW: I'm assuming then that those morale values associated with the various stances are not really morale values as such but some sort of probability value that are used to determine how an AI Commander responds to a request for advice from a subordinate.  
e.g.
Subordinate: 'Sir! I think I see cavalry approaching should I form square?'
AI Commander (Checks stance variable/and personal trait) 80% = 'Yes!'  20% = 'Nah! it will be fine.'

Unfortunately, to two digit numbers mean nothing without knowing what they represent.
Uncle Billy wrote:It would do you no good. The AI uses many factors, not just the values in the stances table to make a decision, including dice throws. You would have no way to tell which factor(s) were used to make a certain decision based on what you saw on the battlefield. You want a simple 'if this is the stance, then is what will happen in the battle'. That doesn't happen in a real battle and it doesn't happen in this game. In general, the more aggressive the stance, the more risk the units will take to achieve their goal, even to the point of suicidal behavior.
I'm not really looking for that level of certainty at all.  Lets face it if I wanted total control I'd simple bash the 'TC ALL' button and be done with it.

All I'm looking for is an accurate summary of what impact my contribution to the battle will have.  So, as you rightly say if I choose to order a more aggressive stance what are the risks associated with it.  For example at what point does the AI react to my decision by not deploying skirmishers, or what is the probability that the AI will ignore approaching cavalry if I place them in that stance.  Just the basic information that needed when playing a strategy game really.
avatar
Didz

Posts : 136
Join date : 2017-07-03
Age : 63
Location : UK

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Thu May 03, 2018 6:53 pm

I'm assuming then that those morale values associated with the various stances are not really morale values as such but some sort of probability value that are used to determine how an AI Commander responds to a request for advice from a subordinate.
No, morale values are single digits, going from 0-9. If you see a 10 or 11, it generally means it is impossible to have a high enough morale to do that action. Double digit numbers are generally distances, (in yards).

For example at what point does the AI react to my decision by not deploying skirmishers, or what is the probability that the AI will ignore approaching cavalry if I place them in that stance.
I'm not sure about the stock game, maybe no skirmishers are thrown out in hold at all cost and hold stances? For the KS mod, it's more complex, as some units will always fight in skirmish order regardless of stance.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  Didz on Fri May 04, 2018 1:24 pm

Uncle Billy wrote:No, morale values are single digits, going from 0-9. If you see a 10 or 11, it generally means it is impossible to have a high enough morale to do that action. Double digit numbers are generally distances, (in yards).
Hmm! must be something else then.  Either that or I've got the mapping wrong on the table.  The entries I listed for the first row are:
Code:
Stance Type = HOLD
Max Val = 50
Move Range = 10
Arrive Range = 10
Weight = 3
Fallback = 3
Retreat = 2
Distance to charge Artillery = 20
STOP = 1
Min.Ammo = 1
Min.Ammo Wagon distance(yds) = 500
Range to search for forts = 99
Charge/No Ammo = 11
Charge Morale = 11
Flank Morale = 11
Volley Morale = 9
Reform Line Morale = 11
Move Forward = 11
Advance (max targets) = 1
CavDanger (Morale Check) = 4
SquareMen(minimum) = 201
Squareto Enemy = 70
CavChargeDist = 70
CavRunDist = 176
SquareChargeFactor = 5
CavCharge(Morale Check) = 9
CavPowerFactor = 2
SkirmDimension = 10
Skirmattitude = 0
Skirmsplit = 6
Skirmnumber = 0
MoraleBeseiged = 4
LeaveFort = 0
InfantryCharge = 10
ArtyFallBack = 350
BrigForm = eFTFight
End command = -1
As you can see there are few cells that appear to refer to morale by contain a two digit value e.g. Charge Morale = 11

BTW: I tried out the new KS Mod 1.27 last night and was quite impressed with that AI's behaviour, although having read you manual I took your advice and just set the stance of everything to HOLD, right at the start and kept it there throughout, so what i was seeing was how the AI plays when ordered to be mildly cautious.

Nevertheless, I was playing the 1809 scenario 'Battle of Wernberg' as Davout and he has a ton of cavalry.  But what impressed me was that there did seem to be a lot of combined arms co-operation going on, between the cavalry and infantry at least.  The artillery less so as it seemed content to hang back and let the others do the fighting, possibly because I had it on HOLD stance and i know you recommend using NONE stance for artillery.  But apart from two batteries in the Corps Reserve most of the artillery was attached to divisions so I left it to the AI Division Commanders to control it.

What I saw happen repeatedly was that the cavalry would advance threateningly and even make a fake charge sometimes just to force the Austrian's into square, and then it would simply pull back and sit there threateningly sometimes no more than 70 yards away from the Austrian square whilst infantry came forward and began peppering it with musketry.  This was usually skirmishers at first but occasionally a line battalion would move up and begin firing volleys at it.

If the square wavered then the cavalry instantly tried to charge it, falling back again if it didn't break.  But if the square remained stubborn what eventually happened was an assault column of infantry would appear and simply rush it.  

This usually did the trick and the square would disband, and the cavalry would then surge forward and cut the fugitives to ribbons.  Sometimes as you mention in your manual the panic would spread to one or more squares nearby and a one point I saw three squares disband as the cavalry chased the fugitives of the first through them.

I don't actually like the VP system used in this game and so when I'm setting up scenario's I try my best to turn it off.  This scenario just had one token VP in the town of Wernberg itself worth a minimal 100 points, and the VP Total was maxed to something ridiculous so it didn't end the battle.  Davouts objective was to seize the strategically important town and drive off the Austrian Army to clear the road for the rest of the army.  Nevertheless, once I'd achieved that goal the game still rewarded me with a Major Victory screen when I logged out.

High points: definitely good co-operation between the AI controlled cavalry and infantry.
Low points:  Artillery was very timid, and could have done a lot more to break up the squares, and as always the ghosting of units is immersion breaking.  It's a shame the unit footprints don't have collision detection.  It would make the game more awkward, but much more visually appealing. And yes I know I'm not supposed to play with a 1:1 sprite ratio, but I'm a tabletop wargamer, whose going to turn down a chance to have more figures on the table if you don't have to pay for them and paint them all Very Happy
avatar
Didz

Posts : 136
Join date : 2017-07-03
Age : 63
Location : UK

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Fri May 04, 2018 3:53 pm

Ah the poor hapless Austrians, everybody's door mat. Glad to see you had an enjoyable battle. That cav/inf cooperation is very fun to watch, so long as you are on the giving and not the receiving end.

The artillery is suppose to hang back. Historically, artillery mostly stayed in one place and reached out from a safe distance. The KS guns are much more lethal so the need to keep them in canister range is no longer necessary. If the batteries have a stance of defend or more aggressive, the guns will move closer to the enemy, if they run out of targets at their current location. I think that's in the manual.

As you can see there are few cells that appear to refer to morale by contain a two digit value e.g. Charge Morale = 11
As I said, that means the cmdr. will never order that particular action as max. morale is 9.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  Didz on Fri May 04, 2018 4:33 pm

Uncle Billy wrote:As I said, that means the cmdr. will never order that particular action as max. morale is 9.
So, in effect a value of 11 is synonymous with OFF, or will never happen.

That makes sense, so in the example I posted which is HOLD stance Row 50.  A unit in this stance cannot:  
a) Charge/No Ammo = 11 - Charge unless it has ammo.
b) Charge Morale = 11 - Charge at all, ammunition or not.
c) Flank Morale = 11 - React to a flanking attack?/or perhaps cannot perform a flanking attack.
d) Reform Line Morale = 11 - Reform in line, presumably after being routed.
e) Move Forward = 11 - Advance against an enemy.

There are a few more listed with a value of 10, but I'm assuming that the programmer would have been consistent and that 10 probably means something else.
Uncle billy wrote:The artillery is suppose to hang back. Historically, artillery mostly stayed in one place and reached out from a safe distance. The KS guns are much more lethal so the need to keep them in canister range is no longer necessary. If the batteries have a stance of defend or more aggressive, the guns will move closer to the enemy, if they run out of targets at their current location. I think that's in the manual.
I'm not sure about that. I think you might be right for the American Civil War, as guns in that period tended to be positional and many were using rifling or explosive shot to increase their performance. But there is plenty of primary evidence suggesting that guns in the Napoleonic period, even as late as 1815, were used as close support weapons.

For example when the Imperial Guard launched its famous attack at Waterloo the interval between each of their assault columns was occupied by two guns placed there on the orders from Colonel Duchard commander of the Guard Horse Artillery to provide close support for the final assault. Napoleon was even heard to complain that they were not firing fast enough, despite the huge losses to their crews during the advance.

There are also numerous personal accounts of the French drawing guns forward to within 100 paces of the Allied squares on the reverse slope of the ridge, and blasting them at close range with canister. e.g. Waterloo Letter 139 Lt Macready 30th Foot enclosing a copy of letter he wrote to Lt.Col Gawler states 'Late in the day the French had bought up two guns on the crest of our position, which fired grape into our square (30th & 73rd Foot) with deadly effect.'

There are similar stories of guns brought forward to support the French cavalry attacks firing at point blank into squares on the reverse slope of the ridge, in one instance disabling both companies of one side of a battalion square so that it was forced to adopt a triangle formation in order to resist the next cavalry attack. These stories along with the numerous accounts of French skirmishers who also moved to support their cavalry are simply overlooked by British historians in order to support Wellington's inaccurate statement that the French cavalry attacked unsupported, and Macready even mentioned to Siborn that he was dubious about sending him the letter as he realised that its content was of a controversial nature.

But it does suggest that in the Napoleonic period guns (at least in the French army) were used for close support, not just long range bombardment.
avatar
Didz

Posts : 136
Join date : 2017-07-03
Age : 63
Location : UK

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Fri May 04, 2018 5:09 pm

The incidents you mentioned were very likely horse guns. Indeed those were used to support cavalry and infantry advances, rear guard defense, etc. That was a common practice in all armies of the period. Foot batteries, on the other hand did not move around much once they were in position, Senarmont excepted. Supported horse batteries in the KS mod will move closer to the enemy than foot. However, they will not move forward with an attack as the AI cannot keep clear lanes of fire open to them. They would simply sit there unable to fire.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  Mr. Haelscheir on Sat May 05, 2018 6:11 am

Quite an interesting discussion indeed! I am glad to have been drawn to it by an unexpected Kriegsspiel newsletter email.

Anyways, what I have been doing in the last 8 months was accumulating some 150+ hours of game time "researching" on the game play experience and the limitations of HITS. Funny enough, only recently did I realize that I was suffering from the cursed "folder in a folder" issue and the whole time had been playing with the Grog Toolbar without any of the KS Mod's enhancements. Sometimes, the AI can do some horrible things (like moving off of an objective at the last second despite the stance I and command map destination I repeatedly assigned to him...) but at other times I may find myself thoroughly impressed when it starts doing something clever or useful. I remember one time playing through d'Erlon's Attack, TCing off all commanders and being surprised to see them commence the attack and rack up way more points than I could have ever had on my own. I intend on posting more detailed battle reports sometime later. Otherwise, I've oft found this game to be quite fulfilling outside of those frustrations to the point that every day during lectures I would long for the weekend to hear again the glorious rattle of musket fire and take in the majestic 1:1 visuals regardless of frame rate (my intense preference of the stock battle and commander walking sounds actually had me making changes to the KS Mod sfx.csv file while keeping the nice marching music).

About six months ago (university has me mentally partition this point in my life as "during my last 4 month work term"), I had a look through the code on Visual Studio and basically found what was discussed here, though some of the data tables and linkages I am not fully familiar with yet. Just a glance at the data tables has me pale at the thought of attempting to create a game of similar scale on my own. As for AI behaviour, I've lost interest in understanding the existing logic in its entirety as opposed to figuring out just how much granularity of control is available to me and what tools the code gives me for constructing a knowledge representation system. I remember struggling to find out just how to get a list of all nearby units so as to write code controlling how the AI "sees".

Didz had me recall the existence of Peter Turcan's Waterloo game and its natural language control scheme; I'm itching to gain an idea of how he implemented it given the computational resources of the day or just what it was capable of, though of course, such a system would be useless without commanders giving feedback as to their decisions. risorgimento59 also mentions the need for some cross Think() method persistence of situational knowledge.

As for AI revamps, I'd think that knowing that the Think() method is called for every unit periodically (though I don't know just how often) gives me much flexibility, but to really get working, I will need a thorough layout of every sensory, effectory and message passing interface available. For me, the ideal is to develop some natural language processing mechanism and learning model, after which AI behaviours are built through demonstration and reinforcement, or by literally having them read through text files containing drill manuals. i.e. no more hard coded rules, improved or not.

Uncle Bill mentions the matter of chain of command, but at least in SP mode, I constantly find myself longing for ways to say "Vandamme, form all your divisions' artillery into a Grande Batterie and bombard Saint-Amand prior to assaulting first with Lefol and Girard." The lack of this ability and only being able to give an entire corps a "tactical" movement destination necessitates my violating the chain of command. Also, I don't know if any of you have noticed a tendency to perceive casualty rates nigh double the historical numbers (though I do confess in my last Ligny KS Mod play through, I really pushed to wipe out Blucher's entire right while the two divisions on his left did nothing). I suspect that it may be an artifact of the game having no concept of the physical width of these massive battalions and thus creating fronts theoretically bearing many more muskets than are physically possible.

Regards,
Dan

P.S. This is quite impressive and almost all I could have ever dreamed of.


Last edited by Mr. Haelscheir on Sat May 05, 2018 6:38 am; edited 1 time in total (Reason for editing : small addition regarding Peter Turcan's Waterloo)
avatar
Mr. Haelscheir

Posts : 5
Join date : 2017-09-04
Location : Canada

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Sat May 05, 2018 4:54 pm

Join the team, Dan, I'd welcome the help.

Many of your ideas are the same as those discussed by members of the KS group. Some are probably doable, but some are not. The problem is that we do not have all the game code we need to implement certain behaviors or even movements of units. For example, there is no way to change the stance of a brigade or division. That is set in a part of the code we do not have access to. We also cannot tell a unit to move to Saint-Amand as the coordinates of map locations are not available. We also have no way of calculating a location, (x,y), and telling a unit to go there. In other words, many basic tools we need to implement real changes of AI tactical planning are not in our grasp. There are some workarounds, but they are imprecise.

I've lost interest in understanding the existing logic in its entirety as opposed to figuring out just how much granularity of control is available to me and what tools the code gives me for constructing a knowledge representation system. I remember struggling to find out just how to get a list of all nearby units so as to write code controlling how the AI "sees".
This is another good example of the limitations we have. An AI unit 'sees' every enemy unit that any friendly unit 'sees'. Even though that unit may be hidden on the back side of a hill, it is 'visible' because some other friendly, standing in a different place, can see it.

risorgimento59 also mentions the need for some cross Think() method persistence of situational knowledge.
This is true. The KS mod has recently implemented such a system. It's not particularly elegant, but it works. However, the strategic AI, (the part we do not have code for), doesn't know about the things we think are important and can override our plans at any time. So checks have to be implemented so that unwanted interference from the inaccessible code doesn't ruin things.

As for AI revamps, I'd think that knowing that the Think() method is called for every unit periodically (though I don't know just how often) gives me much flexibility, but to really get working, I will need a thorough layout of every sensory, effectory and message passing interface available. For me, the ideal is to develop some natural language processing mechanism and learning model, after which AI behaviours are built through demonstration and reinforcement, or by literally having them read through text files containing drill manuals. i.e. no more hard coded rules, improved or not.
Communication from the AI to the player was successfully implemented in the latest version of the mod. It has limitations, but short messages can be sent. So in theory, some limited form of a natural language system could be created.

A dynamic learning AI would be ideal, but the limitations that we have in communicating the tactical plan to the game engine will be challenging.

By saying all this, I'm not trying to discourage you or anyone else from making attempts to improve the AI behavior. I'm just saying that there are limitations and challenges as to what can be done, given the code we have.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  Mr. Digby on Sat May 05, 2018 6:00 pm

Mr. Haelscheir, it would be very useful to have you, Didz and risorgimento59 join us, if not for an online game, at least for a live discussion on Teamspeak. You can get so much done via live discussion as opposed to forum texts.

_________________
The other Martin - Charles Reille, le dernier Maréchal de France.

"Any hussar who has not got himself killed by the age of 30 is a jackass." - Antoine Charles Louis Lasalle, commander of Napoleon's light cavalry, killed in battle at Wagram 6 July 1809, aged 34.

"I had forgotten there was an objective." - Generallieutenant Mikhail Borozdin I
avatar
Mr. Digby

Posts : 4951
Join date : 2012-02-14
Age : 58
Location : UK Midlands

Back to top Go down

Re: Deciphering the AI system

Post  risorgimento59 on Sat May 05, 2018 7:59 pm

Uncle Billy wrote:We also cannot tell a unit to move to Saint-Amand as the coordinates of map locations are not available.
We also have no way of calculating a location, (x,y), and telling a unit to go there.

Shouldn't eComMoveSpec do the job, on the paper?
But your point is certainly right, don't get me wrong, Uncle Billy.
We don't have enough data at the moment exposed to the DLL about the world environment.
But at the time it was decoupled from the main codebase, it wasn't expected to satisfy the thirst of rather lunatic people, I'd suspect...
Anyway we can't perform any serious analysis atm. That's a fact.

We need both raw/general data like map size, etc. the elevation model, map locations (of course Rolling Eyes), buildings collision meshes, etc. exposed.
But also post-processed stuff like a road network graph, towns navigation meshes, etc. I think.
Might we compile a list to get an idea, maybe?

I agree with Mr. Digby idea too, if I'm in the conditions to assert so.
Because I can't bring much more than my extravagant english text to any conversation, however.
Your acoustic health would suffer badly...

Best regards.

risorgimento59

Posts : 20
Join date : 2015-06-19

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Sat May 05, 2018 9:13 pm

Shouldn't eComMoveSpec do the job, on the paper?
Unfortunately, no. That command is used by the courier menu system that the player can use to move troops around. The "Comm" system used by the AI is unable to supply the game engine the variables necessary to use it.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  Didz on Sun May 06, 2018 9:09 am

Uncle Billy wrote:The incidents you mentioned were very likely horse guns. Indeed those were used to support cavalry and infantry advances, rear guard defense, etc. That was a common practice in all armies of the period. Foot batteries, on the other hand did not move around much once they were in position, Senarmont excepted. Supported horse batteries in the KS mod will move closer to the enemy than foot. However, they will not move forward with an attack as the AI cannot keep clear lanes of fire open to them. They would simply sit there unable to fire.
If not horse artillery then certainly the lighter field guns e.g. 6pdr and 8prd.  The 12pdr's would naturally be less likely to be used for close support, though personally I suspect that at Waterloo some of them were moved forward once the battle began.  DeSales tells us that when he was placing these guns ready for the initial bombardment in preparation for D'Erlon's attack he had found it impossible to place any on the crest of the high ground overlooking La Haie Sainte because he discovered much to his discomfort that enemy riflemen in the orchard on the forward slope had the crest covered with rifle fire.  An attempt to bring forward a gun resulted in most of the gun team being disabled before it could even unlimber.  He therefore placed the guns on the ridge behind it, even though they would have had a restricted line of sight.

However, later in the battle once La Haie Sainte had been invested by the 13e Legere and D'Erlons attack was in full swing, it sounds as though DeSales must have ordered these guns forward again to the crest overlooking the farm.  Unfortunately, it sounds as though this movement was in full swing when the British heavy cavalry launched their assault and it was probably some of these guns that were overrun by them.  It certainly explains why when the British cavalry burst in amongst the them they still had their carriages in attendance together with the young boys who acted as their teamsters.  Normally they would have been 300 paces to the rear and out of harms way, but apparently when the British cavalry arrived they were still in attendance with the guns and the youngsters who were unarmed and unable to escape got slaughtered.

Also later maps of the battle clearly show French guns on that forward crest, so clearly they had been moved forward at some point after the battle began.  I've also heard that at Borodino a similar forward movement was necessary because the original bombardment line was too far from the enemy.

Patrick Griffith mentions a number of tactical doctrines which were followed by French Artillery acting in close support including 'Counter-advancing', the defence of villages, massed batteries and of course Senarmonts aggressive use of artillery at Friedland.  But also Wagram where mobile heavy artillery was used to break up Kollowraths attack, Hanau where cavalry with artillery in close support broke the main Bavarian battle line.  As Foy says 'the best tactic for artillery is to get up close and shoot fast.'
Uncle Billy wrote:By saying all this, I'm not trying to discourage you or anyone else from making attempts to improve the AI behavior. I'm just saying that there are limitations and challenges as to what can be done, given the code we have.
Personally, as I said to @risorgimento59 I'm not looking for improvements in the AI at this point.  This debate began because having watched Mitra's video on 'How to use the AI successfully' I was hoping to find a bit more information on how the players choice of stance and the like influenced its behaviour.  At present the manual is very vague, and Mitra mentions a few things but stopped short of providing the obvious resource of a stance table showing what impact each stance has on the AI's options.

For example I've actually won the 'D'Erlons Attack' scenario by simply issuing an order to each of my AI Division Commanders to adopt 'Attack' stance and 'Move to Mont St'Jean'. But I have no idea if that was the best stance to use or even what influence it had over the AI, i just used it because it was the right word for what I wanted the AI to do.  At the Battle of Wernberg I tried setting everyone on 'Hold' stance and ordered them to attack Wernberg and they seemed to do just as well, and now I'm fighting Smolensk with everyone on 'Probe' and so far they seem to be coping quite well in forcing a crossing over the Dnieper river.

But it would be nice to know what these differences make to the AI, and its a shame that Mitra never provided a summary in his guide.
avatar
Didz

Posts : 136
Join date : 2017-07-03
Age : 63
Location : UK

Back to top Go down

Re: Deciphering the AI system

Post  Mr. Digby on Sun May 06, 2018 11:33 am

Just on a historical note there were no 8pdrs at Waterloo. All the artillery were 6pdrs except for 1 or 2 reserve batteries at each Corps level, plus the batteries of the Old Guard. The charge of the Household and Union brigades swept through two batteries that were advancing behind D'Erlon's attack. These guns were advancing from the main ridge that the French occupied at 11 o'clock towards the intermediate ridge that ran to the ENE just SE of La Haye Sainte. As you say, this was the ridge that was covered by rifle fire from the gravel pit, but when the 95th were driven from this position, it was the favoured ridge for the French to move their guns onto. I would suggest that these two batteries intended to form a secondary battery there at a range of 500-600 yds from the Allied line instead of remaining at the 900+ yds range of the more southerly ridge. This is the kind of movement that the game already covers for foot artillery.

The divisional and corps horse batteries were far more mobile due to larger horse teams and mounted gunners and I understand it was these that moved up near La Haye Sainte later in the day and caused Wellington's centre so much grief. While its rare to see the AI deploy its horse guns far forwards I have, on a few occasions been ravaged by AI short range artillery, brought up in support of cavalry that was pinning my battalions into square, though if my memory serves I have seen this happen only once or twice in hundreds of games. I agree it would be good to see the AI be more mobile with its artillery, especially horse artillery.

I think its only to be expected that initial historical deployments of artillery would be at extreme ranges simply because an enemy would make objections to guns being deployed much closer and the act of deploying your artillery might precipitate the battle opening. Guns would bound forward to a more effective range (though still not close range) once enough smoke was present to mask the movement, or enemy guns capable of hurting your advancing artillery had been driven away.

This is a feature we rarely see in SOW:WL or SOW:GB because of the design system of the game. Most of our battles are encounter games where the forces start out of contact and move into contact during the MP game. In reality a fairly high proportion of Napoleonic (and ACW) battles were set piece affairs where the contact was made on one day, armies deployed on favourable ground overnight and battle commenced the following day. Only division-level and some corps-level actions developed usually from encounters, though Lutzen in 1813 is an exception. Even then, the Allies knew mostly where the French were and planned a dawn advance against suspected positions. This subject falls into the game design sphere and I find that many of our MP games, while exciting, do not feel very much like Napoleonic battles due to this "double blind" starting condition.

If we had more scenarios start with armies deployed, I wonder what the AI would do with its artillery then?

_________________
The other Martin - Charles Reille, le dernier Maréchal de France.

"Any hussar who has not got himself killed by the age of 30 is a jackass." - Antoine Charles Louis Lasalle, commander of Napoleon's light cavalry, killed in battle at Wagram 6 July 1809, aged 34.

"I had forgotten there was an objective." - Generallieutenant Mikhail Borozdin I
avatar
Mr. Digby

Posts : 4951
Join date : 2012-02-14
Age : 58
Location : UK Midlands

Back to top Go down

Re: Deciphering the AI system

Post  risorgimento59 on Sun May 06, 2018 2:12 pm

Uncle Billy wrote:Unfortunately, no. That command is used by the courier menu system that the player can use to move troops around. The "Comm" system used by the AI is unable to supply the game engine the variables necessary to use it.

Opps. Forgot it translates to simple move... Embarassed

Anyway, quick and dirty way to get the map locations (x, y, name):

Code:
#pragma pack(push)
#pragma pack(1)
 struct MapLocation { // size = 0x30 bytes
 msvcrt80::float_opt_64_t x;
 msvcrt80::float_opt_64_t y;
 std_msvcrt80::basic_string<char> name; // 0x10
 std::uint8_t _unk_2c[0x04]; // 0x2C
 };
#pragma pack(pop)
 extern std_msvcrt80::vector<MapLocation> &s_maplocs;

Code:
std_msvcrt80::vector<NorbWar::MapLocation> &NorbWar::s_maplocs = *reinterpret_cast<std::add_pointer<std_msvcrt80::vector<NorbWar::MapLocation>>::type>(UINTMAX_C(0x007A9748));




The array offset will change with the coming patch, obviously. But it's a matter of secs to find it again.

I couldn't test your new cavalry scout feedback system yet.
May it help for referring to named locations?

Best regards.

risorgimento59

Posts : 20
Join date : 2015-06-19

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Sun May 06, 2018 3:53 pm

Didz wrote:But it would be nice to know what these differences make to the AI, and its a shame that Mitra never provided a summary in his guide.
The stance you set will have an effect on the AI's prosecution of the battle. However, it will very much depend on the situation on the battlefield. I'd suggest you play the same scenario using the same strategy each time but different stances. Do this for a couple of different battle types, i.e. meeting engagement and fixed positions. By repetition, you should be able to find that certain stances work better than others in particular situations. Trial and error is how I learned to select them appropriately. Speaking only for myself, that was best part of the game. Learning what to do in different situations and trying to fight the battles as the real commanders of that period did rather than trying to use 20th century tactics is why I still play this game.

risorgimento59 wrote:Anyway, quick and dirty way to get the map locations (x, y, name):
Even with the x,y information, there is no way to place it in to the CXPos class or extract the x,y information from a unit's position to find a distance between two points.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  risorgimento59 on Sun May 06, 2018 4:14 pm

Uncle Billy wrote:Even with the x,y information, there is no way to place it in to the CXPos class or extract the x,y information from a unit's position to find a distance between two points.

That's not a real problem, just different names.
The aggregation of my x,y fields is exactly a CVec.

Code:
#pragma pack(push)
#pragma pack(1)
 struct CVec {
 msvcrt80::float_opt_64_t x;
 msvcrt80::float_opt_64_t y;
 };
#pragma pack(pop)

If you make CXVec::m_vec pointing to that, you've got a CXVec.
Which is the location part of CXPos.
The direction part is not needed to describe map locations, obviously.
It should work.

risorgimento59

Posts : 20
Join date : 2015-06-19

Back to top Go down

Re: Deciphering the AI system

Post  Didz on Mon May 07, 2018 9:07 am

MrDigby wrote:Just on a historical note there were no 8pdrs at Waterloo. All the artillery were 6pdrs except for 1 or 2 reserve batteries at each Corps level, plus the batteries of the Old Guard. The charge of the Household and Union brigades swept through two batteries that were advancing behind D'Erlon's attack. These guns were advancing from the main ridge that the French occupied at 11 o'clock towards the intermediate ridge that ran to the ENE just SE of La Haye Sainte. As you say, this was the ridge that was covered by rifle fire from the gravel pit, but when the 95th were driven from this position, it was the favoured ridge for the French to move their guns onto. I would suggest that these two batteries intended to form a secondary battery there at a range of 500-600 yds from the Allied line instead of remaining at the 900+ yds range of the more southerly ridge. This is the kind of movement that the game already covers for foot artillery.
I believe the 6pdr's were mostly captured Austrian pieces, unless the French had switched systems.  The original calibres set for French guns were I believe multiples of four e.g. 4pdr, 8pdr, 12pdr.  The 6pdr's were originally employed as battalion guns, and only later incorporated into the artillery proper.  I'm interested to note that you seem to have found some confirmation of the fact that the artillery overrun by the British cavalry were indeed making there way to the high ground overlooking La Haie Sainte.  Can you remember where you read this, as I've never seen it in any of the histories, and merely surmised that it must have been the case from the primary evidence noted in journals.  DeSales actually mentions the fact that he tried initially to place the guns on this forward position, but I haven't seen anything suggesting he tried to move them up later.  Though it does make perfect sense that he would.  Of course the only disadvantage of re-positioning bombardment pieces after a battle has begun is that ones visibility might be obscured and make it hard to place the wheel marks for the targeting.
risorgmento59 wrote:I couldn't test your new cavalry scout feedback system yet.
May it help for referring to named locations?
I'm actually trying out the latest version of the KS mod at the minute and used the cavalry scouting feature to locate the Russian army.  Personally, I would have found the option to order them to scout a location much more useful than the cardinal system.  I also realised that issuing the command at Divisional level, actually results in every regiment sending scouts off in the same direction which is a bit of an overkill.  Next time I use it I shall try and issue the command to individual regiments and send the scouts from each in a different direction.
Uncle Billy wrote:The stance you set will have an effect on the AI's prosecution of the battle. However, it will very much depend on the situation on the battlefield. I'd suggest you play the same scenario using the same strategy each time but different stances. Do this for a couple of different battle types, i.e. meeting engagement and fixed positions. By repetition, you should be able to find that certain stances work better than others in particular situations. Trial and error is how I learned to select them appropriately. Speaking only for myself, that was best part of the game. Learning what to do in different situations and trying to fight the battles as the real commanders of that period did rather than trying to use 20th century tactics is why I still play this game.
This is basically what I've been told to do on the Steam forum but it seems a very sloppy way to document a strategy game.  Mitra could easily have supplemented his video with a simple summary table highlighting how stances affect the AI's prosecution of a battle and that would have given every player a decent reference to use when formulating their orders.  I can't say I'm very impressed with this suck and see approach to learning the game.  I'd rather spend time playing a game that's been properly documented to be honest. I'm trying out the latest KS Mod at the minute and find it really irritating that I have all these stance options available but no idea what they actually do in terms of AI behaviour.

For example: I played the entire Wernberg scenario on HOLD stance, and the latest one is being played on PROBE stance, but I can't say I've noticed much difference in the way the AI is reacting.  It becomes more annoying when you would actually like to encourage a certain type of behaviour, but have no information as to which stance might be the best to do so.


Last edited by Didz on Tue May 08, 2018 9:59 am; edited 1 time in total
avatar
Didz

Posts : 136
Join date : 2017-07-03
Age : 63
Location : UK

Back to top Go down

Re: Deciphering the AI system

Post  Mr. Digby on Mon May 07, 2018 1:58 pm

The French acquired 1000s of 6pdrs after defeating Prussia in 1806. The Prussian 6pdr was found to be an excellent weapon with about as much range and destructive force as the French 8pdr but needing fewer horses to pull the limber and IIRC several fewer caissons per battery due to smaller/lighter shot and less powder needed. It was the requirement for fewer horses that really nailed it for the French, especially as their campaigns went on and horses became harder to procure. The Prussian barrels were fitted to standard Gribeauval carriages of course.

Austrian guns were universally of poorer design than French and the Austrians didn't have many 6pdrs in 1805, it was mostly horrible 3pdrs and 4pdrs.

I am afraid I can't recall where I read the account of the British cavalry colliding with the limbered French batteries, I have read 100s of books on Waterloo and now could not re-find the source. Martin James is the man to quiz on sources as he seems to keep tabs on what he's read, where and when!

But all this isn't really relevant to the discussion at hand. I just wanted to point out that horse guns were often extremely mobile and foot batteries were not, and usually might only reposition once (towards the enemy) in battle. The lack of ease of moving them in battle is accounted for by the numbers of guns captured by an enemy when major battles are lost, and this even in a period of military trained and professional limber drivers.

_________________
The other Martin - Charles Reille, le dernier Maréchal de France.

"Any hussar who has not got himself killed by the age of 30 is a jackass." - Antoine Charles Louis Lasalle, commander of Napoleon's light cavalry, killed in battle at Wagram 6 July 1809, aged 34.

"I had forgotten there was an objective." - Generallieutenant Mikhail Borozdin I
avatar
Mr. Digby

Posts : 4951
Join date : 2012-02-14
Age : 58
Location : UK Midlands

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Mon May 07, 2018 4:26 pm

Personally, I would have found the option to order them to scout a location much more useful than the cardinal system. I also realised that issuing the command at Divisional level, actually results in every regiment sending scouts off in the same direction which is a bit of an overkill. Next time I use it I shall try and issue the command to individual regiments and send the scouts from each in a different direction.
As would I, but such are the limitations of the game. You can give the scout unit a specific location to go to by using the command map. To do this, click on the scout unit after it is formed, call up the command map and select a destination. If you are playing with couriers, you will need to be close to the scout unit, otherwise if the scouting unit begins moving, the courier won't be able to deliver the message until the scouts reach their first destination. It's another game limitation.

For example: I played the entire Wernberg scenario on HOLD stance, and the latest one is being played on PROBE stance, but I can't say I've noticed much difference in the way the AI is reacting. It becomes more annoying when you would actually like to encourage a certain type of behaviour, but actually have no information as to which stance might be the best to do so.
As I keep telling you, it's not that simple. What are the styles of the division commanders? Are they naturally aggressive or defensive minded. Your idea of hold or probe may not be the same as theirs. If Napoleon told Massena to hold in place and he thought he could successfully attack, then that is exactly what he did. If the Emperor told Davout to attack with all his divisions and Davout didn't think that was a good idea, then he simply ignored Napoleon. This game endeavors to recreate what it was like to command on a battlefield. The AI subordinates have a personality that colors their planning. If you are a competent commander, then you'll take that into account and adjust your commands accordingly. If you want subordinates that follow your ideas to the letter then just TC them. However, you'll be missing out on the best part of the game.

The way I start every game is to give my division a hold stance. The game is really designed for command at the division level. Then I cycle through each brigade and see how aggressive/defensive is each. That way I'll know that I'll have to give a defensive cmdr. a very aggressive stance if I want him to attack, probe would not be enough. I might need to give him an all out attack order to get him moving and continue moving. If he is naturally aggressive, and I want him to attack, then a defend or probe may be all I'll need. Anything more and he'll turn into a Viking beserker and get his brigade destroyed. For cavalry, I almost always keep them on hold or defend. It is all too easy to lose control of them and no one has ever accused a cavalryman of suffering from self-restraint or intelligence. Losing one's cavalry early in a battle is almost a sure prescription for defeat. Only in the late stage of a battle when I don't care about keeping them on a leash, do I give them an attack stance and let them run amok among the tired and disorganized enemy. Watching the disintegration of an enemy division as my cavalry rides them down is an extremely heartwarming scene. Twisted Evil

None of the above is a guarantee that things will go as I had hoped or planned. The AI commanders will still behave unexpectedly. Countless times I have slapped my forehead and muttered to myself, (to the delight of my fellow players), about how stupidly some commander was acting. He was suppose to go here, not there. He was suppose to continue attacking, not stopping and celebrating his incomplete victory. It's exactly the sort of battlefield descriptions one reads so frequently.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  Uncle Billy on Mon May 07, 2018 5:50 pm

If you make CXVec::m_vec pointing to that, you've got a CXVec.
m_vec is private and not accessible.

_________________
I can make this march and I will make Georgia howl.
avatar
Uncle Billy

Posts : 3064
Join date : 2012-02-27
Location : western Colorado

Back to top Go down

Re: Deciphering the AI system

Post  risorgimento59 on Mon May 07, 2018 6:53 pm

Uncle Billy wrote:
risorgimento59 wrote:If you make CXVec::m_vec pointing to that, you've got a CXVec.
m_vec is private and not accessible.

Hi Kevin.
CXVec::CXVec( const CVec *vec ) is possibly the easiest option.
It makes a deep copy of the given argument, though.
Allocating (and later deallocating) 16 bytes on the heap every time...
On large scales, if I could, I'd avoid it (performance and heap fragmentation).
A rather elegant way could be creating a factory class instead, say NorbUtility::CXVecBlobFactory.
A static method would create a CXVec object by simple and fast casting from const std::uint8_t *.
You'd be responsable of the source memory lifetime, of course.
You'd finally declare that factory class as friend within CXVec, so it can access private members like m_vec.
Another option is making a CXVec constructor that allows you to work on stack memory (mostly living within function body scope).
There are plenty of them, as you see.
Regards. Wink

risorgimento59

Posts : 20
Join date : 2015-06-19

Back to top Go down

Re: Deciphering the AI system

Post  risorgimento59 on Mon May 07, 2018 7:19 pm

Mr. Digby wrote:This is a feature we rarely see in SOW:WL or SOW:GB because of the design system of the game. Most of our battles are encounter games where the forces start out of contact and move into contact during the MP game. In reality a fairly high proportion of Napoleonic (and ACW) battles were set piece affairs where the contact was made on one day, armies deployed on favourable ground overnight and battle commenced the following day. Only division-level and some corps-level actions developed usually from encounters, though Lutzen in 1813 is an exception. Even then, the Allies knew mostly where the French were and planned a dawn advance against suspected positions. This subject falls into the game design sphere and I find that many of our MP games, while exciting, do not feel very much like Napoleonic battles due to this "double blind" starting condition.

If we had more scenarios start with armies deployed, I wonder what the AI would do with its artillery then?

Oh, one of the most interesting thing I would love to see for SOW MP games: generation of 3 or 4 battles (twin/isolated ones too) driven by an heavly abstracted, simplified and sandbox'ed operational layer. No precise or real terrain features and maps, etc. Just logical abstrations (wings, reserves, screens, line of operations, support distances, etc.).
They'd follow a general schema like
1) opening moves / first contact / meeting battles / chokepoint / crossroads contest phase;
2) decisive - most often with deployed armies - battle/s (concentration of forces would be the key... shaped also by first phase outcomes);
3) persuit/rear guard engagement to define the range of victory/defeat.
Dreaming doesn't cost anything... santa

risorgimento59

Posts : 20
Join date : 2015-06-19

Back to top Go down

Re: Deciphering the AI system

Post  Didz on Tue May 08, 2018 10:11 am

Uncle Billy wrote:As I keep telling you, it's not that simple. What are the styles of the division commanders? Are they naturally aggressive or defensive minded. Your idea of hold or probe may not be the same as theirs. If Napoleon told Massena to hold in place and he thought he could successfully attack, then that is exactly what he did. If the Emperor told Davout to attack with all his divisions and Davout didn't think that was a good idea, then he simply ignored Napoleon. This game endeavors to recreate what it was like to command on a battlefield. The AI subordinates have a personality that colors their planning. If you are a competent commander, then you'll take that into account and adjust your commands accordingly. If you want subordinates that follow your ideas to the letter then just TC them. However, you'll be missing out on the best part of the game.
I completely understand and accept what you're saying, and I actually like the idea that the behaviour of your AI Commanders is not entirely predictable.  This was even more noticeable in the Turcan games where commanders could literally misread your commands and wander off in an entirely different direction than intended.  However, none of this alters the fact that as a player you are setting the base behaviour of the AI when choosing a stance (At least assuming that the guidance provided by Mitra's video is accurate), so all I'm really trying to establish is a clear understanding of what parameters are being set by the type of stance we dictate to the AI commander.  

Obviously it would also be nice to know how much that interpretation might vary according to the trait of a particular commander, but as we don't have an option to choose who commands what its beyond player control.  I suppose what one could do is change the stance to account for the personally of the commander.  e.g. choose a particularly cautious stance for a rash commander, or an aggressive one for a cautious commander.  But as the stances seem to have other affects on troops reactions and morale that might not be appropriate.
The French acquired 1000s of 6pdrs after defeating Prussia in 1806. The Prussian 6pdr was found to be an excellent weapon with about as much range and destructive force as the French 8pdr but needing fewer horses to pull the limber and IIRC several fewer caissons per battery due to smaller/lighter shot and less powder needed. It was the requirement for fewer horses that really nailed it for the French, especially as their campaigns went on and horses became harder to procure. The Prussian barrels were fitted to standard Gribeauval carriages of course.
Whilst not wishing to labour the issue further because as you rightly say it's not really relevant to the discussion I did have a vague recollection of Mercer claiming that the French were using at least one battery of 4pdrs at Waterloo. I thought it might have been some later annotation added by an over zealous historian, but going back to his original journal text (rather than the website quote) I discovered that on page 164 he does clearly mention being fired upon by guns which he thought could only be 4pdr's based on their shot and range.

It's certainly possible he was mistaken and I've found at least one oob that lists the guns allocated to each French battery and they are all 6pdr's or 12 pdrs both horse and foot. But its just another little mystery.
avatar
Didz

Posts : 136
Join date : 2017-07-03
Age : 63
Location : UK

Back to top Go down

Re: Deciphering the AI system

Post  Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum