7
\$\begingroup\$

Just came across this rolling mechanic in my feed, and wanted to see an actual results table out of curiosity:

https://homebrewery.naturalcrit.com/share/wyL-vuEIDrbC

For the link averse: Roll 2d20, take the number furthest from 10, rerolling when equidistant.

Conceptually, used for dramatic situations, that could either go really well, or really wrong.

Anydice being my resource of choice for such, I made a valiant effort to cajole the site to answer my question, but I do not know the site well enough to ask it in the right way. Anyone out there who can help me?

\$\endgroup\$

3 Answers 3

13
\$\begingroup\$

You can use an empty die to remove an outcome from the probability space, effectively rerolling it an unlimited number of times.

function: bleem A:n and B:n {
  AD: [absolute A - 10]
  BD: [absolute B - 10]
  if AD > BD {
    result: A
  } else if BD > AD {
    result: B
  }
  result: d{}
}

output [bleem d20 and d20]

Plot.

Link.

\$\endgroup\$
2
  • 7
    \$\begingroup\$ Optionally, you can leave out the last line in the function. From the documentation, "If you do not define the result of a function then it will be the empty die." \$\endgroup\$ Apr 13, 2023 at 4:55
  • 3
    \$\begingroup\$ BTW, as your graph shows, for symmetry it really ought to be furthest from 10.5. But the difference is quite minuscule. \$\endgroup\$ Apr 13, 2023 at 10:58
0
\$\begingroup\$

We can compute the probability distribution of the Roll with Emphasis mechanic.

The probability \$P(D)\$ to get the result D under the Roll with Emphasis mechanic is given by the formula: $$ P(D) = \frac{2|D-10|-1}{181}. $$ Note that this formula us valid for any D expect 10, since there is no possibility under this mechanic to get a result of 10.

The figure below depicts the simulation of 1 million emphasis rolls compared with the theoretical distribution. It is clear that it is slightly favoring rolls on the right of the distribution.

Comparinson with 1 million simulations and the computed distribution

For a completely symmetric distribution one should compute the distance between the expected value of a d20, i.e. 10.5. In this case the values that have 0 probability are 10 and 11.

Mathematical details

Denote with \$d_a\$ and \$d_b\$ the two rolls, and suppose that we do not get the same outcome or two outcomes that have the same distance from 10. Then, $$ \begin{eqnarray*} P(D) &=& P\left(a\mbox{ provides }D\right)\,P\left(dist(b,10)<dist(a,10)\right) + \\ &&P\left(b\mbox{ provides }D\right))\,P\left(dist(a,10)<dist(b,10)\right))\\ &=& 2\, P(a\mbox{ provides }D)\,P(dist(b,10)<dist(a,10)). \end{eqnarray*} $$ since the two probabilities are the same. Here dist(x,y) denotes the distance between x and y. We have then $$ P(D) = 2\frac{1}{20}\frac{2|D-10|-1}{20} = \frac{2|D-10|-1}{200} $$ where \$|\cdot|\$ denotes the absolute value. The probability that the "second" roll has a distance from 10 less than D is obtained in the following way: suppose that D >10, the number of outcomes that have a smaller distance from 10 than D are D-10. The symmetric outcome than have the same distance from 10 is 20-D, so we have other 10-(20-D) = D-10 outcomes. The total number is hence 2(D-10)-1: we have to substract 1 because otherwise 10 is counted twice.

Let's try to clarify this step with an example. Suppose D =14, so there are 4 numbers with a distance less than 5 from 10: 13,12,11,10. The symmetric outcome is 6: there are other 4 values to count, namely 7,8,9,10. Hence we have 7 possibilities (recall to discard one 10 from the list). The number of favorable cases can be hence summed up to D-10-1 + 10-D-1 +1 = , and by Denote the probability that we do not have to reroll at the first attempt with \$Q\$.

Take now into account that the reroll probability: $$ \begin{eqnarray*} P(D) &=& Q +\\ && P\left(\mbox{have to reroll the 1st attempt}\right)Q + \\ &&P\left(\mbox{have to reroll the 1st attempt}\right)P\left(\mbox{have to reroll the 2nd attempt}\right)Q+\\ &&\dots \end{eqnarray*}. $$ Actually, the probability of rerolling is the same for all the attempts and it is independent on the others: let's name it \$E\$. This is given by $$ E = \frac{20+18}{400} = \frac{38}{400}, $$ where in the numerator counts for the 20 couples of rolls with the same number and for the 18 couple of rolls with the same distance from 10 (e.g., (5,15), (3,17), ...), where we discarded the couple (10,10) since it is already included in the previous count; 400 is the number of all the outcomes.

We can write \$P(D)\$ as $$ \begin{eqnarray*} P(D) &=& Q + QE + QE^2 +QE^3 + \dots\\ &=& Q\sum_{i=0}^\infty E^i\\ &=& \frac{2|D-10|-1}{200}\frac{400}{362}\\ &=& \frac{2|D-10|-1}{181} \end{eqnarray*}. $$

where the sum of the series is a known result. Note that this formula us valid for any D expect 10, since there is no possibility under this mechanic to get a result of 10.

\$\endgroup\$
-1
\$\begingroup\$

Given that in D&D a roll is to try to make a target AC or better, these graphs do not match the mechanic.

For example, If the AC were 1, and you wanted to roll 1 or better using 2 dice taking the furthest result from 10, no matter the result you would have a 100% chance.

Your graphs do not reflect this, so right off the bat I know these graphs do not reflect the mechanic in the game.

\$\endgroup\$
3
  • \$\begingroup\$ Hello and welcome to the board! You're answer mentions graphs, was this meant to be a reply to the other answer on this question? \$\endgroup\$
    – Cassie
    Jul 10, 2023 at 7:46
  • 1
    \$\begingroup\$ As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. \$\endgroup\$
    – Community Bot
    Jul 10, 2023 at 9:47
  • \$\begingroup\$ The graphs in the other answers are not probabilities of success, they are probabilities of a given value resulting from a roll. If you want the probability of success for a given target value, you can look at the "at least" graph on anydice \$\endgroup\$
    – Caleth
    Sep 28, 2023 at 11:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .