Wednesday, November 30, 2011

Rules Interpretations

Last night I got to thinking about how for analytical purposes, I've had to become quite rigid in my interpretation of the rules.  I worry I may be sufficiently rigid here, that it doesn't necessarily accurately reflect how people actually play the game, including myself.  That being said, I'm not necessarily sure what else to do because mathematical analysis lends itself to clearly defined algorithms, and playing it "fast and loose" just messes up the calculations.  That being said, I think that in most cases, while such a rigid interpretation may not reflect the actual probabilities of success, they do reflect the trend correctly.

If anyone who watches this blog (and the statistics reveal more than a few) notices that changing interpretations of the rules changes the statistics, feel free to comment on it.  The results might be interesting.

Friday, November 25, 2011

Searching for Secret Doors

In my D&D group, I'm often disappointed by the lack of team work in searching.  Since the search roll is executed in secret, the fact that you did not find a secret door does not imply that there is none there.  When someone chooses to search I always roll a die in secret, even if I know there's no door.  That creates uncertainty. 

So.. when a single character searches a 10'x10' area of a dungeon he has only a 1/6 probability (excluding the possibility of demi-humans and thieves, which change the numbers, but not the essential idea) of finding a door that may or may not be there.  Given that, it seems insane how easily some players give up.  Even if there is a secret door, you're unlikely to find it given a single turn of searching by one character. 

There's two possible solutions.  Searching for multiple turns, and having multiple characters search the same area simultaneously.  The pay off is fairly quick.  Consider the case of multiple simultaneous searchers with no special abilities.

Figure 1:  Multiple simultaneous searchers with no special ability rapidly increase the likelihood of finding a secret door.
 Given the presense of a secret door, you're much more likely to find it now if everyone in a mid-sized party of 5 or 6 PCs searches the same area.  If a larger party of 9 or 10 people searches, you're really in business, finding more than 80% of any doors that exist in the room.  Elves, dwarves, thieves, magic and what not just make the picture even rosier.

The interesting question now, is how confident are you that there exists no secret door given that you haven't found a secret door.  That requires appealing to Bayes Theorem.  It also depends on the number of secret doors in the dungeon and the size of the dungeon.  I figured the Caves of Chaos was a fairly good dungeon to sample, so I just counted the number of squares in the goblin lair and found that only 2 out of 119 10'x10' squares had a secret door in them, so that means the probability of there being no secret door is >0.98.  Assuming that's an adequate "average" dungeon the following chart holds.

Figure 2:  With 3 or 4 characters you can be very sure that there's no secret door if you didn't find one.

The first interesting observation is that even with the dismal search performance of a single character, not finding a secret door still means it's overwhelmingly likely that there is in fact no secret door.  Ruling out doors isn't really a problem.  That's a function of the fact that most walls in a dungeon don't have secret doors.  The problem is that if there is one, you're not likely to find it either. That being said with 4 or 5 characters searching simultaneously in the same area you can almost certain there's no door while having better than 50/50 odds of finding those doors which are there.

A similar result can be achieved by spending time searching.  A single character searching 5 turns will have the same effect as 5 characters searching simultaneously.  The down side of this is that a dungeon master will most likely be rolling for wandering monsters during this time.  If this is the case, the other characters should stand guard.

I also wonder if this is a case where it's wise to designate a "caller" even though in most parties there isn't usually one regardless of the recommendation of the rule book.  Leadership and decision making pay off big time in the game.  Individualism tends to lead to lackluster performance.

Saturday, November 19, 2011

Explaining Probability Distributions

I keep thinking it's important that I write up a post explaining the multinomial distribution and how it's related to rolling dice since I've relied on it for several results now and rolling dice is the fundamental random process of D&D.  I've sat down and tried to write it up three times now, and every time I do it, it ends up becomming a fairly involved project and I'm not sure I ended up clarifying anything.  The first time I started, I ended up finding that I'd really just described the binomial distribution and hadn't illuminated the multinomial distribution at all.  The second time I started to show how the multinomial distribution was a generalization of the binomial distribution and decided I wasn't clear enough.  The third time I tried some combination of both approaches and just ended up being more long winded.  The whole exercise has done nothing but reveal to me why there's so many lousy statistics books out there.  It's actually pretty difficult to be clear.  I also think the case of rolling dice is particularly difficult compared to say, coin flips.

None the less, I feel I have to tackle the problem if I'm going to keep explaining my thinking about tactics and decisions in D&D.

Friday, November 11, 2011

The Psychology of Probabilities

In a conversation regarding saving throws I had, someone argued that magic users had better saving throws versus spells than the other character classes, hence it wasn't worth attempting to cast a Light spell on their eyes.  When you work out the numbers, though, a level 1-5 magic user has only a 35% chance of saving and a 6-10 level magic user still has less than 50-50 odds.  When you throw initiative into the mix, the chance of coming out on top is better, but it's by no means decisive.  Since we're gambling, D&D is, after all, governed by chance, I'd say cast the spell on a spell caster.  They may do better than average at saving but it's still not great.

That left me wondering about the psychology of probability.  It seemed like the fact that a character had better than average odds of success was taken to mean that they had good odds of success, which isn't the same thing.  I guess it revolves around what you mean by "good."  "Good" in this case is a relative term.  One must always ask "good compared to what?"  If they mean other characters, then yes, magic users have good saving throws versus spells.  The thing is, what really matters is not the other characters.  A probability is a number between 0 and 1.  With 0 meaning I'd bet I'll never happen, and 1 meaning I'd bet it'll always happen.  Ideally, when one makes decisions, it'd be with only the 0-1 scale in mind for assessing their risk of failure.  In practice, though, this person seemed to reveal that what really matter is other people's risk of failure. 

It seems like a statistical version of keeping up with the Jones'.  As as if people aren't going to do something because objectively they'll do well.  They're going to do something because they're more likely to better than they other guy.

Tuesday, November 8, 2011

2d6 Versus 1d12 and Clerics Turning Undead

A discussion of clerics turning undead got me thinking about how likely they would be successful given multiple attempts.  To turn undead, you roll 2d6 and compare the result to the target.  I wanted to see how likely one was to succeed against varying hit-dice of baddies, and what the cumulative probability would be if there was no limit on the number of attempts. That in turn got me thinking about why we use 2d6 instead of 1d12 and what the impact would be. 

The d12 is probably the least loved die.  People tend to use 2d6 instead.  But should they? 

The answer is, of course, it depends on what you want to do.  The reason is that the results are distributed differently. 

Figure 1:  1d12 results are uniformly distributed while 2d6 follow a peaked distribution favoring moderate outcomes.

Using 2d6 tends to force more moderate outcomes at the expense of more extreme outcomes.  Using 1d12, since the results are uniformly distributed if the die is fair, will result in more extremes.

Figure 2:  2d6 makes exceeding higher targets less likely while lower targets are easier.
Using 2d6 makes clerics more powerful against lesser undead with lower target numbers to turn, but less powerful against more powerful undead with higher targets.  Using 1d12 makes them more powerful against powerful undead and less powerful against easier undead.  It's an interesting result, I think.

Saturday, November 5, 2011


In the course of a discussion of D&D tactics, it was brought up how in old school D&D the closest equivalent they have to "flanking" like in 3.5e is a thieve's backstabbing.  While I'm not sure the analogy is necessarily the best, it got me thinking about what the most effective use of backstabbing is.  For a thief to backstab, they have to use both their "Move Silently" and "Hide in Shadows" ability to move behind their target.  Because the probabilities multiply, a quick calculation reveals that this is a high-risk endeavor for any thief. Following the Labyrinth Lord rules, a first level thief has a less than 3% probability of successfully backstabbing, and no thief stands greater than 50-50 odds until he is 10th level.  Given that, my intuition is that the payoff for backstabbing is on average fairly low.  I'd only recommend thieves choose to backstab in the face of a real risk of total party kill (TPK).  To say more would require more modeling, though.  Since I'm already behind on my Markov model for my elf versus an orc, it's probably best that I hold off on going much further on this one.