1 year ago#1
Morrolan
Fresh Member
Blogs: 0
Forum: 14
Votes: 0

Hi all,

I made a small web application to calculate battle odds for the board game Risk, because there were questions in our game group whether to attack or defend in certain situations. I thought I would share the address, if anyone is interested to see how various battle situations could turn up. The calculator is in the following web address:
http://db.cs.helsinki.fi/t/ipuustin/webrisk/ webrisk.jsp

Use of the program should be pretty straightforward: user chooses the number of attackers and defenders, checks the rules version and presses the button. The result diagram shows horizontally all possible end-states (the remaining forces in the winner's army) and vertically their probabilities.

The algorithm is exact, meaning that the result is not an approximation and thus does not vary in several battles with the same parameters. The program works in time O(n*m), where n is the number of attackers and m is the number of defenders. The program is made with Java.

All comments are welcome! Remove 'invalid' from my mail address to mail

Answer
1 year ago#2
brettmeister
Fresh Member
Blogs: 0
Forum: 14
Votes: 0

army) and vertically their

Nicely done program except for one thing. AFAIK, your 'Normal' rule option is incorrect.

The defender can ALWAYS (in every version) roll eitther one or two whenever he has two or more armies left. He is required to roll one die when he has only one army left. (IOW, your 'Old' setting.)

The interpretation that is sometimes found in old versions of Risk is the defender can wait until after the attacker's roll to decide whether to roll one die or two.

The strategy in this variant is pretty easy to work out: - If the attacker's highest two dice add up to 8, on average, both sides will lose an army when 2 dice are rolled. (If the total is higher, the defender will lose more armies. Lower, the attacker will lose more armies.) - If the defender's second highest die is 3 or less, the average ratio of attacker losses vs. defender losses is better when rolling 2 dice than 1. If the defender's second highest die is 4 or more, the ratio of attacker losses to defender is (usually) worse when 2 dice than when rolling one. (If the attacker's highest 2 dice are 4-4

Reply
1 year ago#3
Dona
Fresh Member
Blogs: 0
Forum: 10
Votes: 0

<clip> </clip>

Very interesting . . . a nice piece of work! Another little thing to throw into the mix (assuming you've got a few spare hours on your hands) would be the LOTR Risk combat variations. Namely, if the battle is going on in a 'stronghold' territory then the defender gets 1 added to his highest die and if either side is playing a 'leader' (only one per side per battle) then that player gets a 1 added to his highest die. These effects are cumulative and only affect a single die. This might be handy when making those 'do I attack with the leader in this battle?' decisions because you *have* to move a leader into a gained territory if it was used in that battle and it may be that you'd prefer to use the leader in another battle from the same territory. Just a thought . . .

Reply
1 year ago#4
manceya
Junior Member
Blogs: 0
Forum: 22
Votes: 0

Thanks for commenting!

I own two Risk games with different rule versions, and neither of them allows defender to choose the number of dice he can throw. However, it doesn't even matter, since if defender and attacker throw the dice simultaneously, the defender's dominant strategy is to always roll as many dice as possible. In other words: throwing more dice enhances win probabilities. If this doesn't seem intuitive, think it like this: if the defender could roll a hundred dice, he would do so.

However, I am aware that some old versions allow defender to choose the number of dice he throws after seeing the attacker's roll, just as you stated. As you said, in this case defender's dominant strategy is to roll either one or two dice, depending of the attacker's dice combination. I could make my program to have a rule alternative for this situation, but unfortunately the program's structure is a bit unsuitable for using different basic probabilities. I must also look deeper into math, because while dice rolls are always probabilistically independent, their combinations in this rule version are not, and that may cause some

Reply
1 year ago#5
salafanil
Junior Member
Blogs: 0
Forum: 21
Votes: 0

This isn't hard to do if you are using backtracking (which you most likely are). Just try both possibilities and use the one that is better for the

Reply
1 year ago#6
chandu
Fresh Member
Blogs: 0
Forum: 19
Votes: 0

The rolls are still probabilistically independent, it is just the defenders choice of number of dice that is dependent on the outcome of the attackers roll.

For the calculator, you will need to fix the strategy by which the defender picks that number. This could, for example, be the usual rule of thumb that says that you roll two dice if the second-highest of the attackers dice is 3 or less and one die if it is 4 or more.

Torben

Reply
1 year ago#7
ppnl
Junior Member
Blogs: 0
Forum: 21
Votes: 0

That's not what you want to do. You want to try both ways and use the better one. The information you need to do this should be available at the time you making this calculation.

Reply
1 year ago#8
Juikiters
Junior Member
Blogs: 0
Forum: 20
Votes: 0

Why not use the full strategy, as described in the Risk FAQ (published here occasionally, also available via a quick Google search)?

Of course, it may be that the calculator works by having built in the precomputed probabilities of the various possible outcomes (attacker loses two armies, each lose one, etc.), so it's not convenient to roll the attacker's dice and then decide the defender's number of dice. But all that really means is that you have a new set of precomputed values. (And if you use the full strategy, where the choice varies slightly in a few cases when the defender is nearly dead, that just introduces two more sets of precomputed values.)

Reply
1 year ago#9
Angelo Michel
Fresh Member
Blogs: 0
Forum: 16
Votes: 0

Actually, Bruno, I have already calculated the odds in all cases fror the defender and Torben is (almost) exactly correct.

If the defender has the choice to roll one or two dice, his best odds for the defender are to roll 2 if attacker's second highest die = 3 or less, 1 die is the attacker's second highest die = 4 or more.

The only minor exception is when the attacker rolls 4-4 on his highest two dice which obviously means each defender's die will win on 4,5,6 and lose 1,2,3. The only question for the defender in this situation is whether he wants to resolve the battle quickly or slowly.

Made with recycled electrons!

Reply
2 months ago#10
Hindemith
Guest

Interesting discussion.

Unfortunately the current rules of the RISK board game do not allow the defender to decide how many dice to use AFTER the attacker has rolled his -- so this nice complexity does not exist, and the defender should always use the maximal number of dice available to him.

For some EXCEL based battle analyzer go to http://www.spreadsheetadvice.com/2011/04/battle- outcome-probabilities-for-the-risk-board-game/ . There you will find not only the outcome probabilities for one battle, but also an analyzer for defense configurations ...

Did you know for instance that the most solid defense of two countries (e.g. to defend a continent) is 2 armies in the country facing the attacker and all other armies in the second territory?

Reply
2 months ago#11
jade
Fresh Member
Blogs: 0
Forum: 19
Votes: 0

Looks like a new site. Seems it would be very helpful.

Reply
By entering this site you declare you read and agreed to its Terms, Rules & Privacy and you understand that your use of the site's content is made at your own risk and responsibility.
Copyright © 2006 - 2015 My Sudoku Club