Risk Odds Calculator

While on vacation I wrote some spreadsheets that would calculate the odds for different dice variations of the board game Risk. One of the variations is to use an extra die on defense or attack which I was able to calculate, but Excel doesn’t have enough rows to run all the possible rolls if both the attacker and defender have an extra die. Plus, every spreadsheet took some work and there get to be a lot of different combinations that I didn’t want to run, though I still wound up with 27 different spreadsheets. I knew the best thing to do would be to write some kind of program that would let you input the different options and then have it calculate the odds for you. I had tried this once before, but I don’t know if I finished it. When I pulled it up, it didn’t seem to work.

Computers make this kind of thing easy. If you have 5 dice, you can do For:Next loops of 1 to 6 for each dice, then nest the loops to try out all the different combinations. If you want to do 8-sided dice, you change the loops to run from X to Y where X is 1 and Y is 8. Or any other number. Then you keep running totals and give the answers when all the iterations have run their course. But it still took a few nights of working on the project before I started making real progress.

Once I got it working, I used my spreadsheets to check the math in the program. After I got the bugs worked out, everything was agreeing perfectly except when the attackers had an additional die. I narrowed the problem down to a bad formula on the spreadsheet! So it was kind of good to have an independent check. I went back and fixed the blog posts that had the numbers wrong.

I compiled an executable that can be used in Windows, but it doesn’t do the Fighter correctly from Star Wars Risk where you can replace a 1 with a new roll (you can enter the lower limit of the dice as 2 instead of 1 and it will be kind of similar). And it might be neat to turn the program into something that would do the rolling for you when you have big masses of armies facing off. You could enter the number of attackers and defenders and let it roll a certain number of times or until one side loses and it could generate all the rolls randomly and print a tape of all the battles and results.

Time for an iPhone app?

Star Wars Risk Odds

I did a bunch of number crunching to figure out odds with different rolls in Risk Reinvented. But Star Wars Risk – The Original Trilogy also has some rule variations that change the odds of the typical Risk battles. When Rebels attack the Empire’s bases the Empire can defend with 8-sided dice instead of 6-sided dice. Using all the same analysis as last time and figuring out every possible combination of dice thrown by the attacker and defender, it turns out that on average the attacker would need 162 troops to successfully attack a base with 100 defending troops, rolling the dice 132 times. Actually you would need 3 more than that so that you have 3 troops to move in, plus one more to leave on the attacking country. And the luck of the dice could change that profoundly.

Risk Reinvented Odds

While on vacation, I picked up the new version of Risk called Risk Reinvented (or maybe Risk Reinvention, it doesn’t actually say anything on the box except that it offers 3 ways to play), which has an optional set of rules to make the gameplay different. If you accomplish a certain objective (like controlling all of Asia at the end of your turn), you may earn the ability to attack or defend with a bonus die. So in the typical instance of 3 attacking dice vs. 2 defending dice, where the defenders win ties (this slightly favors the attackers), you might attack with 4 dice or defend with 3 dice even though only two troops are still at risk.

So I wanted to know what the odds are when you add dice to the mix. It was pretty obvious that the odds got a lot better when I earned the extra defense die. Then I got the extra attacking die and I was wondering how much of an effect it would have. I couldn’t find this on the internet (this was before I made the Risk Odds Calculator program).

So I built a spreadsheet that would generate every dice combination for six dice (3 attackers vs. 3 defending dice). This meant I had to have 6x6x6x6x6x6 or 46,656 rows. I had to check what the maximum number of rows that Excel can deal with and fortunately it was 65,536.