News:

Forum changes: Editing of posts has been turned off until further notice.

Main Menu

What do you want to know about probability?

Started by Wordman, January 23, 2009, 07:09:37 PM

Previous topic - Next topic

Wordman

Recently, it seems like I've been spending an inordinate amount of time publishing ad hoc web articles about probability in RPGs, from some basic stuff to some not-so-basic stuff. Partially based on the reaction I've got from these, I am contemplating writing a "probability for roleplayers" type book (probably a free PDF).

I'm thinking it will be about half theory/general principles, half specific examples from particular (openly licensed) games, with the examples getting progressively more complicated. I have a pretty decent list of the topics I would want to see in such a book. I also have a pretty clear idea of how I want it to look.

I'm curious about some things though, which hopefully this community can answer:


  • Would you even read such a book?
  • What about probability do you wish you knew more about?
  • Are there particular examples of situations or mechanics in specific games that you've wondered how the probability a) works and b) can be figured out? If so, what are they?
What I think about. What I make.

JoyWriter

I'd like to know how to derive from first principles the distribution of "roll 4 drop lowest" and similar distributions with comparisons built in. That would cover re-rolls as well as some parry mechanics. Congrats on the reign probs, I kept turning them into nonsense, so it's great to finally have a chance to dig out my old calcs and see where I went wrong. Every other answer I have seen was brute force.

Castlin

I would certainly read such a book, yes. If it covered how to decide between aggregate and discrete events, all the better.

Tsanuri

Slight aside, but I always liked the basic 'pyramid' chart to illustrate probalility in the Settlers of Catan rulebook. Stuff like that for different distributions would be useful and visually appealing.

Adam Dray

I'm comfortable with basic probability. A lot of my designs use funky dice systems that are far less easily modeled.

For example, in Verge, you roll a variable pool of d6es and look for the largest grouping of like numbers. The count of that grouping is what determines your score. So if you roll 7d6 and get 1112556, then your result is 3 (three 1's). THEN, you can reroll the dice you don't keep, Yahtzee style. So you keep 111 and reroll 2556 and maybe get 1456. You move the matching 1 over so you have a result (signal) of 4 (1111) and garbage (noise) of 456.

So the variables are: number of dice rolled, number of noise rerolls. Constants are die size (d6).

Is there a formula f(dice, rerolls, result) that tells me the chance of that result occurring? For example, f(1,0,n) = 1/6, for n = {1..6}.

I use Professor Torben Mogensen's "Troll" probability modeling tool to figure this stuff out computationally. Programming Verge dice isn't trivial, but it's possible. You might consider discussing this tool in your book.
Adam Dray / adam@legendary.org
Verge -- cyberpunk role-playing on the brink
FoundryMUSH - indie chat and play at foundry.legendary.org 7777

Wordman

Quote from: Tsanuri on January 27, 2009, 09:41:14 AM
Slight aside, but I always liked the basic 'pyramid' chart to illustrate probability in the Settlers of Catan rulebook. Stuff like that for different distributions would be useful and visually appealing.

Not familiar with it. Is this just Pascal's Triangle, or something else?
What I think about. What I make.

Wordman

Quote from: Adam Dray on January 27, 2009, 12:52:30 PMIs there a formula f(dice, rerolls, result) that tells me the chance of that result occurring? For example, f(1,0,n) = 1/6, for n = {1..6}.

The flippant answer here is yes: 1 - the chance of that result not occurring.

More seriously, this is more of an illustration of a general technique. It is often easier to compute the odds of something not happening. I'd have to dive deeper into your example to see if that is true in your case, but it smells like it probably is.

As an example of "1 - not x", consider an "exploding" d6 (where if you roll a 6, you roll again and add the result, ad nauseum). To directly calculate the chance of rolling, say, 18 or more is daunting, because there are (literally) infinite ways that can happen. Since the dice explodes, theoretically, you could roll 2,235,743,743,243,574 or any other number as large as you like. Rather than add up infinite series and so on, instead, its much more direct to think about "what is the chance of rolling under 18". There are finite number of ways to get such a result, so doing this is a lot easier.

Thanks for the pointer to Troll; I'd never heard of it before.
What I think about. What I make.

Adam Dray

Yeah, I've taken college classes in combinatorics, but it's been a while.  P = 1 - !P is pretty rudimentary. ;)

I understand the probabilities of exploding dice. The bit of your post that is helpful (and really, the crux of my problem) is the pointer towards an approach that doesn't involve infinite regression. More of that, please.

The catch with Verge dice is that the exploding part is rerolling the useless dice, not rerolling a useful die. The "signal" grows as you reroll and match more dice to it from the "noise" (which diminishes in dice). So if you roll 2d6, there's a 1/6 (6/36) chance of getting a match, and a 5/6 (30/36) chance of not getting a match. In the case that you do not get a match, there's a 1/6 chance of matching on a reroll and a 5/6 chance of not matching.

So you'll NOT get 2 matching dice 5/6 + (1/6*5/6) of the time. You'll always get at least 1 matching die, by default.

So for 2d6 with 1 reroll max, you have a 30/36 + 5/36 = 35/36 chance of not getting 2 matching dice, or rather a 1/36 chance of matching 2 dice.

This gets harder with two dice. How do you approach generating tables of such things? How do you go about generalizing the formula from the case-by-case walkthrough like I did above?
Adam Dray / adam@legendary.org
Verge -- cyberpunk role-playing on the brink
FoundryMUSH - indie chat and play at foundry.legendary.org 7777

JB

Wordman,
Just to respond to your initial post, I would definitely be interested in reading such a book as described, particularly if it were a free PDF.  I've actually been looking for something along the lines of "Probability and Game Design" for a while now, though I haven't found it yet. Short on time now, but I'll try to come back later and contribute further, particularly some 'prob probs' I've been curious about.

Cheers,

J

Wordman

Quote from: Adam Dray on January 27, 2009, 04:40:10 PMHow do you go about generalizing the formula from the case-by-case walkthrough like I did above?

I'm not sure you can can really get a generalized formula.

I have some quick thoughts on Verge (these are wrong, but towards the correct direction, I think). Parameters are:

d = number of dice (always d6's in this case)
r = number of rerolls allowed
w = the "width" of the match

Looking for P = f(d,r,w) = chance of d dice generating exactly width w, allowing r rerolls of "waste" dice.

Thinking more about it, I'm not sure 1 - !P is really the way to go. Instead, you might try "constructing" results, much like you would with poker hands, figuring out how many combinations generate the result you are looking for, and taking that number over the total possible combinations to get the probability. (I did an example of this type of thing for a five suited card game a while back.)

Start by considering the r = 0 case, as it is way easier.

You want to "build" a result that gives exactly w. To do so:

1) Choose the value the match will have. Since these are d6's, you can do this six ways.
2) Choose the w dice you want to match. You can do this C(d,w) ways.
3) This means that there are 6 * C(d,w) possibilities for the "matching" dice to be generated.
4) There are u "unmatched dice", where u = d - w, remaining that cannot match the matching set. And here is the real problem. If it were the case that these dice not only couldn't match the "matching" set, but also couldn't match each other, then the first unmatched die could come up 5 ways, the second 4 ways, the third 3 ways and so on. That isn't the case, though. If it were the case any of the unmatched dice could have any value other than the value of the matched set, each could come up 5 ways, so there would be 5u possibilities. The problem is that neither of these is the case. The unmatched dice can match each other, but only if the sets they make are smaller than w. (If they were larger, then they would take over the result.) I'm not sure how to do that, but it is probably some variation of "take the 5u possible combinations and subtract the number of those combinations that build one or more sets of width w or greater".

So, even that part makes my head explode. (Although, I might just be misunderstanding Verge. In the example you gave previously, what happens if the reroll gives 2222? I'm assuming this replaces the initial 111 set for a result of 4, yes?)

The reroll bit makes it even more hellish. I think you might be able to get some mileage out of considering the result only at the end, then figuring out how likely each die was to get that way. That is, when constructing your set:

1) Choose the value the match will have. Since these are d6's, you can do this six ways.
2) Choose the w dice you want to match. You can do this C(d,w) ways.
3) Each of these w dice had r chances to match the whatever value was picked in step 1.
4) However the "unmatched dice" work, each one had r chances to not match the value picked in step 1.

Anyway, not very helpful. If the muse hits me, I'll post a better solution. I don't think you'll find a very clean formula, though. The one silver lining is that for reasonable values of d, the number of possible combinations should not take that long to just exhaustively search with software. You'd pretty much need to do that anyway, just to verify that a "formula" solution is correct.
What I think about. What I make.

Finarvyn

I have a decent understanding of probability and I would enjoy reading a book that was specifically RPG related. I had thought about writing something similar but my probability tends to be more "brute force" (lots of tables) rather than formula-based and I'd love to expand my horizons.

It's amazing to me how few game designers seem to grasp the notion of how probablities work -- I spent an hour once trying to explain how rolling 1d20 was so very different than 2d10. He just never seemed to get it, yet he wanted to design a RPG with all sorts of random tables in his rules.

Yeah, I'd read it!
Marv (Finarvyn)
Sorcerer * DFRPG * ADRP
I'm mosty responsible for S&W WhiteBox
OD&D Player since 1975

Wordman

I've had similar discussions, trying fruitlessly to convince someone that adding +1 to a d20 was the same thing as adding +5% to a d100.

Consequently, this book may be a bit more rudimentary than some of the responders here might be after. Just a fair warning.
What I think about. What I make.

pynk

I don't know how feasible this is, but it would be really nice as a GM to be able to compute the percentage chance that any one PC succeeds at something assuming every PC tries it once.  This comes up a lot, especially with perception rolls in many games -- if I'm rolling one for the party, I really want a single percentage that anyone notices, not one roll for each PC.  (Some games probably give you a way to fudge this, but I know many don't.)  You can start by assuming a list of success% for the PCs and just show how to compute a single success% for the party.  But of course then the question is how to recompute it for various difficulty levels, which gets very RPG system specific.  Maybe in all practicality people would need a computer program for this.  I don't know.

Adam Dray

You could probably make the five or six rolls faster than you could do the multiplication of probabilities.

To see if anyone succeeds, you really need to determine if everyone fails. The chance of everyone failing is the product of the chances of each of them failing.

So if you have five players, each with failure probability F1, F2, F3, F4, and F5, the chance of everyone failing is FE=F1*F2*F3*F4*F5. The chance of anyone succeeding is 1-FE.

A simple example with three players, each with an 40% chance of succeeding (60% chance of failing). The chance of all of them failing is 0.60*0.60*0.60 = 0.216%. The chance of any one of them succeeding is 1 - 0.216 = 0.784, or 78%.
Adam Dray / adam@legendary.org
Verge -- cyberpunk role-playing on the brink
FoundryMUSH - indie chat and play at foundry.legendary.org 7777

Gurnard

I do need some help on probabilities (more working out the formulas for spread and standard deviation) for some dice rolls. I've posted the idea in a separate topic so as not to hijack this one because the explanation is a little lengthy, http://www.indie-rpgs.com/forum/index.php?topic=27533.0