Aha, I understand your question now.
Let me explain to you then the different things that can happen. I have to admit I haver personally looked at the code in detail, but I am fairly sure that all of these cases are properly handled in the code.
Before I start, note that if the attacking country has
n troops, you are only attacking with
n - 1 (i.e. a territory with 3 troops only counts as 2 while attacking).
Case 1 - Attacking 1 vs Defending 1Both sides "throw" a die. The person with the higher roll wins (equality in favour of defender).
Case 2 - Attacking 2 or 3 vs Defending 1Same as case 1, highest attacker roll counts.
Case 3 - Attacking 1 vs Defending 2A defender can never roll with more dice than an attacker, so this case is equivalent to case 1, as the second troop is ignored.
Case 4 - Attacking 2 vs Defending 2Both sides "throw" two dice. The highest roll of both players is compared like in case 1 and the same happens for the lower rolls, resulting in a 2-0, 1-1 or 0-2 loss.
Case 5 - Attacking 3 vs Defending 2Same as case 4, but the lowest attacker dice is ignored.
Other cases do not exist, as the attacker can never attack with more than 3 and the defender can never defend with more than 2.
Well then. The best case is if you are attacking 3 vs 1 and you are saying there should be a "natural advantage". Well, this is not a war simulation game, first of all. That means that even with 20 vs 1, you will not be stronger than 3 vs 1. There
is however an advantage: the attacker rolls 3 dice and the strongest is taken, while the defender only has one die. Hence the attacker has more chance (not 3 times as much per se!) rolling a higher number. If the defender throws 6, well bad luck, you won't win as attacker anyhow. If the defender throws 3 however, you need to roll 4 or higher as an attacker to win. Obviously, the chance in doing that in 3 rolls is higher than doing that in 1 roll, thus providing the attacker advantage.
I hope I answered your question. Like I said, I have not checked the code, but as these are the official rules, I am assuming this is how the attacking is implemented.
EDITWikipedia has a nice overview of the changes in each of the above cases. It clearly shows the difference if you understand what it means:
http://en.wikipedia.org/wiki/Risk_(game)#Dice_probabilities
Aha, I understand your question now.
Let me explain to you then the different things that can happen. I have to admit I haver personally looked at the code in detail, but I am fairly sure that all of these cases are properly handled in the code.
Before I start, note that if the attacking country has [i]n[/i] troops, you are only attacking with [i]n - 1[/i] (i.e. a territory with 3 troops only counts as 2 while attacking).
[b]Case 1 - Attacking 1 vs Defending 1[/b]
Both sides "throw" a die. The person with the higher roll wins (equality in favour of defender).
[b]Case 2 - Attacking 2 or 3 vs Defending 1[/b]
Same as case 1, highest attacker roll counts.
[b]Case 3 - Attacking 1 vs Defending 2[/b]
A defender can never roll with more dice than an attacker, so this case is equivalent to case 1, as the second troop is ignored.
[b]Case 4 - Attacking 2 vs Defending 2[/b]
Both sides "throw" two dice. The highest roll of both players is compared like in case 1 and the same happens for the lower rolls, resulting in a 2-0, 1-1 or 0-2 loss.
[b]Case 5 - Attacking 3 vs Defending 2[/b]
Same as case 4, but the lowest attacker dice is ignored.
Other cases do not exist, as the attacker can never attack with more than 3 and the defender can never defend with more than 2.
Well then. The best case is if you are attacking 3 vs 1 and you are saying there should be a "natural advantage". Well, this is not a war simulation game, first of all. That means that even with 20 vs 1, you will not be stronger than 3 vs 1. There [i]is[/i] however an advantage: the attacker rolls 3 dice and the strongest is taken, while the defender only has one die. Hence the attacker has more chance (not 3 times as much per se!) rolling a higher number. If the defender throws 6, well bad luck, you won't win as attacker anyhow. If the defender throws 3 however, you need to roll 4 or higher as an attacker to win. Obviously, the chance in doing that in 3 rolls is higher than doing that in 1 roll, thus providing the attacker advantage.
I hope I answered your question. Like I said, I have not checked the code, but as these are the official rules, I am assuming this is how the attacking is implemented.
[b][u]EDIT[/u][/b]
Wikipedia has a nice overview of the changes in each of the above cases. It clearly shows the difference if you understand what it means: http://en.wikipedia.org/wiki/Risk_(game)#Dice_probabilities
“This is how humans are: We question all our beliefs, except for the ones that we really believe in, and those we never think to question.”
- Speaker for the Dead, O.S. Card