Less Wrong is a community blog devoted to refining the art of human rationality. Please visit our About page for more information.

Bayesian RPG system?

12 Post author: DataPacRat 08 February 2012 11:53AM

This is one of those sleep-deprived middle-of-the-night ideas which I'm reasonably likely to regret posting in the morning once I really wake up - but which, at least at the moment, thinking on my more-corrupted-than-standard hardware, seems like a cool idea.

Most role-playing games have a system for determining whether or not certain actions are successful or not. Most of the time, these can be described as setting a target number, and rolling one or more dice, with various modifiers - eg, you might have to roll a 13 or higher on a twenty-sided dice to correctly answer the sphinx's riddle, and having your handy Book of Ancient Puzzles to refer to may give you a +3 bonus to your die-roll.

How insane and awful an idea would it be to have an RPG system whose core mechanic wasn't based on linear probabilities like that... but, instead, on decibels of Bayesian probability? For example, instead of a bonus adding a straight +3 to a d20, or increasing your odds by 15% no matter how easy the task or how skilled you are, the bonus adds +3 decibels: changing your odds from 50% to 66% if you started out with a middling chance, but only increasing it from 90% to 95% if you're already very skilled.

 

(And now, back to sleep, and to see how much karma I've lost come the morning...)

Comments (23)

Comment author: Risto_Saarelma 08 February 2012 01:28:50PM 22 points [-]

There are already RPG systems with non-linear probability distributions. GURPS has you throw 3d6, which is a rough approximation of a normal distribution. A +1 in 3d6 gets you to 63 % from 50 % and to 95 % from 91 %. The Fudge RPG system uses nonstandard dice which also have a distribution like this. It's not the decibel system, but it has the behavior you described and is usable without numeric tables or calculators.

Explicitly using probability decibels in game rules might be an interesting way to teach people to work with them though.

Comment author: orthonormal 09 February 2012 12:00:28AM 11 points [-]

This is one of those sleep-deprived middle-of-the-night ideas which I'm reasonably likely to regret posting in the morning once I really wake up - but which, at least at the moment, thinking on my more-corrupted-than-standard hardware, seems like a cool idea.

Ah, self-handicapping in action...

Comment author: shokwave 09 February 2012 05:23:55AM 6 points [-]

The simplest way to use this as an RPG system seems to me to be coding it - this idea may be more available to me because I've recently been learning coffeescript by writing a DnD Pathfinder... engine, I suppose you'd call it. Do you mind if I learn myself a Bayesian implementation by trying out an implementation of your idea? Promise to share if I do.

(I have visions of a web client that handles character creation, feat interaction, spellbooks, permanency of statistics, and combat interaction, with a v2 of persistent campaign environments allowing players to perform limited actions like crafting without DM presence required and allowing people to pursue personal goals outside of session, all with the goal of inverting the standard D&D quote, "Dungeons and Dragons is 20 minutes of fun packed into 4 hours". This Bayesian RPG idea looks like it could work much the same way, or become the new project if this project becomes uninteresting to me.)

Comment author: Risto_Saarelma 09 February 2012 06:26:36AM 3 points [-]

Incidentally, I compiled a list of design and development books for the roguelike game development wiki a few weeks ago, and wanted to find something about designing the stat and resolution rule systems in tabletop RPGs from a game design standpoint. Found nothing at all in books, and no online resource that seemed to go much beyond "these are the house rules I like based on this established system I like", as opposed to actually getting into the theory of why have stat systems to begin with, how the math works for the different variants and what the world simulation, human usability and game design implications of different choices of system are.

Comment author: Kaj_Sotala 09 February 2012 08:01:31AM *  2 points [-]

At one point, I started to project to do something like that, listing and describing the rationales for various rules. I never got much farther than just listing the rules and writing some brief descriptions for some of them, though. See here for the bare list of mechanics and here for the version with (some) descriptions.

ETA: And man, that long version has lots of typos and bad grammar. I should fix that.

ETA2: Okay, it should be considerably better now.

Comment author: Risto_Saarelma 09 February 2012 08:33:46AM 2 points [-]

Interesting, thanks. Listing and categorizing the various existing mechanics for various resolution categories does look like a nice starting point for a more thorough review.

Comment author: Mass_Driver 09 February 2012 05:46:36AM 3 points [-]

Now that you've woken up, why not try showing the math? E.g., why is a change from 50% to 66% "3 decibels" ? What would happen if you added 3 decibels to a previously "impossible" task (5%? 1%? 0.1%?)

Would this offer any benefit in terms of either fun or realism beyond the fudge dice, 3d6, etc. from other people's comments? What benefit? If the benefit is educational, what exactly would people learn?

Comment author: dbaupp 09 February 2012 08:22:23AM 6 points [-]

One measure of probability is log-odds (or logit), which is the logarithm of the odds-ratio (the base of the logarithm doesn't matter at the moment). That is, for an event with probability p, the log-odds is

And to convert back, for an event with log-odds (base b) of q the probability is

Log-odds are a measure of the amount of information or evidence in support of that event. With a probability of 0.5, the log-odds is 0 (i.e. no net evidence either way), with a probability less than 0.5, log-odds is less than 0 (net evidence against the event), and with p > 0.5, the log-odds is greater than 0 (net evidence for the event).

In the odds world, a bel of evidence means multiplying the odds ratio by 10, so after observing a bel of evidence for it, an event goes from 1:1 to 10:1, or 1:30 to 1:3. In the base-10 log-odds world, this is equivalent to adding 1 to the log-odds, so, those examples become 0 -> 1, and -1.48 -> -0.48. A decibel is adding 0.1 to the log-odds (i.e. a tenth of a bel).

For the example given, 3 decibels turns 0 (log-odds for 50%) into 0.3, and the conversion back gives p = 66%. For 5% the log-odds are -1.279, so 3 decibels turns that into -0.979, which corresponds to p = 9.5%. Similarly, 1% becomes 1.9%, and 0.1% becomes 0.2%.

Comment author: Mass_Driver 10 February 2012 02:37:57AM 0 points [-]

Thanks!

Comment author: Anubhav 09 February 2012 04:03:48PM 3 points [-]

why is a change from 50% to 66% "3 decibels" ?

Here you go.

Comment author: Anubhav 08 February 2012 01:25:53PM 8 points [-]

Awesome idea, yes, but.... This doesn't have anything to do with Bayes.

Comment author: Xachariah 09 February 2012 01:29:33AM *  10 points [-]

I dunno... I think the rulebook would look pretty great next to my rationalist shoes.

Comment author: James_Evans 13 February 2012 12:20:45AM 2 points [-]

I view more math games as definitely a good thing. I would think such a game would have to display its mechanics in such a way that the player can make judgments based on them, which would be so nice to have more of (being able to reason about what a game is doing without dropping to a debugger or something).

The more MoR-types of things that get out there makes it much easier for an average person to help raise the sanity waterline. People talking as much about the mechanics of various games versus talking about LW topics seems neat.

Comment author: Emile 08 February 2012 01:31:34PM 2 points [-]

One simple way of keeping that playable:

Each skill is an integer that is at zero by default, and can go up or down depending of circumstances (items, skills, roleplay ..)

  • For a modified skill of zero, roll a (six-sided) die, succeed on a 4+

  • For a positive modified skill of N, roll N extra die (N + 1 total), succeed if one of them is 4+

  • For a negative modified skill of -N, roll N extra die (N + 1 total), succeed if all of them are 4+

Comment author: Cthulhoo 08 February 2012 02:52:51PM 4 points [-]

The World of Darkness game system has a similar spirit. Basically your abilities determine your dice pool, e.g. Intelligence = 3 + Academics = 2 gives 5 dice to try to understand a technical book. You then have to roll the dice and obtain at least one 8+ on 5 d10. Bonus/malus apply on the dice pool, e.g a noisy room is -1 die and access to google is +1 die. Of course incremental bonuses are less relevant the bigger the dice pool is.

Comment author: RichardKennaway 08 February 2012 12:54:26PM 2 points [-]

I think this is an excellent idea. I guess the simplest way to implement it would be to measure everything -- skills, character attributes, bonuses, task difficulties, etc. -- in decibels (or bits), and have a lookup table to convert the final log-odds value to die rolls.

Comment author: Multipartite 08 February 2012 06:06:04PM *  1 point [-]

For what it's worth, I'm reminded of systems which handle modifiers (multiplicatively) according to the chance of failure:

<Google search>

[quote]


For example, the first 20 INT increases magic accuracy from 80% to

(80% + (100% - 80%) * .01) = 80.2%

not to 81%. Each 20 INT (and 10 WIS) adds 1% of the remaining distance between your current magic accuracy and 100%. It becomes increasingly harder (technically impossible) to reach 100% in any of these derived stats through primary attributes alone, but it can be done with the use of certain items.


[/quote]

A clearer example might be that of a bonus which halves your chance of failure changing 80% success likelihood to 90% success (20% failure to 10% failure), but another bonus of the same type changing that 90% success to 95% success (10% failure to 5% failure). Notable that one could combine the bonus first in calculation to get a quarter of 20% as 5% with no end change.

Comment author: DanielLC 08 February 2012 06:33:53PM 2 points [-]

A clearer example might be that of a bonus which halves your chance of failure changing 80% success likelihood to 90% success (20% failure to 10% failure)

The problem with this is it only makes sense when you have a high chance of success.

Suppose I attempted to blow up the Earth. Normally, I'd have an approximately 0% chance of success. Would that bonus increase it to 50%?

Comment author: gwern 08 February 2012 08:49:16PM -1 points [-]

I think it'd increase it to ~49% (if you have a 0.0001 chance of success, you have a 0.9999 chance of failure, and 0.9999 / 2 = 0.49995).

Comment author: DanielLC 09 February 2012 12:48:35AM 3 points [-]

That's a 49.995% chance of failure, and a 50.005% chance of success. Also 0.49995 is much closer to 50% than to 49%.

In any case, it should be nowhere near 50%. Increasing the log probability by log(2) would approximately halve the probability of failure if you're very likely to succeed, but it would double the chance of success if you're very likely to fail.

Comment author: Multipartite 10 February 2012 04:10:27PM *  0 points [-]

To answer the earlier question, an alteration which halved the probability of failure would indeed change an exactly-0% probability of success into a 50% probability of success.

If one is choosing between lower increases for higher values, unchanged increases for higher values, and greater increases for higher values, then the first has the advantage of not quickly giving numbers over 100%. I note though that the opposite effect (such as hexing a foe?) would require halving the probability of success instead of doubling the probability of failure.

The effect you describe, whereby a single calculation can give large changes for medium values and small values for extreme values, is of interest to me: starting with (for instance) 5%, 50% and 95%, what exact procedure is taken to increase the log probability by log(2) and return modified percentages?
<unfamiliar with log probabilities, and curious to decrease this unfamiliarity>


Edit: (A minor note that, from a gameplay standpoint, for things intended to have small probabilities one could just have very large failure-chance multipliers and so still have decreasing returns. Things decreed as effectively impossible would not be subject to dice rolling or similar in any case, and so need not be considered at length. In-game explanation for the function observed could be important; if it is desirable that progress begin slow, then speed up, then slow down again, rather than start fast and get progressively slower, then that is also reasonable.)

Comment author: DanielLC 10 February 2012 05:35:45PM 2 points [-]

what exact procedure is taken to increase the log probability by log(2) and return modified percentages?

The simplest way is to use odds ratios instead of log probability. 5% is 1:19. Multiply that by 2:1 and you get 2:19 which corresponds to 9.52%. If it's close to 100%, you get close to half the probability of failure. If it's close to 0%, you get close to double the probability of success.

This can be done with dice by using a virtual d21. You can do that by rolling a higher-numbered die and re-rolling if you pass 21. Since the next die up is d100, you can combine two dice to get d24 or d30 the same way you combine two d10s to get a d100. Alternately, use a computer or a graphing calculator instead of a die, and you can have it give whatever probabilities you want.

Comment author: Multipartite 11 February 2012 09:36:24PM 0 points [-]

Thank you!