Message Boards Message Boards

0
|
2833 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Probability of loosing Risk Battle game

Posted 4 years ago

In the strategic board game called Risk, one player can attack up to three soldiers simultaneously, while the defending player can defend up to two. In the case of exactly three attackers and two defenders, the collision is as follows. An attacking player rolls three red dice while the defending player rolls two blue dice. Then they compare the biggest throws of the attacker and the defender. The lesser value loses a soldier, in the case of equal values the attacker loses one soldier. Then the second largest numbers are also compared in the same way. Thus, the battle has three outcomes: 1) the attacker loses two soldiers, 2) each side loses 1-1 soldiers, 3) the defender loses two soldiers.

I wrote a python program to simulate the above experiment 1000000 times and simulated probabilities are as follows: 1) 29.28569 % 2) 33.55411 % 3) 37.1602 %

I want to calculate the above probabilities without simulation (i.e. exact probabilities). Does anyone have any idea,how to go about it? Thanks.

POSTED BY: Himanshu Nagpal
4 Replies

I didn't understand it before. Thank you very much. I really appreciate it.

POSTED BY: Himanshu Nagpal
Posted 4 years ago

The program I showed does not use Monte Carlo to obtain an approximation of the probabilities, but instead counts how many identical outcomes are possible to obtain the exact theoretical probability.

POSTED BY: Bill Nelson

@Bill Nelson

Thanks for your reply. I have successfully written the program to get these probabilities. I want to get these probabilities theoretically using probability theory.

Thank you again.

POSTED BY: Himanshu Nagpal
Posted 4 years ago

Try

roll[dice_]:=Module[{attack=Sort[Take[dice,3]],defend=Sort[Drop[dice,3]]},
   If[attack[[3]]>defend[[2]],{0,-1},{-1,0}]+
   If[attack[[2]]>defend[[1]],{0,-1},{-1,0}]];
Map[{First[#],Length[#]/6^5}&,Split[Sort[Map[roll,Tuples[Range[6],5]]]]]

which in a second returns exactly these probabilities

{{{-2,0},2275/7776},{{-1,-1},2611/7776]},{{0,-2},1445/3888]}}
POSTED BY: Bill Nelson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract