• Hey all - I’ve recently put out an update to my A&A battle calculator/simulator. I’ve added a couple nice new features. I’ve put up a preliminary version below. Let me know if you find any bugs or have any comments.

    http://dskelly.com/misc/aa/aasim.html


  • Tried it with a recent naval battle I was contemplating.
    Didn’t work so well….

    18 fighter, 6 bomber, 12 subs v
    15 fighter, 8 carrier, 6 battleship, 9 sub, 2 destroyers

    The acid test for any calculator is large sea battles with a lot of subs.
    Your calculator says average IPC loss for defender is .534.  The graph says that almost no units would be lost by the defender through round THREE.  The defender would actually be losing units after round 1.
    I tried messing with the defender OOL with not much different results…

    I’ll play with your calc a bit more - with simpler battles…


  • 2 fighters v destroyer

    Infinite loop error message - failed.

  • '12

    The order of loss fields cannot be modified.  2 fighters versus a tank works, 2 fighters versus a destroyer gives me an infinite loop error as well.


  • Thanks for your work.
    If you get it to be accurate, it will be a wonderful tool.  I like the colorful graphs.
    Maybe it’s a big step, but distribution of results would add a LOT.

  • '12

    The graphs are a nice touch.  I used to use your battle calc years ago, I forget why I started using AACalc, might have been a new piece that AACalc covered, it was years ago.

    I agree with Gamerman, a probability distribution graph is something I would really value.  Knowing I win 80 % is great, but what is even better is knowing the odds for winning with 4 pieces or 1 piece and what they are, how many of my subs live and how many of his planes live in a mixed naval battle.

    No doubt the loop error is a simple bug fix, probably an extra ; where it doesn’t belong!  Good work, thanks!


  • Heh, ok that didn’t take long to find the bugs !

    I corrected the loop bug (problem with aircraft hits in sea battles) which should correct both the loop and the large sea battle.

    Here is the sea battle:
    http://dskelly.com/misc/aa/beta/?&rules=1&battleType=2&attFighter=18&attBomber=6&attSubmarine=12&defFighter=15&defSubmarine=9&defDestroyer=2&defAircraftCarrier=8&defBattleship=6

    Here is the 2Fv1D battle:
    http://dskelly.com/misc/aa/beta/?&rules=1&battleType=2&attFighter=2&defDestroyer=1

    OOL should work - perhaps I didn’t explain it well enough.
    See for instance this a 3I 3A v 6I battle so should be even due to infantry getting a bonus with matching artillery if taking infantry casualties first (the default)
    http://dskelly.com/misc/aa/beta/?&rules=1&attInfantry=3&attArtillery=3&defInfantry=6

    See same battle changing the OOL on the attacking side to “AI”, and it gives 33%v65% due to taking artillery first
    http://dskelly.com/misc/aa/beta/?&rules=1&attOOL=AI&attInfantry=3&attArtillery=3&defInfantry=6

    Can you give me a quick mock up of what a probability distribution graph would look like? Maybe in MSPaint or something? Or I can just dump the text - is that what frood does?

    Additionally, I am using google charts API (google does some pretty amazing stuff), so if you can envision it in one of these graphs I can probably create that - http://code.google.com/apis/chart/interactive/docs/gallery.html


  • (ermmm, 2 posts marked as spam so I took out all the links to battles, unfortunately)

    Heh, ok that didn’t take long to find the bugs !

    I corrected the loop bug (problem with aircraft hits in sea battles) which should correct both the loop and the large sea battle.

    Sea battle works.
    2FvD1 battle now works.

    OOL should work - perhaps I didn’t explain it well enough.
    Try 3I 3A v 6I so that should be an even battle.
    Now put in “AI” in the attacker OOL so that it takes artillery first. It now gives 33%v65%.

    Can you give me a quick mock up of what a probability distribution graph would look like? Maybe in MSPaint or something? Or I can just dump the text - is that what frood does?

    Additionally, I am using google charts API (google does some pretty amazing stuff), so if you can envision it in one of these graphs I can probably create that - http://code.google.com/apis/chart/interactive/docs/gallery.html


  • '12

    The OOL problem for me was that the control was not active.  I could not click in the text box and get focus there in order to edit the contents of the box.  It works now.

    This is an example of a bell curve chart.  (F 2%) chance attacker wins with 3 units remaining (no casualties), (D 14% chance attacker wins with 2 unites remaining (1 causality), orange part of graph 34% chance attacker wins with 1 unit remaining etc etc green 2 % defender wins without taking a causality.  It does not have to be multi-colour.  I just want to see what the odds are of winning with 3 pieces, and with 2 pieces, and with 1……not just the odds of winning true or false.

    http://www.calcunation.com/calculators/miscellaneous/bell curve.PNG

    AACalc does this sort of but its not as elegant looking


  • If you’re looking for a calculator that does probability distributions, check out Axis and Allies Recon for iOS (iPhone/iPod/iPad).  It already does this.  I can’t post a link to it here so just google “Axis Allies Recon” and it is the first hit.

    A new version of A&A Recon is in the works for full iPad support as well as a version for Android devices.  I may also create a free web site interface for it soon.

  • '12

    check out Axis and Allies Recon for iOS (iPhone/iPod/iPad)

    A new version of A&A Recon is in the works for full iPad support

    What is the difference between IPad IOS compatibility and full I-pad support?


  • @MrMalachiCrunch:

    The OOL problem for me was that the control was not active.  I could not click in the text box and get focus there in order to edit the contents of the box.  It works now.

    This is an example of a bell curve chart.  (F 2%) chance attacker wins with 3 units remaining (no casualties), (D 14% chance attacker wins with 2 unites remaining (1 causality), orange part of graph 34% chance attacker wins with 1 unit remaining etc etc green 2 % defender wins without taking a causality.  It does not have to be multi-colour.  I just want to see what the odds are of winning with 3 pieces, and with 2 pieces, and with 1……not just the odds of winning true or false.

    http://www.calcunation.com/calculators/miscellaneous/bell curve.PNG

    AACalc does this sort of but its not as elegant looking

    Hmmm, ok I’ll work on this and see what I can come up with.


  • @MrMalachiCrunch:

    check out Axis and Allies Recon for iOS (iPhone/iPod/[u][b]iPad[/b][/u])

    A new version of A&A Recon is in the works for [u][b]full iPad[/b][/u] support

    What is the difference between IPad IOS compatibility and full I-pad support?

    As you know, the iPad has a much larger screen that the iPhone.  Pretty much any iPhone app will run on the iPad, but it doesn’t look pretty; i.e. iPhone apps only use about a quarter of the iPad’s screen and the graphics are more granular.  With full iPad support the app will utilize the full screen.  So, it’s only user interface differences.  With A&A Recon this means with the iPad version you can input the attacker and defender units on one screen, see the probability distribution graphs of both the attacker and defender on one screen, etc.


  • @MrMalachiCrunch:

    The OOL problem for me was that the control was not active.  I could not click in the text box and get focus there in order to edit the contents of the box.  It works now.

    This is an example of a bell curve chart.  (F 2%) chance attacker wins with 3 units remaining (no casualties), (D 14% chance attacker wins with 2 unites remaining (1 causality), orange part of graph 34% chance attacker wins with 1 unit remaining etc etc green 2 % defender wins without taking a causality.  It does not have to be multi-colour.  I just want to see what the odds are of winning with 3 pieces, and with 2 pieces, and with 1……not just the odds of winning true or false.

    http://www.calcunation.com/calculators/miscellaneous/bell curve.PNG

    AACalc does this sort of but its not as elegant looking

    I gave it an update. Let me know what you think.

  • '12

    Good first attempt but I don’t think that pie chart control’s behaviour is going to make your job easy.  The problem is when you go from small battles to larger ones.  The slices on the pie chart don’t necessarily line up.  Say we enter 20 tanks attacking 14.  I would like to see the odds of losing 5 tanks to be next to the slice representing loss of 4 tanks and on the other side the loss of 6 tanks.  Personally, I think a line chart showing a bell curve is most informative as keeps related pieces of info together, ie, loss of 4 or 5 or 6 side by side, not 2, 13, 7 side by side and its easier for the mind to relate to height of points side by side versus size of slices even side by side especially if the pie has 20+ slices.

    For instance, enter a tank battle of 20 attacking 14 in this Sim:

    http://aacalc.nfshost.com/

    Now view the section under Attacker results and notice how those bars in the bar chart form a bell curve.  Losing 0, 1, 19 and 20 tanks are not shown as they are so unlikely to occur.  If the battle only had 6 units you could show every unlikely outcome, since its a battle of 34 units total there are so many ‘likely’ outcomes to display you can truncate the numbers of unlikely outcomes.  If you could turn that on its side or use a line chart showing likely losses along the bottom with the height showing % outcome that would be da bomb.

    What would be super sweet is if you could generate a new window containing this graph along with a heading displaying what was in the battle.  This way one could generate multiple ‘scenarios’ and minimize the windows to be reviewed later and have more than 1 graph, new windows means you can have 1 or 1, 000 graphs on the go.  In VB it was pretty easy to launch new windows so it should be in other languages.  Now if this new window’s size and graph control were re sizable then users could enlarge or shrink the graph as needed.

    Just a minor thing.  Your OOL text box controls look inactive on my system, the text colour of the contents makes it look like the drop down list control for the simulator rules, ie inactive.  I am sure I can’t be the only bonehead who initially thought that control was inactive……or at least I hope I wasn’t!

    Keep up the good work.  The hard part is done, now its for the window dressing.  In my experience, your boss will rarely see the engineering that goes into writing good code.  When I write code for database manipulation, 80% of it is error handling that hopefully never gets executed, hardly glamorous.  They do see the user interface however…A few easy bells and whistles here pays off LARGE!!


  • Ah, thank you for the detailed input. I can try to make those changes happen.

    I created the pie chart and sorted on probability thinking that would be useful - but probably not what advanced players are looking for. What exactly do you use that to determine, anyways? As a casual player, all I really want to determine is whether an attack is a good idea or not.

    If nothing is entered in OOL I use the HTML5 placeholder attribute to display the default OOL. But it does look disabled - I might be able to change that text style or something.

    “80% of it is error handling that hopefully never gets executed, hardly glamorous.”

    It’s true. The good code (and all the error handling) never gets recognized, but a small mistake and it gets immediate recognition!

  • '12

    You know what I am talking about obviously!  Funny how a misplaced ; can seem so deadly yet 100 of lines of code ready to roll back database transactions in case somebody kicks the power cord in the middle of a batch update never get noticed by the higher ups.  Well until a fortune 500 company sues you because their database is corrupt

    Knowing how much you will the battle with determines if the enemy can successfully counterattack you or not or even if its financially worth it.  So you either go into a battle thinking “go so big I cannot be counter attacked” or you end up ‘dead zoning’ a territory then you only want to use just enough to take it. So if you are using 4-5 air units combined with 2-3 land units to clear out 2-3 enemy land units you want to win and have only 1 land unit left while your air units fly away.  Winning a battle like that at the cost of a few airplanes is not success.  In many battles you know the enemy can only counter attack you with a small land force, so you want to the battle 80% of the time with just enough forces that the enemy is 80% likely to take a larger IPC cost to counter attack your surviving force.  I don’t mind winning the battle with 4 tanks and 3 infantry left knowing s/he is 72% likely to win a counterattack.  The enemies 2 infantry and 6 fighters can no doubt counter attack me and win.  I lose 29 IPC most of the time, but s/he loses 26 or 36 or 46 pretty much equally and a great chance of losing even more IPC to win the battle.

    The other bar chart of value in AACalc is the IPC differential.  Again, winning battles where the enemy loses 10 infantry and you win losing 4 tanks, 4 fighters and 2 bombers is going to lose you a war.  It’s nice to enter a battle and determine not only the odds of success, and the distribution of likely outcomes vis-a-vis number of units remaining and lost but also the distribution of IPC differentials in various battle outcomes.

    Again, using AACalc as an example running 1000 iterations of the battle of 20 tanks versus 14.  There is a bottom section titled “Defender IPC losses in excess of Attacker IPC losses:”

    This bar chart shows likely outcomes of the difference in IPC lost in the distribution of likely outcomes.

    Maybe a new window or set of tabs where one one tab/window could contain the summery of the battle, what units started, where, other labels maybe, a second tab with a chart of likely outcomes as far as what units are lost and remaining, and a third tab with the distribution of IPC outcomes in the battle.  That would capture the functionality of AACalc but in a much more modern GUI.  Being able to resize the window and chart dynamically is great.  Once you do it once you will re-use that code for every project.  Being able to launch 2 or 200 windows is really no different in complexity but is really impressive having unlimited windows of information.

Suggested Topics

Axis & Allies Boardgaming Custom Painted Miniatures

226

Online

17.3k

Users

39.8k

Topics

1.7m

Posts