# How do I calculate dice probability in the A Song of Ice and Fire system?

Say I need a net hit of 20 or higher. I get to roll 5d6 base, but I get a bonus dice roll of +3. I only get to keep the 5 highest so I would be rolling "8d6 drop lowest 3 rolls" I want to know what formula I would use to calculate the probability for these kinds of rolls in the future.

Example explaining the skill system:
[skill] Agility 5, [specialty] Dodge 3. I make a dodge roll, so I roll 5d6 (from the skill) +3d6 bonus dice (from the specialty), but I can only keep 5 dice (because of my skill). So I roll 8d6 total, and drop the three lowest rolls, adding the 5 remaining rolls to see my net roll.

-
I have edited the question to remove some ambiguity and to clarify the example. My system knowledge is zero, however (the edit is based on understanding of English) so feel free to roll back or re-edit, especially if there's errors. – MrLemon Jun 27 '14 at 12:59
Calculating probabilities with "drop high" or "drop low" is surprisingly hard. – Mooing Duck Jun 27 '14 at 20:39

http://anydice.com/ will do this quite easily for you:

Roll 8 drop lowest 3 (which is just keep highest five) :

output [highest 5 of 8d6]


Click "at least" to see the probability of getting 20+, which is 79.97%

-

This is quite tricky to do, there is no direct formula, but there are some ways to aggregate results to avoid having to check all 68 possibilities. I think the formula is too complex to discuss on rpg.stackexchange.

AnyDice can do this, and it looks like it is coded with a reasonably efficient algorithm.

My Ruby gem games_dice can also do this, and might suit depending on when/how you need to make the calculation, and whether you are comfortable writing Ruby code:

require 'games_dice'
dice = GamesDice.create '8d6k5'
puts dice.probabilities.p_ge( 20 )


The output is "0.7996643".

The code is open-source, and if you want to see the algorithm, look at the method pl_repeat_n_sum_k in the source code . . . but be warned it has been optimised and is quite difficult to understand. I expect this is a different algorithm than AnyDice, as they perform differently. Essentially though, both just look at all possible results, and use some knowledge of how they can be grouped to prevent that taking too long.

-