The Forge Reference Project

 

Topic: What do you want to know about probability?
Started by: Wordman
Started on: 1/24/2009
Board: First Thoughts


On 1/24/2009 at 12:09am, Wordman wrote:
What do you want to know about probability?

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?

Message 27491#259658

Previous & subsequent topics...
...started by Wordman
...in which Wordman participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/24/2009




On 1/26/2009 at 11:07pm, JoyWriter wrote:
Re: What do you want to know about probability?

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.

Message 27491#259760

Previous & subsequent topics...
...started by JoyWriter
...in which JoyWriter participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/26/2009




On 1/27/2009 at 12:34am, Castlin wrote:
RE: Re: What do you want to know about probability?

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

Message 27491#259761

Previous & subsequent topics...
...started by Castlin
...in which Castlin participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/27/2009




On 1/27/2009 at 2:41pm, Tsanuri wrote:
RE: Re: What do you want to know about probability?

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.

Message 27491#259784

Previous & subsequent topics...
...started by Tsanuri
...in which Tsanuri participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/27/2009




On 1/27/2009 at 5:52pm, Adam Dray wrote:
RE: Re: What do you want to know about probability?

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.

Message 27491#259792

Previous & subsequent topics...
...started by Adam Dray
...in which Adam Dray participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/27/2009




On 1/27/2009 at 8:40pm, Wordman wrote:
RE: Re: What do you want to know about probability?

Tsanuri wrote:
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?

Message 27491#259799

Previous & subsequent topics...
...started by Wordman
...in which Wordman participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/27/2009




On 1/27/2009 at 8:50pm, Wordman wrote:
RE: Re: What do you want to know about probability?

Adam wrote: 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}.


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.

Message 27491#259800

Previous & subsequent topics...
...started by Wordman
...in which Wordman participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/27/2009




On 1/27/2009 at 9:40pm, Adam Dray wrote:
RE: Re: What do you want to know about probability?

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?

Message 27491#259805

Previous & subsequent topics...
...started by Adam Dray
...in which Adam Dray participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/27/2009




On 1/28/2009 at 12:06am, JB wrote:
RE: Re: What do you want to know about probability?

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

Message 27491#259822

Previous & subsequent topics...
...started by JB
...in which JB participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/28/2009




On 1/28/2009 at 7:57am, Wordman wrote:
RE: Re: What do you want to know about probability?

Adam wrote: How 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 5[sup]u[/sup] 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 5[sup]u[/sup] 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.

Message 27491#259831

Previous & subsequent topics...
...started by Wordman
...in which Wordman participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/28/2009




On 1/29/2009 at 12:42am, Finarvyn wrote:
RE: Re: What do you want to know about probability?

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!

Message 27491#259854

Previous & subsequent topics...
...started by Finarvyn
...in which Finarvyn participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/29/2009




On 1/29/2009 at 4:29am, Wordman wrote:
RE: Re: What do you want to know about probability?

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.

Message 27491#259864

Previous & subsequent topics...
...started by Wordman
...in which Wordman participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/29/2009




On 1/29/2009 at 7:04am, pynk wrote:
RE: Re: What do you want to know about probability?

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.

Message 27491#259868

Previous & subsequent topics...
...started by pynk
...in which pynk participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/29/2009




On 1/29/2009 at 3:02pm, Adam Dray wrote:
RE: Re: What do you want to know about probability?

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%.

Message 27491#259879

Previous & subsequent topics...
...started by Adam Dray
...in which Adam Dray participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 1/29/2009




On 2/2/2009 at 10:11am, Gurnard wrote:
RE: Re: What do you want to know about probability?

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

Forge Reference Links:
Topic 27533

Message 27491#259995

Previous & subsequent topics...
...started by Gurnard
...in which Gurnard participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 2/2/2009




On 2/13/2009 at 10:34pm, dindenver wrote:
RE: Re: What do you want to know about probability?

OK,
  So, I am looking at otherkind and it is a mechanic were no matter what you do, you keep 4 dice. You can roll up to about 8 dice in a highly charged situation. Normally, I am pretty good about calculating averages. But I am not sure if that is the correct approach here. So, if I roll 5 dice and keep the highest 4, how does that change the probabilities of any of them being over 5? How do I calculate this (preferable in Excel)? And how do I check roll 6 and keep 4, etc.?

Message 27491#260418

Previous & subsequent topics...
...started by dindenver
...in which dindenver participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 2/13/2009




On 2/13/2009 at 11:41pm, punkbohemian wrote:
RE: Re: What do you want to know about probability?

First, there's a book I recommend call "Statistics for the Terrified", which I believe is by John Kranzler. Most (if not all) of it is not very helpful for stats in RPG games. Nevertheless, I recommend it because I think it's one of the best stats books in terms of the writing and it's ability to educate someone about stats who is not comfortable with the subject.

I think a book like what you suggest would be interesting. I think it would be beneficial if you focused not specifically/entirely on the p-distributions of dice, but on the equations which generate these distributions. A lot of simple mechanics are pretty obvious, but there are plenty of systems out there that use exploding dice, various types of dice pools, etc. that could do with some jargon-free explanation. Whenever I tinker with a really complicated mechanic, I usually just take the lazy way out and write a little program in Python to figure things out for me, but it would be interesting to see how such things could be figured out arithmetically.

Message 27491#260419

Previous & subsequent topics...
...started by punkbohemian
...in which punkbohemian participated
...in First Thoughts
...including keyword:

 (leave blank for none)
...from around 2/13/2009