The second half is an applet that will compute the odds in an attack to the death by any number of armies in a single province against any number in a neighboring province.
All decisions concerning attacks are in the hands of the attacker, except the decision on whether to defend with one die or two, which is a no-brainer. Therefore, everything here is set up from the attacker's point of view.
The numbers come from a program that I tried to get right. (Source code is not posted here, but requests for it will be entertained.) Some simple cases have been manually checked. THERE IS NO GUARANTEE THAT ANY OF THESE NUMBERS IS ACTUALLY CORRECT. I MAKE NO WARRANTY, EXPRESS OR IMPLIED, GABBLE GIBBLE GOBBLE NO INCIDENTAL OR CONSEQUENTIAL DAMAGES OR ANY OTHER KIND OF LIABILITY WHATSOEVER JABBER JIBBER JABBER WOCKY YOUR OWN RISK!!!! There. That feeels better. I am in the U. S. A. after all.
Dice | A-0 D-2 | A-0 D-1 | A-1 D-1 | A-1 D-0 | A-2 D-0 | Gain |
---|---|---|---|---|---|---|
1 - 1 | 0.417 | 0.583 | -0.167 | |||
1 - 2 | 0.255 | 0.745 | -0.491 | |||
2 - 1 | 0.579 | 0.421 | +0.157 | |||
2 - 2 | 0.228 | 0.324 | 0.448 | -0.441 | ||
3 - 1 | 0.660 | 0.340 | +0.319 | |||
3 - 2 | 0.372 | 0.336 | 0.293 | +0.158 |
The scrollable area marked "Losses" under Attacker shows the probability that the Attacker will win with a loss of 0 armies, 1 army, and so on, up to the loss of all but 2 of the armies. Under Defender is the probability that the Defender will win by losing 0 armies, 1 army, and so on. At the bottom you get the total probability of victory for each side, and the average advantage to the Attacker: number of A losses minus number of D losses, regardless of who wins.
Considering the amount of computing this does, it's surprisingly sprightly in performance on any Pentium, up to 50 vs 50 or so. It's quickest if you compute the small cases before the big ones.
Copyright (C) 1997 Daniel Drake. A royalty-free license to reproduce this document in whole or in part is hereby granted provided (i) all additions, omissions, and other changes are clearly marked; (ii) the work is not reproduced as, or as part of, a work for which payment is charged; (iii) this notice is reproduced without change. Quotations for critical or polemical purposes, with proper attribution, are permitted in any case, being obviously fair use.
Document: http://www.dandrake.com/risk.html