Armello Damage

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 result of a Sword gives one attack.
  • A result of a Shield gives one defense.
  • A result of a Sun gives one attack if the turn is a daytime turn, otherwise it doesn't give anything.
  • A result of a Moon gives one attack if the turn is a nighttime turn, otherwise it doesn't give anything.
  • A result of a Wyld gives one attack, and the die explodes , if the player is not Corrupted; otherwise it doesn't give anything.
  • A result of a Rot gives one attack, and the die explodes , if the player is Corrupted; otherwise it doesn't give anything.

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 p q \frac{p}{q} , where p p and q q are coprime positive integers. Find p + q p+q .


The answer is 3.

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.

3 solutions

Jon Haussmann
Dec 23, 2016

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:

  • You get an attack point, and the turn is over, with probability 1 3 \frac{1}{3}
  • You get a defense point, and the turn is over, with probability 1 6 \frac{1}{6}
  • Nothing happens, and the turn is over, with probability 1 3 \frac{1}{3}
  • You get an attack point and another chance to roll, with probability 1 6 \frac{1}{6}

The probability that A gets an attack point on his n n th roll is 1 2 ( 1 6 ) n 1 \frac{1}{2} \cdot (\frac{1}{6})^{n - 1} (since there is a probability of ( 1 6 ) n 1 (\frac{1}{6})^{n - 1} that he even gets an n n th roll), so the expected number of attack points he gets is n = 1 1 2 ( 1 6 ) n 1 = 3 5 . \sum_{n = 1}^\infty \frac{1}{2} \cdot \left( \frac{1}{6} \right)^{n - 1} = \frac{3}{5}.

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 1 6 ( 1 6 ) n 1 = 1 5 . \sum_{n = 1}^\infty \frac{1}{6} \cdot \left( \frac{1}{6} \right)^{n - 1} = \frac{1}{5}.

If B gets 0 defense points, then the expected damage is simply A's expected attack points, which is 3 5 \frac{3}{5} . 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 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 ) ] = 3 5 ( 1 1 2 ) = 1 10 . \begin{aligned} &0 \cdot P(X = 0) + 0 \cdot P(X = 1) + 1 \cdot P(X = 2) + 2 \cdot P(X = 3) + \dotsb \\ &= [0 \cdot P(X = 0) + 1 \cdot P(X = 1) + 2 \cdot P(X = 2) + 3 \cdot P(X = 3) + \dotsb] \\ & \quad - [P(X = 1) + P(X = 2) + P(X = 3) + \dotsb] \\ &= E[X] - [1 - P(X = 0)] \\ &= \frac{3}{5} - \left( 1 - \frac{1}{2} \right) = \frac{1}{10}. \end{aligned}

Therefore, the overall expected damage is 4 5 3 5 + 1 5 1 10 = 1 2 . \frac{4}{5} \cdot \frac{3}{5} + \frac{1}{5} \cdot \frac{1}{10} = \frac{1}{2}.

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 B can defend with A A not attacking, which will not account for negative attack points, amirite?

Manuel Kahayon - 4 years, 5 months ago

Log in to reply

That is correct. If B gets a defense point, then in general, A applies a damage of X 1 X - 1 , except in the case where X = 0 X = 0 . You can see how I adjust for this in the computation above.

Jon Haussmann - 4 years, 5 months ago
Mark Hennings
Dec 23, 2016

Whether it is day or night, or whether or not the player is Corrupted, at each die roll:

  • there is a probability of 1 3 \tfrac13 of adding 1 1 to attack,
  • there is a probability of 1 6 \tfrac16 of adding 1 1 to defence,
  • there is a probability of 1 3 \tfrac13 of nothing happening,
  • there is a probability of 1 6 \tfrac16 of adding 1 1 to attack, and having another roll.

Since all dice-rolling ends if a player adds 1 1 to defence, the maximum defence score that a player starting with one die can achieve is 1 1 . Let X X be the attack score that a player gets, and Y Y the defence score a player gets. Then P [ X = n , Y = 1 ] = ( 1 6 ) n × 1 6 = 6 n 1 n 0 P [ X = 0 , Y = 0 ] = 1 3 P [ X = n , Y = 0 ] = ( 1 6 ) n 1 × 1 3 + ( 1 6 ) n × 1 3 = 14 × 6 n 1 n 1 \begin{aligned} \mathbb{P}[X=n,Y=1] & = \big(\tfrac16\big)^n \times \tfrac16 \; =\; 6^{-n-1} \hspace{5cm} n \ge 0 \\ \mathbb{P}[X=0,Y=0] & = \tfrac13 \\ \mathbb{P}[X=n,Y=0] & = \big(\tfrac16\big)^{n-1} \times \tfrac13 + \big(\tfrac16\big)^n \times \tfrac13 \; = \; 14 \times 6^{-n-1} \hspace{2cm} n \ge 1 \end{aligned} and so we obtain the marginal distributions P [ X = n ] = { 1 2 n = 0 15 × 6 n 1 n 1 P [ Y = n ] = { 4 5 n = 0 1 5 n = 1 \mathbb{P}[X=n] \; = \; \left\{ \begin{array}{lll} \tfrac12 & \hspace{1cm} & n = 0 \\ 15\times 6^{-n-1} & & n \ge 1 \end{array} \right. \hspace{2cm} \mathbb{P}[Y = n] \; = \; \left\{ \begin{array}{lll} \tfrac45 & \hspace{1cm} & n = 0 \\ \tfrac15 & & n = 1 \end{array} \right. The damage Z Z inflicted on B B by A A is determined by comparing A A 's X X score with B B 's Y Y score. Thus Z = { n X = n 1 , Y = 0 n 1 X = n 1 , Y = 1 0 otherwise Z \; =\; \left\{ \begin{array}{lll} n & \hspace{1cm} & X = n \ge 1\,,\, Y = 0 \\ n-1 & & X = n \ge 1\,,\, Y = 1 \\ 0 & & \mbox{otherwise} \end{array}\right. and hence E [ Z ] = n = 1 { n P [ X = n ] P [ Y = 0 ] + ( n 1 ) P [ X = n ] P [ Y = 1 ] } = 1 2 \mathbb{E}[Z] \; = \; \sum_{n=1}^\infty \Big\{ n \mathbb{P}[X=n] \mathbb{P}[Y=0] + (n-1)\mathbb{P}[X=n]\mathbb{P}[Y=1]\Big\} \; = \; \tfrac12 making the answer 3 \boxed{3} .

Ivan Koswara
Dec 20, 2016

The expected value is 1 2 \frac{1}{2} .

Let's begin with some simple observations.

  • We don't care what day of time it is; between Sun and Moon, one of them gives one attack, the other gives nothing.
  • We also don't care whether the player is Corrupted or not; between Wyld and Rot, one of them gives one attack and explodes, the other gives nothing (and doesn't explode).

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 a and the defense is d d , then the damage dealt is max { a d , 0 } \max \{a-d, 0\} : if a > d 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 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 a-d is if a < d a < d (if a = d a = d , then the damage is a d = 0 a-d = 0 ). And because we said B only has 0 or 1 damage, a < d a < d can only occur if a = 0 a = 0 and d = 1 d = 1 . We only have one special case, after all!

In mathematical notation, we split up E [ damage ] E[\text{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 ) \begin{aligned} E[\text{damage}] &= \sum_{a,d} P(a,d) \cdot \max \{a-d, 0\} \\ &= \sum_{\text{\$a,d\$ where \$a \ge d\$}} P(a,d) \cdot \max \{a-d, 0\} + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot \max \{a-d, 0\} \\ &= \sum_{\text{\$a,d\$ where \$a \ge d\$}} P(a,d) \cdot (a-d) + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot 0 \\ &= \sum_{\text{\$a,d\$ where \$a \ge d\$}} P(a,d) \cdot (a-d) + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot ((a-d) + (d-a)) \\ &= \sum_{\text{\$a,d\$ where \$a \ge d\$}} P(a,d) \cdot (a-d) + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (a-d) + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (d-a) \\ &= \sum_{a,d} P(a,d) \cdot (a-d) + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (d-a) \\ &= E[a-d] + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (d-a) \\ &= E[a] - E[d] + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (d-a) \\ \end{aligned}

(Summations are over all a , d a,d satisfying the condition, if any. P ( a , d ) P(a,d) means the probability of getting a a attack and d 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 ) 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 ] E[a-d] . Eight equality is by linearity of expectation.)

Additionally, because we know a < d a < d can only occur for a = 0 , d = 1 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 ) \begin{aligned} E[\text{damage}] &= E[a] - E[d] + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (d-a) \\ &= E[a] - E[d] + P(0,1) \cdot (1-0) \\ &= E[a] - E[d] + P(0,1) \end{aligned}

Thus, we want to compute E [ a ] , E [ d ] , P ( 0 , 1 ) E[a], E[d], P(0,1) ; once we get them, the answer follows immediately.

What is E [ a ] 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 ] = 2 6 1 + 1 6 ( 1 + E [ a ] ) + 3 6 0 E[a] = \frac{2}{6} \cdot 1 + \frac{1}{6} \cdot (1 + E[a]) + \frac{3}{6} \cdot 0 . This simplifies to E [ a ] = 3 5 E[a] = \frac{3}{5} .

What about E [ d ] 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 ] = 1 6 1 + 1 6 E [ d ] + 4 6 0 E[d] = \frac{1}{6} \cdot 1 + \frac{1}{6} \cdot E[d] + \frac{4}{6} \cdot 0 , simplifying to E [ d ] = 1 5 E[d] = \frac{1}{5} .

Finally, what is P ( 0 , 1 ) P(0,1) ? Since A's rolls and B's rolls are independent, by product rule this is P ( a = 0 ) P ( d = 1 ) 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 3 6 = 1 2 \frac{3}{6} = \frac{1}{2} . 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 ] = 1 5 E[d] = \frac{1}{5} . Moreover, we know d d can only be either 0 or 1; it's impossible to have 2 or more defense. That means P ( d = 1 ) P(d=1) must be 1 5 \frac{1}{5} ; that's the only way it can contribute to E [ d ] E[d] !

Thus P ( 0 , 1 ) = P ( a = 0 ) P ( d = 1 ) = 1 2 1 5 = 1 10 P(0,1) = P(a=0) P(d=1) = \frac{1}{2} \cdot \frac{1}{5} = \frac{1}{10} . In conclusion, E [ damage ] = 3 5 1 5 + 1 10 = 5 10 = 1 2 E[\text{damage}] = \frac{3}{5} - \frac{1}{5} + \frac{1}{10} = \frac{5}{10} = \boxed{\frac{1}{2}} , so p + q = 1 + 2 = 3 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 ) E[\text{damage}] = E[a] - E[d] + \sum_{\text{\$a,d\$ where \$a < d\$}} P(a,d) \cdot (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.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...