Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odds in the game of Risk 3

Status
Not open for further replies.

karluk

MIS
Nov 29, 1999
2,485
US
The "conquer the world" board game, Risk, decides the result of an attack on one territory from another by tossing dice. The attacker gets to toss as many as three dice, while the defender is limited to no more than two. To partly compensate for this advantage, the defender wins all ties.

So, in a typical attack, the attacker will roll three dice and pick out the biggest two numbers showing. The defender rolls only two dice and keeps both numbers. The attacker and defender then compare numbers, high vs. high and low vs. low. There are two armies at stake. If the attacker's high number is bigger than the defender's high number, the attacker wins one army. Otherwise the defender wins one army. Similarly, the comparison of attacker's low number vs. defender's low number also results in a win or loss of one army, depending on how low numbers compare.

The problem for your consideration is to calculate the odds of the attacker winning in a three vs. two dice attack in the game of Risk. This means the attacker's long term odds of success from repeated three vs. two attacks.

When I was in college, I took the trouble to calculate these odds by hand. I haven't worked on the problem since then. Risk is well-enough known that I'm sure it's easily possible to find the odds on the internet, but obviously you are supposed to figure it out yourself.

Unless I missed a possible simplification, the calculations required are difficult to perform by hand, but easily done by computer. I will be interested in seeing if the odds I caculated in college are confirmed or disproven by the members of this forum.
 
My data suggests that the margin is different from the calculated.

Can you see anything wrong in the one example I posted?

the 100 trial exercise was to prove that the distribution of numbers was more even than the one I posted

The 10,000 trials of 50 against 50 was to get an average that you could be confident in.

I'm sure many in this forum can duplicate my trials. I'd be interested to know if they get similar results. If I've made a mistake, I can't see it.

**********************************************
What's most important is that you realise ... There is no spoon.
 
==> I am interested in ways to translate the attacker's edge into an estimate of the likely outcome of a battle,
In a 3 vs 2 battle, provided the attacker beings with the same or greater number of armies, the likely outcome is that the attacker will win. In every 3 vs 2 roll, the attacker loses 0.921 armies and the defender loses 1.079 armies.

Here are two fun follow up questions. What is the minimum number of armies that the attacker must have to have a better than 50% of winning, given that the attacker will lose the 3 vs 2 advantage once the attacker army count drops to three and below? Secondly, what is the minimum number of armies (A) the attacker must have, so that even if the defender has one more army (A + 1), the odds still favor the attacker?

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
==> So x=92.68 (approximately), and the attacker should be prepared to lose 42 or 43 armies in the battle and be left with seven or eight. That's a bigger margin than I suggested yesterday, but still not particularly comfortable, in my opinion.
That's consistent with my post 7 Dec 11 10:05. 7.3216 would qualify as seven or eight. :)

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
kwbMitel said:
Can you see anything wrong in the one example I posted?
Yes. It looks to me as if you are not calculating the results of the dice throws correctly. In your post dated 7 Dec 11 1:12, I see seven lines where you appear to be crediting a 1-1 split outcome when the numbers on the dice actually give the defender a win on both. The corrected results give the attacker a 43-35 edge, or 55.13%, which is reasonably close to the predicted odds.

The lines that appear to credit incorrect outcomes are:

kwbMitel said:
39 29 6 4 3 6 4 5 6 6 5
36 24 1 2 4 4 2 5 2 5 2
34 20 1 6 3 6 3 6 3 6 3
31 17 4 2 3 4 3 4 3 4 3
30 16 3 2 5 5 3 5 4 5 4
29 15 3 3 3 3 3 4 3 4 3
28 14 1 5 1 5 1 4 5 5 4
 
==> Can you see anything wrong in the one example I posted?[/i]
You're problems seem to begin in this area:[tt]
41 31 6 2 3 6 3 5 3 5 3
40 30 3 2 6 6 3 3 3 3 3
39 29 6 4 3 6 4 5 6 6 5[/tt]
The 41, 31 looks correct, as does the 40, 30, but the 39, 29 doesn't look correct.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
Well,

the probabilities already give the mathematical expected values of armies lost on both sides per round of 3 vs 2 dice.

You can calculate the mathematical expected value of lost armies after N rounds quite easy from it's probability as 2*N*p.

Let's say the probibility of the attacker to lose an army per dice comparison is pa and the probability of the defender to lose his army is pd=1-pa.

If defender has D armies and attacker has A armies, the goal is to kill D armies. Then the expected loss after N rounds should match D=2*N*pd. The attacker loses 2*N*pa armies at the same time. In the inverse calculation the average number of rounds needed to beat the defender would be D/(2*pd).

In extreme situations the number of needed rounds as minimum is of course D/2 or as the opposite, with a streak of luck the defender kills thee attacker in A/2 rounds.

And the maximum number of rounds will be (A+D)/2, anyway the dices are rolled, always 2 armies are lost per round (neglecting the cases at the end, when less dice are used).

You would need to compute the probabilities for each number of rounds between min(A,D)/2 and (A+D)/2 rounds (more exactly the rounded values, as you can't play half a round of course). This leads to a certain distribution, you would need to figure out the probabilities for each outcome and then could compute a confidence to win in eg 90% of the cases.

There is no need to go into monte carlo simulations, but of course that helps to support theoretical values.

Bye, Olaf.
 
==> Can you see anything wrong in the one example I posted?[/i]You're problems seem to begin in this area:
41 31 6 2 3 6 3 5 3 5 3 40 30 3 2 6 6 3 3 3 3 3 39 29 6 4 3 6 4 5 6 6 5
The 41, 31 looks correct, as does the 40, 30, but the 39, 29 doesn't look correct.

Agreed Defender 6-5 should defeat Attacker 6-4 both times

I'll try and see why my formulas thought otherwise.



**********************************************
What's most important is that you realise ... There is no spoon.
 
Actually things get very bad at around:[tt]
31 17 4 2 3 4 3 4 3 4 3
30 16 3 2 5 5 3 5 4 5 4
29 15 3 3 3 3 3 4 3 4 3
28 14 1 5 1 5 1 4 5 5 4[/tt]

These should all have been 2 win for defender and the program split them.

Just goes to show that another pair of eyes pays off sometimes.

**********************************************
What's most important is that you realise ... There is no spoon.
 
CajunCenturion said:
What is the minimum number of armies that the attacker must have to have a better than 50% of winning, given that the attacker will lose the 3 vs 2 advantage once the attacker army count drops to three and below?
In my opinion, the right way to approach this question is to figure out the minimum number of armies the attacker needs in order to retain a better than 50-50 chance that the defender will lose the right to roll two dice before the attacker loses the right to throw three dice. If the defender starts with 50 armies, he will lose the right to throw two dice when he has lost 49. It seems to me that the critical number of dice tosses occurs at the point when the defender's expected losses are greater than 48.5. That's when it's a better than 50-50 chance that the defender will have fewer than two armies remaining.

But the defender, on average, expects to lose 2*2797/5184 armies per dice toss. So we need

2*2797/5184 * x > 48.5

x > 44.95

Therefore, after 45 dice tosses, the odds favor the defender having either lost all his armies, or having only one left.

Now we need to calculate the attacker's expected losses after 45 dice tosses. The attacker's expected losses are 2*2387/5184 armies per dice toss. So, after 45 tosses, the attacker's expected losses are

2*2387/5184 * 45 = 41.44

If the attacker starts with 45 dice, he expects to have about (45-41.44) = 3.56 armies remaining after 45 tosses. It should be a better than 50-50 shot that he still has four armies left and retains the right to throw three dice.
 
If what you're looking for is that point where the defender is reduced to rolling one die while you still retain the option to roll all three, assuming each party starts with the same number of armies, then I would work that as follows:
Given that the defender loses 1.079 [ (2 * 0.3717) + 0.3358 ] per roll, and the attacker loses 0.921 [ (2 * 0.2926) + 0.3358 ] per roll, work the following simultaneous equations:
x - 1.079r = 1
x - 0.921r = 4
Solving for r gives up
1 + 1.079r - 0.921r = 4 ==> r = 18.9873, which means that you can expect to achieve that 4:1 advantage after 19 rolls of the dice. The minimum number of armies that you'd need in order to engage is:
x - (0.921 * 19) = 4 ==> x = 21.499, which means the minimum number of armies you need is 22.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
CajunCenturion said:
x - 1.079r = 1
x - 0.921r = 4
Cajun, your simultaneous equations are similar to the way I would approach the same problem, but with two exceptions. The first is minor - you are using approximate expected losses per dice throw of 1.079 and 0.921 instead of the exact 2797/2592 and 2387/2592. But your approximations are close and in all likelihood will yield the same result.

But I'm not convinced that your constants of 1 and 4 are correct. I would use 1.5 and 3.5 for the same reasons I gave when I calculated that 45-attack vs. 50-defend slightly favors the attacker. I will think about it overnight and see if my logic still looks right in the morning. If so, I calculate that the attacker can proceed when both players have 16 armies and still have favorable odds of success.
 
Fixed my issues with my program. 1 missing = sign, sigh. The good news is I learned some cool new tricks in the process so it's not all bad.

**********************************************
What's most important is that you realise ... There is no spoon.
 
I stand by my earlier statement that a 16 vs. 16 battle favors the attacker. The numbers, as far as I have been able to calculate them, support this. After 13 dice throws, the attacker's expected number of armies remaining is 4.03 and the defender's expected number is 1.97. So 4 armies attack vs 2 armies defend is likely, but if either side falls below this, it is more likely to be the defender, who has an expectation of only 1.97 armies.

After 14 tosses, the expected number of remaining armies is 3.11 attacker and 0.89 defender. The attacker is more likely to still have four armies remaining than the defender still having two, and if it comes down to 3 armies vs. 1, the attacker will be able to throw two dice against the defender's one, a battle that favors the attacker.

So the attacker's edge in a 16 vs. 16 battle isn't very large, but it seems quite clear.
 
==> I would use 1.5 and 3.5
That's certainly an option, and you can make a case for it, but it's a strategy that's dependent on favorable truncation.

Another way to look at is that the attacker is gaining an advantage of 0.158 armies per roll and to meet the stated objective of ending up with a 3 dice vs 1 die roll, you need to obtain an advantage of >= 3 armies. The number of rolls required for that is 3 / 0.158 = 18.9873 rolls, i.e., 19 rolls which requires 22 armies to engage.

By using 3.5 and 1.5, you're calculating the number of rolls needed to obtain an advantage of >= 2 armies, which only projects to a 3:1 advantage, or a two vs one dice roll. And yes, that happens in 12.6582 rolls. Indeed, if each party starts with 16 armies, then after 13 rolls you'd expect the attacker to have 4.027 armies and the defender 1.973. The attacker has > 4 armies and the defender < 2, but mathematically, you're advantage is only 2.054 armies, not 3. For you to achieve your stated goal of having a 3 vs 1 dice advantage on the next roll, you need an advantage of 3 armies and you can only have that if you truncate away .973 armies from the defender. You cannot truncate away any armies before the 13[sup]th[/sup] roll, but you have to after the 13[sup]th[/sup] roll to meet the objective.

It's a valid strategy, but one which assumes that once the attacker's advantage is greater than 2 armies that it's equivalent to an advantage of 3 armies. That's not an assumption that I would to require as part of my strategy, but again, that's doesn't mean that a strategy that requires that assumption is an invalid strategy.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
Wise men speak because they have something to say, fools because they have to say something. - Plato
 
As the Math in this case eludes me, I've resorted to re-writing my simulator.

The simulator now agrees with the 53.9% calculated earlier

I've added the factors for reducing armies below 4(attacker) and 2(defender)

Averaging out a 1000 trials each:

16 Armies comes in well ahead of 50%
15 55%
14 54.8%
13 52%
12 51%
11 Armies appears to be doing OK: 49% on first but over 50% on next 4 (51.6 over 5000)
10 49%,52.6%,48.5%,48.4%,50.1% = Not enough

Again, my confidence in the simulator is high but I admit I've made mistakes already with this. How does 11 fair against your calculations?

**********************************************
What's most important is that you realise ... There is no spoon.
 
I don't really think the work Cajun and I have done is sufficient to either confirm or refute your simulations. I would regard what we've done more as setting an upper bound on when the advantage in an equal armies battle switches over from defender to attacker. My earlier post presents, I believe, a convincing argument that 16 vs. 16 favors the attacker, but that doesn't eliminate the possibility that 15 vs. 15 (or less) also favors the attacker.

In my view, getting a precise limit on when the advantage switches from defender to attacker is likely to require a detailed enumeration of cases, including an analysis of the probabilities when the attacker is tossing fewer than three dice and/or the defender is tossing only one. I am interested in this question, but haven't done any real work on it yet.
 
OK,

I'm seeing something in my results that doesn't look right anyway. I can get results for all attacker remaining armies from 1 to 16. The results for the defender however always seem to be odd numbers. 1,3,5,7,9... (except for 0 of course).

Maybe this is a result of the Attacker needing to stop with 1 army remaining instead of 0. Actually, that makes sense to me. Does that make sense to you?

**********************************************
What's most important is that you realise ... There is no spoon.
 
The odd number result for Defender makes complete sense now that I've thought about it. This adds confidence for me in the program.

Here are some results from 10,000 trials of 16 vs 16

Average amount of rolls - 15.16 (high = 20, Low = 10)
Average remaining armies for Attacker - 4.0844 (high 16, Low 1)
Average remaining armies for Defender - 2.1345 (high 15, Low 0)
Average Wins for Attacker - 55.35%
Average Wins for Defender - 44.65%


**********************************************
What's most important is that you realise ... There is no spoon.
 
kwbMitel said:
The results for the defender however always seem to be odd numbers. 1,3,5,7,9... (except for 0 of course).
If I'm understanding you correctly, this looks like an error in your simulations. It's certainly possible for the defender to be left with an even number of armies following a 16 vs. 16 battle. In the most extreme case, for example, the defender might roll double sixes every single time, reducing the attacker to a single army while still retaining all 16 defending armies.
 
Thus is the nature of my ability to rationalize. I will try to locate the error. It looked strange (and is), which is why I brought it up.

**********************************************
What's most important is that you realise ... There is no spoon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top