The Risk probability calculator
A bit sad this one....
If you're familiar with the boardgame Risk (Hasbrow), you might find this vaguely useful. On the other
hand, if you do find this applet interesting you could treat it as an early warning that you're
taking the game too seriously.
The applet tells you your chances of
winning any particular Risk bout, and how many armies you can expect to have at the end of it.
You tell it how many armies you (the attacker) has, how many the defender has and it does a Monte
Carlo simulation (10000 runs) to work out the odds. If the number comes out green, you've got a greater
than 50% chance of winning the bout.
For details of the rules, open your Risk box. In summary:
- the attacker can use up to 3 armies, but must leave at least one behind - hence in this simulation he attacks with min(3,n-1) where n is the number of armies
- the defender defends with up to 2 armies
- the bout ends when the defender runs out of armies, or the attacker is reduced to 1
Knocked up in 10 minutes, so please don't decompile the code - I'm embarrassed at how bad it is.
Back to other pointless programs.