In the digital board game Armello , players battle by rolling dice. Each die has six sides: Sword, Shield, Sun, Moon, Wyld, and Rot. In battles, each player has a specific number of dice, and they roll them all.
A turn is either daytime or nighttime (but not both). A player is either Corrupted or not Corrupted (but not both). When a die explodes , the player rolls an additional die; this die can explode again, giving more dice to roll, and so on. (The result before the die explodes stands.)
After all dice have settled, the attacks and defenses are tallied up. Each attack is blocked by an opposing defense; the rest of the attack, if any, is dealt as damage. For example, if player A has 4 attack and player B has 2 defense, then A deals 2 damage to B. If player A has 2 attack and player B has 4 defense, then both attacks are successfully blocked; B doesn't get any damage. (And the remaining 2 defense is useless.)
Suppose A and B are battling; both start with one die each. The expected amount of damage dealt by A to B can be represented as q p , where p and q are coprime positive integers. Find p + q .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
So, as I see it, the main reason why we can't subtract the expected defense points from the expected attack points is that there exists the chance that B can defend with A not attacking, which will not account for negative attack points, amirite?
Log in to reply
That is correct. If B gets a defense point, then in general, A applies a damage of X − 1 , except in the case where X = 0 . You can see how I adjust for this in the computation above.
Whether it is day or night, or whether or not the player is Corrupted, at each die roll:
Since all dice-rolling ends if a player adds 1 to defence, the maximum defence score that a player starting with one die can achieve is 1 . Let X be the attack score that a player gets, and Y the defence score a player gets. Then P [ X = n , Y = 1 ] P [ X = 0 , Y = 0 ] P [ X = n , Y = 0 ] = ( 6 1 ) n × 6 1 = 6 − n − 1 n ≥ 0 = 3 1 = ( 6 1 ) n − 1 × 3 1 + ( 6 1 ) n × 3 1 = 1 4 × 6 − n − 1 n ≥ 1 and so we obtain the marginal distributions P [ X = n ] = { 2 1 1 5 × 6 − n − 1 n = 0 n ≥ 1 P [ Y = n ] = { 5 4 5 1 n = 0 n = 1 The damage Z inflicted on B by A is determined by comparing A 's X score with B 's Y score. Thus Z = ⎩ ⎨ ⎧ n n − 1 0 X = n ≥ 1 , Y = 0 X = n ≥ 1 , Y = 1 otherwise and hence E [ Z ] = n = 1 ∑ ∞ { n P [ X = n ] P [ Y = 0 ] + ( n − 1 ) P [ X = n ] P [ Y = 1 ] } = 2 1 making the answer 3 .
The expected value is 2 1 .
Let's begin with some simple observations.
So let's simplify our die: we have two sides that attack, one side that attacks and explodes, one side that defends, and two sides that miss (don't give anything). We can treat an explosion as simply a re-roll (but taking into account that we get one extra attack).
The next observation is, even though dice can explode, you can never have more defense than the number of dice you have originally! This is because whenever you get a Shield, that die will not explode, and whenever a die explodes, you only get one extra die, so it's essentially re-rolling the same die. Thus B can have either 0 or 1 defense only.
If the attack is a and the defense is d , then the damage dealt is max { a − d , 0 } : if a > d , then the difference is dealt as damage, otherwise all attack is blocked and there is no damage. (Unfortunately having more defense than attack doesn't heal you.)
It would have been so great if the damage dealt is constant a − d ; if so, by linearity of expectation, the expected amount of damage dealt is simply the expected number of attack minus the expected number of defense. Unfortunately there's that pesky maximum, so we need to handle special cases. But the only time the damage is not a − d is if a < d (if a = d , then the damage is a − d = 0 ). And because we said B only has 0 or 1 damage, a < d can only occur if a = 0 and d = 1 . We only have one special case, after all!
In mathematical notation, we split up E [ damage ] to an easier form:
E [ damage ] = a , d ∑ P ( a , d ) ⋅ max { a − d , 0 } = $a,d$ where $a \ge d$ ∑ P ( a , d ) ⋅ max { a − d , 0 } + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ max { a − d , 0 } = $a,d$ where $a \ge d$ ∑ P ( a , d ) ⋅ ( a − d ) + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ 0 = $a,d$ where $a \ge d$ ∑ P ( a , d ) ⋅ ( a − d ) + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( ( a − d ) + ( d − a ) ) = $a,d$ where $a \ge d$ ∑ P ( a , d ) ⋅ ( a − d ) + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( a − d ) + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( d − a ) = a , d ∑ P ( a , d ) ⋅ ( a − d ) + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( d − a ) = E [ a − d ] + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( d − a ) = E [ a ] − E [ d ] + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( d − a )
(Summations are over all a , d satisfying the condition, if any. P ( a , d ) means the probability of getting a attack and d defense. First equality is by definition of expected value. Second equality is by splitting the summation. Third equality is by simplifying maximum in each case. Fourth equality is splitting 0 = ( a − d ) + ( d − a ) . Fifth equality is by splitting the second summation. Sixth equality is by combining the two first summations. Seventh equality is by definition of E [ a − d ] . Eight equality is by linearity of expectation.)
Additionally, because we know a < d can only occur for a = 0 , d = 1 , we can simplify it further:
E [ damage ] = E [ a ] − E [ d ] + $a,d$ where $a < d$ ∑ P ( a , d ) ⋅ ( d − a ) = E [ a ] − E [ d ] + P ( 0 , 1 ) ⋅ ( 1 − 0 ) = E [ a ] − E [ d ] + P ( 0 , 1 )
Thus, we want to compute E [ a ] , E [ d ] , P ( 0 , 1 ) ; once we get them, the answer follows immediately.
What is E [ a ] ? We can simply try the six possible cases. In two of the cases, we get one attack. In one case, we get one attack, and the die explodes; i.e., a re-roll. In the other three cases, we don't get anything. Thus E [ a ] = 6 2 ⋅ 1 + 6 1 ⋅ ( 1 + E [ a ] ) + 6 3 ⋅ 0 . This simplifies to E [ a ] = 5 3 .
What about E [ d ] ? Similar. One case gives one defense. One other case doesn't give defense, but allows a re-roll. The rest don't give defense. So E [ d ] = 6 1 ⋅ 1 + 6 1 ⋅ E [ d ] + 6 4 ⋅ 0 , simplifying to E [ d ] = 5 1 .
Finally, what is P ( 0 , 1 ) ? Since A's rolls and B's rolls are independent, by product rule this is P ( a = 0 ) P ( d = 1 ) ; the probability A gets 0 attack and B gets 1 defense. The probability of A getting 0 attack is easy: it's simply 6 3 = 2 1 . Three out of six cases don't give any attack. We don't need to care about re-rolls, because if A does get a re-roll, A must also get an attack along with it. The probability of B getting 1 defense is not so easy, because it's possible to have re-rolls; however, we can use a convenient shortcut. We know E [ d ] = 5 1 . Moreover, we know d can only be either 0 or 1; it's impossible to have 2 or more defense. That means P ( d = 1 ) must be 5 1 ; that's the only way it can contribute to E [ d ] !
Thus P ( 0 , 1 ) = P ( a = 0 ) P ( d = 1 ) = 2 1 ⋅ 5 1 = 1 0 1 . In conclusion, E [ damage ] = 5 3 − 5 1 + 1 0 1 = 1 0 5 = 2 1 , so p + q = 1 + 2 = 3 .
Note that we can compute this value for other starting numbers of dice, using the equality E [ damage ] = E [ a ] − E [ d ] + ∑ $a,d$ where $a < d$ P ( a , d ) ⋅ ( d − a ) . The only problem is that the latter term will expand in size dramatically depending on the number of dice by the defender... but at least it's capped, unlike the number of attack which can go to infinite if you keep exploding dice.
By the way, Armello is a pretty good game. If you like any combination of board games, political negotiations, or anthropomorphic animals, consider getting it.
Problem Loading...
Note Loading...
Set Loading...
First, we have to figure out the outcomes of the rolls and what they mean. Whether it is daytime or nighttime, one of Sun and Moon gives you an attack point, and the other does nothing. Whether you are corrupted, one of Wyld and Rot gives you an attack point, and then the die explodes, and the other does nothing. Hence, the possible outcomes can be summarized as follows:
The probability that A gets an attack point on his n th roll is 2 1 ⋅ ( 6 1 ) n − 1 (since there is a probability of ( 6 1 ) n − 1 that he even gets an n th roll), so the expected number of attack points he gets is n = 1 ∑ ∞ 2 1 ⋅ ( 6 1 ) n − 1 = 5 3 .
Player B can only get either 0 or 1 defense points (because if you ever get a defense point, your turn is over). Similar to the calculation above, the probability of getting a defense point is n = 1 ∑ ∞ 6 1 ⋅ ( 6 1 ) n − 1 = 5 1 .
If B gets 0 defense points, then the expected damage is simply A's expected attack points, which is 5 3 . If B gets 1 defense point, then we can generally subtract 1 from A's attack points, but we have to adjust for the case where A gets no attack points. To see how, let X be the number of attack points A gets, as a random variable. Then in this case, the expected damage is 0 ⋅ P ( X = 0 ) + 0 ⋅ P ( X = 1 ) + 1 ⋅ P ( X = 2 ) + 2 ⋅ P ( X = 3 ) + ⋯ = [ 0 ⋅ P ( X = 0 ) + 1 ⋅ P ( X = 1 ) + 2 ⋅ P ( X = 2 ) + 3 ⋅ P ( X = 3 ) + ⋯ ] − [ P ( X = 1 ) + P ( X = 2 ) + P ( X = 3 ) + ⋯ ] = E [ X ] − [ 1 − P ( X = 0 ) ] = 5 3 − ( 1 − 2 1 ) = 1 0 1 .
Therefore, the overall expected damage is 5 4 ⋅ 5 3 + 5 1 ⋅ 1 0 1 = 2 1 .