[RPG] How to calculate the sum of 2 random dice out of a 3d6 pool in AnyDice

anydicestatistics

With AnyDice it's pretty easy to calculate probalities for highest and lowest 2 of a 3d6 pool, namely with:

output [highest 2 of 3d6]
output [lowest 2 of 3d6]

However, this has a bias towards the highest and lowest thrown dice. What I want to calculate is the possible results, without bias. Reasoning behind this is that I want my players to control the outcome. It's not necessarily that the highest or lowest outcome are worse or better, it's simply that I want to offer them a decision. They choose two of the dice, add them together and there is a result. I want to give the luck d20 roll with result such as an encounter more meaning and mental impact ("why did you pick those dice!").

I had hoped AnyDice to have a random function, something like [random 2 of 3d6] but that doesn't exist. My hypothesis was that I could simply add the percentages of [highest 2 of 3d6] and [lowest 2 of 3d6] and divide that number by 2 (since I'm adding two probability calculations with a total of 100%).

But somehow this doesn't feel right. It doesn't include the possibility of a player picking the highest and the lowest number instead of the two highest or lowest.

I've been doing some tutorials in AnyDice and I reckon this definitely CAN be done with a function where the following would happen:

  • Roll 3d6. Then also roll a d3 twice (not 2d3 as it would add up).
  • If the d3 rolls are equal, reroll one until you get two unique d3 rolls.
  • Then use the unique d3 rolls and take those dice from the 3d6 pool.
  • Add those dice together, show results.

An approach of this chance could be that I take simply the average of a single die in the 3d6 pool and then multiply by 2, theoretically approaching all the possible results. This is incorrect as well as it includes all three dice and thus the average can go higher than the max of 2d6.

Perhaps I'm overthinking this calculation by using AnyDice. As the the dice order isn't relevant at all, I simply need to know all possible dice combinations a 3d6 pool can have. Not the sum, but the combinations. This is super simple, because every dice has 6 sides. So 3d6 has 6 * 6 * 6 = 216 total combinations, this includes repetition as I am interested in the probability of each throw. However, I again don't need all three dice. Only 2, which for the sake of calculation can be presumed to be picked randomly.

Another option I can think of in AnyDice is:

  • Roll 3d6 and 1d3.
  • Remove from 3d6 sequence the number in position 1d3.
  • Add the remaining sequence's result and output probabilities.

Okay, long wall of text, but I am just not familiar enough with AnyDice to figure this out. Any help is greatly appreciated.

Best Answer

The accepted solution disregards the core purpose of the actual question (how does user choice affect the outcome), so I had to try and figure it out...

I'm new to anydice, so I welcome corrections/suggestions. Here, if the player rolls their desired outcome on 2/3 dice, that becomes their choice, otherwise, output a random choice from the 3....

function: choice of A:n and B:n and C:n target T:n {
  if A=T { result: A }
  if B=T { result: B }
  if C=T { result: C }
  result: 1d{A, B, C}
}
function: combo of A:n and B:n and C:n target T {
  result: [choice of A+B and B+C and A+C target T]
}

loop T over {1..12} {
  output [combo of 1d6 and 1d6 and 1d6 target T] named "2/3d6 [T]"
}

Outcomes accounting for user target/choice

Here, we can see the huge difference that player choice makes

Chance of getting a 7:

2d6: ~17%

(2/3)d6: ~42%

This matches the mathematical answer:

The probability that a pair of the three dice has sum '7' is $$\frac{3 \cdot 6 \cdot 4 + 3 \cdot 6}{6^3} = \frac{90}{216} = \frac{5}{12} ≈ 42/100 $$ Src: https://math.stackexchange.com/questions/3283971/probability-that-2-dice-selected-from-3-rolled-dice-will-have-sum-7

Related Topic