The combart analyzer

Gary Grigsby's World At War gives you the chance to really run a world war. History is yours to write and things may turn out differently. The Western Allies may be conquered by Germany, or Japan may defeat China. With you at the controls, leading the fates of nations and alliances. Take command in this dynamic turn-based game and test strategies that long-past generals and world leaders could only dream of. Now anything is possible in this new strategic offering from Matrix Games and 2 by 3 Games.

Moderators: Joel Billings, JanSorensen

Post Reply
JanSorensen
Posts: 2536
Joined: Sun May 01, 2005 10:18 pm
Location: Aalborg, Denmark

The combart analyzer

Post by JanSorensen »

I realise that making a perfect combat analyzer would be a very daunting task. Hence I dont particularly ask for it to be improved - rather I am merely interested in exploring how it might work and where it fails miserably.

Example 1
Attacker: 1 German 9/8 Arm + 1 German 6/6 Hvy bomber
Defender: 2 Russia Mil
Predicted casulties: Attacker 0.00, Defender 1.00
Predicted chance of taking the territory: 80%.

Attacker 0.00 is absolutely correct. Neither with AA fire nor ground fire will the Russians be able to hit anything.

Defender 1.00 however is not correct. The bomber has roughly a 93% chance of scoring a hit - and the Armor has a 100% chance. So, defender predicted should either have been 1.46 (assuming the armor will fire on the bomber's target 50% of the time) or 1.93 (if the armor somehow knows to fire at the "other" Mil).

Chance of taking the territory is just odd. If the predicted loss was 1.00 for the defender it seems odd that the chance of advance is so large. If the armor will randomly hit either mil the chance is 48% of advancing - if the armor "knows" to hit the other mil its 93%.

I will see about making some more examples to shed a bit of light on this.
JanSorensen
Posts: 2536
Joined: Sun May 01, 2005 10:18 pm
Location: Aalborg, Denmark

RE: The combart analyzer

Post by JanSorensen »

Example 2
Attacker: 1 German 7/6 Inf
Defender: 9 Russian Mil

Prediction: Atk: 0.40, Def 1.00, Prob 0

Attacker is actually correct again - but defender is off. With 7 dice the odds of rolling 16 or higher is around 97% but not 100% as predicted.

Example 3
Attacker: 2 German 7/6 Inf
Defender: 9 Russian Mil

Prediction: Atk: 0.34, Def 2.00, Prob 0

Same problem


Example 4
Attacker: 2 German 9/8 Arm + 2 German 7/6 Inf
Defender: 9 Russian Mil

Prediction: Atk: 0.15, Def 4.00, Prob 0

Same problem with the Inf. Atk seems correct but I havent checked the exact number.


Example 5
Now it gets really odd though.

Attacker: 3 Stukas, 2 German 9/8 Arm + 2 German 7/6 Inf
Defender: 9 Russian Mil

Prediction: Atk: 0.15, Def 4.00, Prob 0

Read that again. Adding the 3 Stukas (which each has about a 78% chance of hitting a Mil) did absolutely nothing to the predicted defender loses. The prob of 0 is also horribly wrong but lets assume its related to the former problem.

Example 6

Attacker: 3 Stukas
Defender: 9 Russian Mil

Prediction: Atk: 0.00, Def 2.30, Prob 0
These seem to be correct.


As far as I can tell sofar the interaction between air and land units in the same attack completely confuses the combat analyzer. I will see what else I can find.



JanSorensen
Posts: 2536
Joined: Sun May 01, 2005 10:18 pm
Location: Aalborg, Denmark

RE: The combart analyzer

Post by JanSorensen »

Example 7

Sadly, it gets worse.

Attacker: 1 Arm, 2 Inf
Defender: 5 Mil

Lets consider the odds of taking the territory. Even if all goes perfectly for the attacker he cannot kill but 3 units. That still leaves 2 Mil in the territory. With only 3 attackers it is hence impossible to advance. Yet the prediction is 74 for taking the territory.

I expect these are the kinds of mispredictions others might have been puzzled by too.
User avatar
Joel Billings
Posts: 33697
Joined: Wed Sep 20, 2000 8:00 am
Location: Santa Rosa, CA
Contact:

RE: The combart analyzer

Post by Joel Billings »

Please send examples of very bad combat analyzer predictions to 2by3@2by3games.com and we'll try to improve it (we need a save with the combat set up so we can see the prediction in the game). Be sure you are using the 1.040 version. Thanks.
All understanding comes after the fact.
-- Soren Kierkegaard
JanSorensen
Posts: 2536
Joined: Sun May 01, 2005 10:18 pm
Location: Aalborg, Denmark

RE: The combart analyzer

Post by JanSorensen »

Joel

I can obviously do that - but it would seem to me I included every detail you need to setup these battles faster than you can receive a mail, save the attached file and load it up in WaW.

Regardless, I will form a series of the worst predictions I can find and mail them to you.
JanSorensen
Posts: 2536
Joined: Sun May 01, 2005 10:18 pm
Location: Aalborg, Denmark

RE: The combart analyzer

Post by JanSorensen »

Actually, something just struck me.

There are basically 3 options for calculating these numbers (as far as I can tell).
1) brute force (trying every combination)
2) some sort of "smart" algorithm that cuts some corners and uses some table look ups.
3) Drawing a large sample and using the sample mean.

I assume you are using 2 - but I might suggest that you could instead add an option for the user to switch between 2 and 3 as well as an input field letting the user decide how large a sample to draw.

Example: I set the option to "analyze by sampling" and the sample size to 1000.

Then the analyzer simply runs the fight 1000 times - and report the average. Depending on how fast a computer the player has he can then enlarge the sample size to get a more accurate picture - or indeed enlarge the sample size for the importent fights.

The advantage or doing it this way is that you can use the exact same routine that you use for the actual battle. Hence there is no need to update the "prediction" routine when the rules change. I am sure that argument alone is worth alot to your programmer as it will save time with future patches :)
JanSorensen
Posts: 2536
Joined: Sun May 01, 2005 10:18 pm
Location: Aalborg, Denmark

RE: The combart analyzer

Post by JanSorensen »

Mail sent with 3 of the "worst" examples of the prediction going wrong.
Post Reply

Return to “Gary Grigsby's World at War”