Showing posts with label my rules solo wargaming. Show all posts
Showing posts with label my rules solo wargaming. Show all posts

Tuesday, 31 December 2024

Solo Gaming - down to the nitty gritty

Well the nitty certainly, perhaps not the gritty just yet.  Due to finding the work I did a decade (or possibly two) ago, I have made more progress on this project than I expected to have done.  What I have so far is a mechanism for deciding if the AI army will fight and in general terms how it will fight, it isn't clever and it's definitely not an elegant solution, but it seems to work.  It uses a set of factors to arrive at a measure of the base aggression of the army.  For the lack of anything else to call it I have termed it a fight or flight test.  It uses ten sets of factors some of which measure the difference between the AI and the player's forces while others look at a single variable.  Each factor generates a score which when added together  give a total which is checked against a table of battlefield grand tactical options.  A high positive result shows a high aggression and willingness to attack and a minus a low aggression and more likelihood of fighting defensively (or withdrawing).


Here is the Fight or Fly decision table.  The scores are from a set of factors

I have given you the results table before the ten tables of factors so you can have some sense of how I have weighted each of the following ten sets of circumstances that build up to the total.  The maximum and minimum that could be theoretically achieved are higher than plus 25 to minus 31 range represented on the table above.   In the tables which follow the green highlighted options are the commonest expected outcomes.


The first two input tables

Table 1 looks at the balance of numbers between the two armies as a ratio, it doesn't consider troop types simply overall numbers.

Table 2 deals with the ability/reputation of the two overall commanders.  It is creating a differential so an outstanding AI commander generates five points but a good player commander then deducts three points for a net comparison of plus two.  You will see this mechanism in a number of the following tables.  If in doubt assume the AI general doesn't consider the player as highly as it should and down grade the player.  Rather like Napoleon dismissing Wellington as merely a 'Sepoy General'.



Table 3 considers the relative morale of the two sides.  Again this is checking for the difference between the two sides.  You could use results from previous battles in a campaign or the morale rating from the rules of your choice or a mixture of both.

Table 4 asks what are the chances of avoiding combat.  Not whether either side wants to do so but could they.  An infantry heavy army facing a highly mobile opponent would be an example of an army where avoiding combat is impossible, although seeking better ground may be an option.


Table 5.  This is considering the effect of the overall strategic position on the AI commanders options.  Rather like Rupert at Marston Moor feeling like he had to attack because of Charles' poorly drafted instructions.  If there are no overarching orders from High Command use the Fight if victory probable option.

Table 6 looks at the relative pugnacity of the two commanders.  An aggressive general facing a defensive opponent is more likely to take the fight to them if all other factors are neutral.


The next two tables look for the effect of different levels of training and combat experience between the two armies.

Table 7 looks at the comparative levels of training of the two armies.  Untrained are civilians pressed into service with no training beyond stand there and try not to die!  Militia are troops with basic training or tribesmen with basic weapon skills as part of their culture.  Trained are Greek city hoplites called out when needed and required to drill at regular intervals during the year.  Regulars are full time professional soldiers.

Table 8 considers the amount of combat experience they have.  Raw troops have never experienced battle.  Experienced have fought at least one engagement while Veterans have fought and survived multiple combats.


Table 9 requires some creative thinking as the AI knows what re-enforcements it expects but has to guess whether the opponent will be getting more troops.  The scouting rules from your tabletop or campaign rules may help with this otherwise use your judgement.

Table 10 takes a look at the lay of the land but only in very general terms.  I'm not fully happy with this and will be playing around with it.  Ignore the player options and only use the top three options for the time being.

There is one remaining factor but it isn't a table like those above.  Its a random factor created by rolling two D6.  One dice is designated plus and one minus add the results together to get a random final figure.

As you can tell from the cut and pasted tables I use a spreadsheet, the factor used boxes are manually calculated and entered but those are picked up and totalled, along with the random factor, by the spreadsheet to give the final score for the fight or flight decision.

What I have here is more like a toolkit and concepts but it allows you guys to tinker with things.  If you don't agree with the weighting of the factors I have created change them.  Alternatively you can change the results table scores for each action.  I tested them against some actual battles treating both sides as if they were the AI side to see how close the result came to the initial plan of the actual commanders.  It gives a reasonable but not 100% match to what I think the original plan was, so it's broadly where I want it to be.  Its a case of tinkering with the balance now.  Have a play and let me know if it seems to work as you would expect.






Wednesday, 18 December 2024

Some thoughts on solo wargaming

A recent Facebook review on a new solo wargaming book got me to thinking about what I would want to read on the topic.  The review pretty much listed what I don't want and apparently the book in question had all of these!  I don't need force generators or scenarios I can do that myself.  I don't want a history of or definition of what solo wargaming is either, most of my games are solo I understand what's going on...honest.  What I want is a non player opponent who makes decisions based upon the situation, pre battle objectives, and tactical options available.  Ideally it would look at the balance between it's forces and mine and decide on an overall approach that suits it's forces strengths and weaknesses and takes advantage of my forces weak areas.  It would also be nice if it could surprise me from time to time and wasn't so smart that I am never able to beat it!  It's not too much to ask is it.  I suppose what I am looking for is some kind of Artificial intelligence (AI).

I suppose the same goes for Wargames


Funnily enough I had to undertake a long drive today (Well not that funny the weather was dismal) and , as you do, tuned into Radio 4 as my usual channel had poor reception.  Lo and behold I stumbled onto a discussion of the development of AI systems.  It seems that in the early days there were two schools of thought about how to create a workable system.  One was based on mathematical models and in effect created huge suites of 'IF THEN' steps.  The other was bio- computational and sought to create what we now call neural nets.  The first was something that was seemed achievable with the technology available but had limits hard wired in by the drafting of the IF THEN alternatives.  On the other hand the neural net had huge issues around being able to create the thing but would then have been self sustaining as it would set most of its own decision making parameters and would learn as it grew (Sounds a tad scary to me)

If I'm brutally honest I understand the concept of IF THEN chains but Neural Nets are beyond me.  I actually started to try to create an AI opponent using a simple set of IF THEN steps over a decade ago and ran into some of the problems that proper IT scientists hit.  The first is that you have to understand the entire decision making chain and second it gets very clunky very quickly as the length of the IF THEN steps increases.

So why am I bothering to write all of the above?  Well in the absence of any clever IT boffin creating a computerised AI opponent for me I am going to have another attempt at the 'IF THEN' approach.  Here is where my thought process has brought me to so far:

Firstly the AI General tries to gather information about the player's forces by scouting and interrogating the local population.  Friendly locals are going to give more help than non friendly ones.  The number of mounted troops (cavalry and or Dragoons) influences this step as does the number of player mounted troops screening against scouts.

Next there is a pre battle assessment where the AI General looks at his troops and compares them to what he knows of the enemy.  This considers troop types, quality, numbers compared to the player's force and the broader operational situation (for example is an attack at poor odds necessary to pull enemy troops away from another location).  A basic tactical decision is made at this stage about whether to engage in battle, to withdraw, hold the ground, redeploy to a better site and similar overarching matters.

Now comes a more detailed tactical review on how to deploy and actually fight.  This considers the ground held by the two armies and who it favours.  The balance and composition of forces and the possible deployment.

All I have to do is create excel spreadsheet formulas to value those decision factors and If Then statements or other options to fine tune the AI options.  Sad to say that is where it all came to a grinding halt last time I tried this.  So here is the thing do any of my readers have any suggestions on what to include, how to weight the various decision factors or even suggestions for something that has already done what I'm considering or even an AI chat bot that could create tactical decisions?

Answers gratefully received in the comment section.