2
\$\begingroup\$

Playing with building a battle system in which opponents each roll a number of d6 equal to their Combat skill, and I want to determine the likelihood of both parties rolling the same highest value. Example - Orc rolls 4d6, with a highest die result of 5, while Gnome rolls 3d6, with his highest die also resulting in 5. . .what kind of formula can illustrate the odds of this occurring depending on the size of the pools? My hang-up is that whatever value is "highest" is not fixed, like it would be if the target roll were a straight 6 or whatever.

\$\endgroup\$

closed as off-topic by Oblivious Sage, Icyfire, daze413, user17995, kviiri Oct 3 '17 at 7:13

  • This question does not appear to be about role-playing games within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ I hate to say it, because it's a question I'd love to answer, but I think this is off-topic here--I don't see how this requires any RPG expertise (as opposed to mathematical expertise) to answer well. I hope you'll post this over at math.se, and maybe I'll drop my first answer over there =) \$\endgroup\$ – nitsua60 Oct 3 '17 at 2:19
  • \$\begingroup\$ Done - appreciate the heads-up. \$\endgroup\$ – Drake Oct 3 '17 at 2:50
  • 4
    \$\begingroup\$ I'm voting to close this question as off-topic because it belongs on Mathematics. \$\endgroup\$ – Oblivious Sage Oct 3 '17 at 3:27
  • 1
    \$\begingroup\$ @nitsua60: And yet this question got two helpful and correct answers (one of which would've been totally off-topic on math.SE), plus your comment implicitly offering yet another one, within an hour of being posted here. Meanwhile, the math.SE version so far has one incomplete answer that doesn't fully solve the problem and (because it's on math.SE) just gives a formula with no links to any handy tools for non-mathematicians to apply it. \$\endgroup\$ – Ilmari Karonen Oct 3 '17 at 7:48
  • 1
    \$\begingroup\$ ... I'm not trying to start an argument here (that's what meta is for), but it does seem to me that the fact that multiple regulars here on RPG.SE can definitively answer this question indicates that, whether or not this question falls inside the scope defined in this site's rules (as written down in the help center and on meta), it does falls squarely within the scope of this site's community expertise. Not to mention that the manner in which it was answered here is, IMO, more useful to an RPG designer than any typical math.SE answer would be. \$\endgroup\$ – Ilmari Karonen Oct 3 '17 at 7:49
3
\$\begingroup\$

This kind of formula

We need to determine the probability of the highest of dice pool \$A\$ being equal to the highest of dice pool \$B\$. To preserve generality, assume \$A\$ consists of \$a\$ \$N\$-sided dice and \$B\$ consists of \$b\$ \$N\$-sided dice.

Let \$1\le y \le N\$. The probability that \$Y\le y\$ is the probability all the \$A_i\$ are \$\le y\$. This is \$\left(\frac{y}{N}\right)^a\$. It follows that the probability that \$Y= y\$ is \$\left(\frac{y}{N}\right)^a-\left(\frac{y-1}{N}\right)^a\$.

Similarly, for dice pool \$B\$, this is \$\left(\frac{y}{N}\right)^b-\left(\frac{y-1}{N}\right)^b\$.

The probability that they are the same is:

$$\sum_{y=1}^N\left(\left(\frac{y}{N}\right)^a-\left(\frac{y-1}{N}\right)^a\right)\left(\left(\frac{y}{N}\right)^b-\left(\frac{y-1}{N}\right)^b\right)$$

Easy.

Of course, if you are more interested in a practical solution for specific pools. Then you can use this anydice program and put in the numbers you want:

N: 6
A: 4
B: 3

output [highest 1 of AdN] = [highest 1 of BdN]

For this the answer is 0.3265.

\$\endgroup\$
  • 1
    \$\begingroup\$ What's Y? It seems like it's (highest roll from among the pool currently under consideration), but I want to be sure I'm following you correctly. \$\endgroup\$ – nitsua60 Oct 3 '17 at 11:34
2
\$\begingroup\$

When I'm puzzling over dice tricks to pull that sound nifty, but I want to know how the odds work out, I use anydice.com, which spits out probability distributions for most things you'd care to do with dice.

I've plotted out your sample example here. The odds of them being equal are about 1 in 3. A brief explanation:

output {1}@3d6 - {1}@4d6 named "best of 3 minus best of 4"

Output "dice expression" named "label" is the basic anydice syntax. Mostly the name is for labeling result lines, as you can see if you switch it to graph mode. But to understand the results we'll be using table mode so the numbers are visible.

{1}@3d6 means "take the highest result of 3d6" - similarly, {3} means "take the lowest". There are built-in functions to do something that simple, too, but I carved this out of a more complicated problem I was working at the time.

Subtracting is a way to compare them, get the idea of how the difference between the highest results changes. I don't know if that matters for your system or not but I thought I'd throw it in.

When the expression results in exactly 0, the highest values of each roll are equal. Seen in table view, this happens 32.65% of the time, or about one-third.

When 4d6 comes out higher, the value is negative, at most -1. You can get that number by changing the table over to "at most" mode, which reveals that happens 40.28% of the time.

When 3d6 comes out higher, the value is positive, at least +1. Changing the table over to "at least" mode puts that at 27.08%.

The site is a useful tool to analyze probabilities, and if you're curious about the odds behind a piece of game design it's worth it to walk yourself through the tutorial.

\$\endgroup\$
  • \$\begingroup\$ Since the OP's (clearly) not super-experienced with this sort of math (or they'd have done this themselves) I think this answer would be better if you explained a little more why/how you constructed the simulation and how to interpret the results. I can imagine plenty of readers looking at the chart and not knowing where you're getting the "1 in 3," or wondering what the heck a zero result has to do with the original question. \$\endgroup\$ – nitsua60 Oct 3 '17 at 11:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.