What is the probability of killing two enemies out of four with two random strikes if you know the damage that you deal and the enemies' hitpoints?

42 Views Asked by At

This problem came up in a game I was playing and I was curious how I would apply conditional probability here, or if conditional probability is even appropriate.


Problem: Imagine a turn-based game where you are up against four enemies. Their health points are as follows:

  • Enemy A: 5
  • Enemy B: 8
  • Enemy C: 1
  • Enemy D: 11

You have an option to play an attack that strikes randomly twice. It may strike the same enemy twice if their health pool allows for it (e.g., striking enemy D twice), or it may strike two different enemies. Each time it strikes, this attack deals 8 points of damage. What is the probability that you kill two enemies?


I tried working this out by hand, and here's what I got:

  • Kill A: $\frac{3}{4}$ chance; then $\frac{2}{3}$ chance of killing another = ($\frac{3}{4}) \times (\frac{2}{3}) = \frac{1}{2}$
  • Kill B: $\frac{3}{4}$ chance; then $\frac{2}{3}$ chance of killing another = ($\frac{3}{4}) \times (\frac{2}{3}) = \frac{1}{2}$
  • Kill C: $\frac{3}{4}$ chance; then $\frac{2}{3}$ chance of killing another = ($\frac{3}{4}) \times (\frac{2}{3}) = \frac{1}{2}$
  • Kill D: $0$ chance, then $\frac{4}{4}$ for the second strike since all enemies are within killing range = $0 \times \frac{4}{4} = 0$

We can end up in any one of these four states, so summing them, we get: $\frac{1}{2} + \frac{1}{2} + \frac{1}{2} = \frac{3}{2}$ which... makes no sense because it exceeds $1$.


I also tried applying Bayes' Theorem, but that didn't get me very far as I had trouble identifying what the two probabilities are:

$$ P(A|B) = \frac{P(A)}{P(B)}P(B|A) $$

Where:

  • $P(A|B)$ is the probability of killing a second enemy given that you already killed one
  • $P(A)$ is the probability of killing an enemy on your second hit
  • $P(B)$ is the probability of killing an enemy on your first hit
  • $P(B|A)$... doesn't seem to make sense in the context of this problem

Where am I going wrong? Should I not be treating this as a conditional probability problem?

1

There are 1 best solutions below

3
On BEST ANSWER

I don't know if I'm missing something, but I think it's quite simple. To kill 2 enemies, you cannot hit enemy D. Hence, for the first strike it's $\frac{3}{4}$, and then you need to hit one of the remaining two with less than 8 points of health, i.e. $\frac{2}{3}$. Which gets you to $\frac{3}{4} \times \frac{2}{3} = \frac{1}{2}$