"Another dice probability question..." Topic
18 Posts
All members in good standing are free to post here. Opinions expressed here are solely those of the posters, and have not been cleared with nor are they endorsed by The Miniatures Page.
For more information, see the TMP FAQ.
Back to the Game Design Message Board
Areas of InterestGeneral

Parzival  20 Oct 2016 11:42 a.m. PST 
Here's the setup: In the board game D&D: Conquest of Nerath combat consists of simple dice rolling, with each unit rolling a specific type of dice, and each unit involved in combat rolls one die. Any roll of 6 or higher is a hit against the opposing forces. Forces consist of the following: Footsoldiers d6 Wizards/Fighters d10 Elementals and Siege Engines d8 Monsters d12 Dragons d20. Dragons take two hits to kill; all other units succumb to 1 hit. Combat continues until either the attacker withdraws or one side's forces are eliminated. For the sake of this question, a Dragon cost 5 gold to create, a Footsoldier costs 1 gold. I've read comments that the Dragon is too powerful and too cheap, and breaks the game, but I think otherwise, namely because in combat I believe the odds favor 5 Footsoldiers in combat against 1 Dragon. How so? Because of the number of dice rolled versus the result required to win the combat. A Dragon rolling a d20 has a 75% chance of hitting a target. So, yes, yowza, he's probably going to kill a Footsoldier… But no matter what he rolls, he can only kill 1 Footsoldier per combat round. Conversely, the Footsoldiers need merely roll two 6s, total, over all the rounds of combat in which they engage in order to kill the dragon. Which means that, even losing a Footsoldier each round, a force of 5 Footsoldiers will roll a total of 15 distinct d6s before they are all eliminated (five rounds of combat, losing one die per round). What I don't know how to do is calculate this probability. I know how to determine if a single 6 is rolled across multiple dice, but not a combination of two 6s over multiple dice. So, anybody know the odds of such an event occurring? (At least two 6s rolled by 15 d6). For a further puzzler, what is the probable number of Footsoldiers the Dragon will defeat before being slain itself? Or, what is its probability of victory, given that it must eliminate all five Footsoldiers, one roll at a time, over 5 rounds of combat? (Note that such a probability inherently assumes its own probability of survival). And for a final puzzler, given the above, with the Footsoldier as the base "cost," what do you think the actual "combat value" of a Dragon is? I contend it's something less than 5, to get a true equivalency (I'm ignoring the Dragon's additional ability of flight, which has no combat value in the game, but which obviously ups the piece's value for other purposes). 
DesertScrb  20 Oct 2016 12:29 p.m. PST 

Extra Crispy  20 Oct 2016 12:29 p.m. PST 
Do you have to score 2 hits in one round or do hits carry over? So out of that entire set of 15 I only need two 6s? Have you tried anydice.com 
Parzival  20 Oct 2016 2:45 p.m. PST 
A hit carries over to the next round, but once the combat phase ends the Dragon recovers its lost hit point. So if a Dragon suffers one hit in combat, but winds up either defeating the opposing forces or withdrawing, the Dragon immediately goes back to having two hit points again. Therefore, to eliminate a Dragon it must be hit twice in a single combat action, though this can take more than one round, or even several rounds. Using our example, 5 Footsoldiers vs. 1 Dragon are in combat. Round 1: Fs roll 3, 3, 5, 1, 6. Dr rolls 11. One Fs is eliminated, Dragon takes 1 hit. Round 2: Fs roll 2, 4, 2, 5, missing on all rolls. Dragon rolls 15. One more Fs is gone, Dragon takes no damage. Round 3: Fs roll 1, 4, 6. Dragon rolls 5. No Fs are eliminated, and Dragon is killed. However, if the Dragon withdraws after Round 1 or 2 above (or the Fs withdraw, depending on who is attacking), then the hit on the Dragon is healed, and any subsequent attack by other forces (or the Fs on their next turn) will have to again make two hits on the Dragon to kill it. 
Mako11  20 Oct 2016 4:02 p.m. PST 
Must be a very weak dragon. Most I've read about and seen can kill several, if not scores of men in rather short order at virtually the same time, with teeth, claws, whipping tail, and flaming breath. 
Extra Crispy  20 Oct 2016 5:09 p.m. PST 

advocate  21 Oct 2016 2:32 a.m. PST 
But the dragon would choose to withdraw having suffered one hit, so you really need to inflict two in a round. Now monsters, who I guess come in at 4 points, would be very underpowered (since they can only take the one hit) compared to a dragon. 
TheOtherOneFromTableScape  21 Oct 2016 9:59 a.m. PST 
Could you please explain how do you arrive at 87.4% ? 
DesertScrb  21 Oct 2016 10:17 a.m. PST 

DesertScrb  21 Oct 2016 10:26 a.m. PST 
Take the odds of rolling a 6 and flip it so you have the odds of NOT rolling a 6. Multiply that number times itself for every die you want to roll (15 here). That's the odds of NOT rolling a 6 on 15 dice. Subtract that from 1 to get the odds of rolling at least one 6 out of 15 die rolls. Then multiply that number times itself to get the odds of rolling at least two 6s on 15 dice. Someone please tell me if that's right. 
Ben Avery  21 Oct 2016 11:03 a.m. PST 
Thanks for the anydice link, Extra Crispy. 
TheOtherOneFromTableScape  22 Oct 2016 3:00 a.m. PST 
Not quite DesertScrb. To kill the dragon you need at least two hits. So inverting the probability is the right way to calculate it, but you need the chance of zero hits plus the chance of one hit, i.e. P(at least 2 hits) = 1 – (P(0) + P(1)) where P(n) is the chance of exactly n hits. As you correctly said for no hits: P(0) = (5/6) ^ 15 = 6.5% But for exactly one hit: P(1) = 15 * (1/6) * [ ((5/6) ^ 14 ] = 19.5% So 1 – (P(0) + P(1)) = 1 – (6.5+19.5) = 1 – 26 = 74% It's a binomial distribution – link 
etotheipi  22 Oct 2016 5:32 a.m. PST 
Since the dragon can withdraw, this is a series of conditional events (Markov chain) problem, not a straight X of Y in Z problem. We want the probability that you roll two hits on the first five dice, plus the probability that you miss with five but hit with four, plus the probability you missed with five and four but hit with three, and so on. But not so far on. If there's only one dude left, I can't roll two sixes with one die (no matter how hard I may have tried in the past!). So this one terminates at the two vs the dragon point, not all the way down to one. We'll wlak through this in the general form. There are "shortcuts" through known theorums, but using them doesn't explain what is going on and it doesn't give you a basis for figuring out other problems where those theorums may not apply. Let's start with the odds of 2vD and work our way up, because that is the easiest way to go. The odds of getting two (or more) sixes on two dice are one minus the odds of getting zero sixes and minus the odds of getting one six. The odds of zero sixes are the odds of one through five on all (both, in this case) dice simultaneously: (5/6)^2 25/36 The odds of exactly one six are the odds of getting a six (1/6) times the odds of not getting a six (5/6) in two permutations – X6 and 6X. So it's: ( 1/6 x 5/6 ) + ( 5/6 x 1/6 ) 5/36 + 5/36 10/36 So the odds of two sixes are: 1 – 25/36 – 10/36 1 – 35/36 1/36 And we already knew that, but the above process is generalizable, so we can walk through it for the larger number of dice. At three dice, the odds of no sixes are: (5/6)^3 125/216 The odds for exactly one six rely on the different permutations for one six – 6XX X6X XX6. So we get: 1/6 x 5/6 x 5/6 + 5/6 x 1/6 x 5/6 + 5/6 x 5/6 x 1/6 25/216 + 25/216 + 25/216 At this point we can see that there is a kind of "core pattern" with odds equal to 1/6 x (5/6)^(number of dice minus one), and then one instance for each permutation. This is really the core of the challenge, keeping permutations (order dependent) and combinations (non order dependent) parts of the process straight. Anyway 75/216 So 1 – 125/216 – 75/216 1 – 200/216 16/216 Less writing, more repeating. Four dice: Zero sixes : (5/6)^4 = 625/1296 One six permutations : 6XXX X6XX XX6X XXX6X Why not just go "times four"? Well that could work for this case only since we only want one six. But what if we wanted two sixes in four dice? Then the permutations are: 66XX 6X6X 6XX6 X66X X6X6 XX66 Six of them. There is a permutation formula for that, but for numbers under under ten or so, it is a good idea to write the stuff out a bit to make sure you understand what you are doing. One six combinatorial form: (5/6)^3 x 1/6 = 125/1296 Odds of one six = 4 x 125/1296 = 500/1296 Odds of two or more sixes on four dice = 1 – 625/1296 – 500/1296 1 – 1125/1296 171/1296 Now to Five: Zero sixes: (5/6)^5 = 3125/7776 One six permutations: 6XXXX X6XXX XX6XX XXX6X XXXX6 One six combinatorial form: (5/6)^4 x 1/6 = 625/7776 Odds of exactly one six on five dice = 3125/7776 Odds of two or more sixes on five dice: 1 – 3125/7776 – 3125/7776 1 – 6250/7776 1526/7776 Now that we have the odds for each set of attacks, we need to string them together. We're going to call the odds of killing the dragon for N dice PkN. So Pk5 for five dice, Pk4 for four, and so on. The odds of killing the dragon are: Pk5 + (1Pk5) x Pk4 + (1 – ((1Pk5) x Pk4)) x Pk3 + (1 – (1 – ((1Pk5) x Pk4)) x Pk3) x Pk2 There are ways to compress that down, too, but it is already too complicated to look at. So let's walk through it. There's only four steps. Probability of killing with five: 1526/7776, about 19.6% (Note, this may be the problem with the system right here … five dudes walk up to a dragon with a 1 in 5 shot of killing it outright on the first attack.) So the odds of no kill on the first shot are 1 – 1526/7776 or 6250/7776. The odds of killing by the second attack are the odds of killing on the first plus the odds of not kiliing on the first times the odds of killing on the second. 1526/7776 + 6250/7776 x 171/1296 Roughly 19.6% + 80.4% x 13.2% 19.6% + 10.6% 30.2% So the odds of no kill at this point are about 69.8% The next step is take our current odds of kill 30.2% and add the odd of no kill times the odds of kill with three: 30.2% + 69.8% x 16/216 30.2% + 69.8% x 7.4% 30.2% + 5.2% 35.4% and 64.6% odds of not killing it yet For the last step, the odds of killing it already plus the odds of not killing it already times the odds of kiling it this time. 35.4% + 64.6% x 1/36 35.4% + 64.6% x 2.8% 35.4% + 1.8% 37.2% So the total odds for the thing you propose is five regular dudes (a pick up basketball team at the rec center) have a little better than a one in three chance to kill a dragon by themselves. This, of course, doesn't take into account the part where the dragon could miss. That is a great point for doing a Markov map that splits for each side's attack. H hit> D hit> H attack H miss> D Attack H hit> D miss> H attack H miss>
and so on. As these probabilities diminish (the longer you go on, the less chance the combat wasn't already decided), eventually some of the branches that run "infinitely" really get so small that you don't bother with them. 
Parzival  22 Oct 2016 12:06 p.m. PST 
My brain hurts. To clarify the situation: Conquest of Nerath is a strategic conquest game, basically a fantasy version of Axis & Allies. So a single "Footsoldier" might be taken to represent a much larger force of armed infantry. Combat involves entering a territory controlled by an enemy force and attacking until that force is either eliminated, or the attacker selects to withdraw. Note that therefore it is entirely possible for "5 dudes" to keep whacking "1 Dragon" indefinitely, if none of them manage to roll a 6 or higher in any given battle round. Similarly, it's possible that even "one dude" could kill a dragon by rolling consecutive 6s in two battle rounds (or even two 6s over multiple rounds, if the dragon continues to miss during these rounds). The movement and combat capabilities of the various units are: Footsoldier: 1 move, 1d6, 1 hit point. Siege Engine: 1 move, 2d8 (attacking) 1d8 (defending), 1 hit point. (Note that doubled dice are not added; it just means two chances to roll 6 or better). Fighter: 2 move, 1d10, 1 hit. Can fight at sea. Wizard: 2 move, 1d10 before enemy response, 1 hit. Can fight at sea. Air Elemental: 3 move (flying), 1d8, 1 hit. Can attack sea units. Monster: 2 move, 1d12, can enter one additional unoccupied adjacent territory after winning a battle, 1 hit. Warship: 2 move (at sea), transport 2 land units, 1d8, 1hit. Castle: d20, defense only. "Spawn" point. 1 hit (but is restored after combat, though possession may change hands). Dragon: 3 move (flying), d20, 2 hits. Can attack sea units. Note that flying units get to "reposition" after combat, essentially moving twice. (All stats above subject to my memory, which may be flawed on certain details.) Any mix and number of forces may occupy a territory and join in combat, and as I stated, combat continues until total victory (by either side) or attacker withdrawal. The point of all this, of course, is to determine whether the game comparison of 5 Footsoldiers to 1 Dragon is a reasonable cost equivalency. I think it is, as I suspect the odds of victory favor the Footsoldiers in a combat with the Dragon. I also think it's significant that two hits on a band of 5 Footsoldiers would still leave 3 left to defend/attack, whereas two hits on a dragon ends its combat utility outright. Plus, no matter what, it will take at least 5 rounds for the Dragon to defeat the Footsoldier force, while they could slay the dragon outright on any of the first four rounds. Of course, flight and sea attack abilities certainly push the Dragon cost up; whether that should rise to more than the 5 points established in the game is a rather subjective question which I do not expect has any mathematically determinable answer. Fascinating discussion. Thanks for the answers, all! 
Parzival  24 Oct 2016 2:16 p.m. PST 
Though it's not in any way statistically significant, I tested this scenario with dice this weekend, 5d6 (Footsoldiers) vs. 1d20 (Dragon). In 10 separate battle actions, the Dragon won only once. Average number of rounds to a final victory (either 5 dead soldiers or 1 dead dragon): 2.8 Longest battle: 6 rounds, resulting in the Dragon victory (16 total d6 rolls). Shortest: 1 round, dead Dragon (soldiers rolled double 6s on first roll of 5 dice). Note that on average the Dragon killed 2 soldiers per battle, with 3 soldiers surviving. 
etotheipi  26 Oct 2016 6:18 a.m. PST 
From your 22 OCT post, that sounds a little different overall than I was gleaning. A Markov Map is definitely the way to go. The benefits of drawing one are (1) its very easy to do, (2) you get a good "feel" for the outcomes by doing it manually, so you may want to stop early. The drawbacks are it is labour intensive because you have to walk through all the paths – you need a big sheet of paper (or an automated tool) and will definitely hope to get the feel so you can end early. And in your case it does actually go on to infinity (it is possible, however unlikely that all forces will roll too low to hit forever), but those branches are easily terminated when they get too low to bother with. Also, if it isn't simultaneous combat and initiative can change, then you have a lot more branch density a lot faster. 
Parzival  26 Oct 2016 12:16 p.m. PST 
I suspected there was a misunderstanding. It's pretty much Axis & Allies in a fantasy setting, so the combat isn't tactical, it's just a quick succession of die rolls to see who manages to control a territory based on what forces are present. What makes it complex is the number of forces can vary, as can each unit's odds of securing a hit (based on type and thus die type rolled), and the unique abilities of some of the units (the wizard's ability to hit and eliminate an opponent before it can attack, or the siege engine's ability to roll two dice when attacking, or the dragon's ability to take two hits). I'd never want to even attempt to calculate the odds of a thoroughly mixed battle, as say, 2 wizards, 2 siege engines, 3 Footsoldiers and a monster vs. 2 elementals, 4 Footsoldiers, a fighter and a dragon. Yeepers. On that, I'd just make a gut nod to the wizardled side for number of dice and that first strike ability, but the dragon's d20 is gonna inflict some hurt as long as its player keeps it alive. But piece vs. piece cost value, I'm thinking the 5:1 ratio of Footsoldiers to Dragon is probably on target. What I hoped to glean were the odds of that combat situation, all other factors being equal, to back up my reasoning. 
etotheipi  26 Oct 2016 6:25 p.m. PST 
That's what a partial of your map looks like. The green arrows are dragon hits; the grey, troop hits. The misses aren't show, which is why the total of the paths shown is only 58.27% The misses don't matter to the win ratios. No matter what misses happen, the remaining proportion of wins will fall along the rest of the Markov chain. So you have roughly 1.8 to 1 odds in favor of the dragon. Three or four troop types wouldn't be too bad to trace. 
