Can we talk about mathematical analysis of rules?

General questions, debates, and rants about RPGs

Moderator: Moderators

Username17
Serious Badass
Posts: 29894
Joined: Fri Mar 07, 2008 7:54 pm

Post by Username17 »

Schwarzkopf wrote:That's interesting, but (to me) the difference between 16.67% and 18.75% is almost negligible. I mean, that's a really, really small difference.
That depends. If you're doing repeated attempts, compared to an opponent repeating the same (like combat is in many games), you're talking about a 12% relative discrepancy that is going to get compounded into an insurmountable advantage. If you roll until you succeed five times, for example, the 18.75% is going to do it a lot quicker. An average of 27 rolls instead of an average of 30 rolls. That's like an entire turn of player actions.

-Username17
User avatar
Chamomile
Prince
Posts: 4632
Joined: Tue May 03, 2011 10:45 am

Post by Chamomile »

How do you calculate odds of victory for opposed rolls? To hash out a really simple combat system as an example, let's say both combatants roll 2d6 and one side has a +1 modifier, highest roll wins the round and deals one damage to the enemy. The guy with the +1 modifier has two health, the other guy has three. Who's more likely to win, and by how much?
User avatar
wotmaniac
Knight-Baron
Posts: 888
Joined: Sun Mar 13, 2011 11:40 am
Location: my house

Post by wotmaniac »

Schwarzkopf wrote:That's interesting, but (to me) the difference between 16.67% and 18.75% is almost negligible. I mean, that's a really, really small difference.
the fact that your chance of success reduces at all is the problem.
if you increase your skill at something, then that increase in skill should never result in a reduced chance of success.
Doom
Duke
Posts: 1470
Joined: Mon Nov 10, 2008 7:52 pm
Location: Baton Rouge

Post by Doom »

You pretty much need to do that on a case-by-case basis.

First, you'd work out the probability that the guy with the +1 rolls higher than the guy with no bonus. I'm going to call the guy with the bonus the better fighter.

To do that you set up the distribution for rolling 2d6 and taking the sum (the easiest part). Then you'd work the probability of the better fighter rolling higher than each of the numbers, 2 through 12.

Eg, for 2, the better fighter wins with probability 1.
For 3, the better fighter wins with probability 35/36, and ties 1/36 (what do ties do? Ties rerolling would probably be easiest)
For 4, the better fighter wins with probability 33/36, loses 1/36, ties 2/36.

Do that for each roll up to 12--not knowing what ties mean, I can't work this out, even if I weren't too lazy to do so anyway. From this, you know the probability of the better fighter winning, W, for a given round.

You have at least five round fight (or more, depending on ties)...so now you work all possible W/L cases over 5 rounds (that's 32 cases), and work out the probability for each case. The cases where 3 W's appear before 2 L's are the cases where the better fighter wins.

It can be done, but it would take time.
Kaelik, to Tzor wrote: And you aren't shot in the face?
Frank Trollman wrote:A government is also immortal ...On the plus side, once the United Kingdom is no longer united, the United States of America will be the oldest country in the world. USA!
fectin
Prince
Posts: 3760
Joined: Mon Feb 01, 2010 1:54 am

Post by fectin »

Doom wrote:You pretty much need to do that on a case-by-case basis.

First, you'd work out the probability that the guy with the +1 rolls higher than the guy with no bonus. I'm going to call the guy with the bonus the better fighter.

To do that you set up the distribution for rolling 2d6 and taking the sum (the easiest part). Then you'd work the probability of the better fighter rolling higher than each of the numbers, 2 through 12.

Eg, for 2, the better fighter wins with probability 1.
For 3, the better fighter wins with probability 35/36, and ties 1/36 (what do ties do? Ties rerolling would probably be easiest)
For 4, the better fighter wins with probability 33/36, loses 1/36, ties 2/36.

Do that for each roll up to 12--not knowing what ties mean, I can't work this out, even if I weren't too lazy to do so anyway. From this, you know the probability of the better fighter winning, W, for a given round.

You have at least five round fight (or more, depending on ties)...so now you work all possible W/L cases over 5 rounds (that's 32 cases), and work out the probability for each case. The cases where 3 W's appear before 2 L's are the cases where the better fighter wins.

It can be done, but it would take time.
That's a confusing way of putting it.
Find the probability of each result for one player, then the probability of eac result for the other. Put them along the top and side of a table. each cell of that table is the row header times the column header. That is the probability of that exact result occurring (remember that e.g. 60% = 0.6). Choose all the results that you're looking for (e.g. Every cell where Player A has a result higher than Player B) and add them up. That is the probability of that result.
This also lets you build distributions around them, so you can make sure that there aren't any weird peaks or anything.
User avatar
shadzar
Prince
Posts: 4922
Joined: Fri Jun 26, 2009 6:08 pm

Post by shadzar »

most people on forums about mathematics, overanalyze the mathematics, and the game isnt played by the masses in the fashion that the math is being analyzed.

i would just look at is the percent chance to hit something, in regards to attacks, enough to suffice the damage being done and a proper challenge for the party...

how many rounds should a dragon last?...what should it be doing to the party? are you REALLY trying to take 25% resource for each combat form the players party to make a specific 4 combat per day scenario?

what are you trying to achieve with the combat form a design standpoint, and IS that the same goal the players have when playing the game for that combat?

it is much easier to do with a printed adventure, if you have those goals, but overall game design you have to be able to allow for player/DM decision on what results they are looking for form the combat.

also you need to look at does a previous attempt REALLY matter upon a new attempt at doing something?

does doing this task 10% previously offer anything other than only having 90% left to do? is there something that makes it cumulatively easier other than the fact that it is partially done? should a prior attempt make future attempts easier with some modifier on a progressive scale?

take craps for instance. rolling 10 now doesnt impact future rolls. just bring the likely hood of rolling 10 again down, whereas rolling a 6 first has a higher probability of rolling it again as there are more chances to roll 6 on 2d6, than there are for rolling 10.

then looking at the cumulative rolls, means to "win" you must roll 10 again before rolling 2, 3, or 12.

this was a problem with skill challenges in 4th, as it was pretty much playing craps as you had to "win" before you "lose"...

it is better to make rolls for such things independent of previous rolls, so the layman doesnt have to bother with worrying about such things, and let each roll have its own meaning.

so remove the need for as much probability as dice, or your random number method allows, and give each outcome the same chance such as a d20 has the same 5% chance of being a certain number, as "fair dice" will allow.

more complex dice used means more complex probability, so try to keep the number of successive rolls to determine an outcome as low as possible, and the number of dice as low as possible also.

3d6 works for ability scores, cause it offers a great range, but also because it isnt used often but for something that later doesnt change. the d20 gets used for all things because it is easiest to get probability form except for d%.

if you could use d% and figure everything out to actually percents, then that would be the easiest way to go.
Play the game, not the rules.
Swordslinger wrote:Or fuck it... I'm just going to get weapon specialization in my cock and whip people to death with it. Given all the enemies are total pussies, it seems like the appropriate thing to do.
Lewis Black wrote:If the people of New Zealand want to be part of our world, I believe they should hop off their islands, and push 'em closer.
good read (Note to self Maxus sucks a barrel of cocks.)
Username17
Serious Badass
Posts: 29894
Joined: Fri Mar 07, 2008 7:54 pm

Post by Username17 »

It's usually pretty easy to check the chances of rolling "at least X" for a system. So make a list of every roll one character could make and then add up the chances of another character rolling what they need to beat them or higher. It's actually pretty fast in most cases, since in most cases it follows a pattern.

Let's say you are comparing opposed d20 rolls. You have a five percent chance of rolling any particular number. So you have a 5% chance of rolling a 1 and the enemy has whatever chance of beating that. And you have a 5% chance of rolling a 2, and your enemy has a 5% less chance of beating that. And so on. It's basically just 5% * 5% * a triangular number. It only gets a little screwy at the eds because you might have some situation where it doesn't get better than 95% or something so you have to fiddle with it a tad.

-Username17
User avatar
Avoraciopoctules
Overlord
Posts: 8624
Joined: Tue Oct 21, 2008 5:48 pm
Location: Oakland, CA

Post by Avoraciopoctules »

Necro.

http://sinisterdesign.net/unpredictabil ... amination/

This is a blog entry by a computer RPG dev talking about how to optimally use randomness to enrich the player experience without making them feel like their successes and failures are beholden to the RNG gods. Not sure I agree with the author's priorities, but it's certainly an interesting read.

I'm interested in the idea of "replacing chance to miss" with "chance to dodge" and having randomness be an exceptional element in a deterministic-by-default system. Of course, in the context of a tabletop RPG there's probably going to be some MTP involved regardless.
User avatar
tussock
Prince
Posts: 2937
Joined: Sat Nov 07, 2009 4:28 am
Location: Online
Contact:

Post by tussock »

Near the end he gets so proud of his "you always hit for fixed damage" system that he introduces a dodge roll so that he still has a "you always hit for fixed damage" system. Heh.

The bit where he's eliminated the "feel bad" thing of rolling a 1 on a d20, he's also eliminated the "feel comparatively good" thing of the other 95% of the time you roll.

Other than that it was basically a journey of discovery where a designer found his supposed chess game was actually tic-tac-toe and so he was going to use dice to fix that but totally be a chess game anyway, unlike everyone else does, honest.


And yes, Fighters should eventually hit all the time for fairly static damage totals and also make all their saves. But they should still fail on a 1 so that they don't get to be a dick about it, and can still legitimately fear and behave correctly around basilisks, because it's an RPG and people should care what's happening. Did I miss anything?
PC, SJW, anti-fascist, not being a dick, or working on it, he/him.
User avatar
momothefiddler
Knight-Baron
Posts: 883
Joined: Sat Feb 22, 2014 10:55 am
Location: United States

Post by momothefiddler »

Man I only got as far as him freaking out about how mysterious and arcane independent probabilities and average results are before I had to stop.

If something is that outlandish to you, you don't need to be trying to teach people how it works.
User avatar
Avoraciopoctules
Overlord
Posts: 8624
Joined: Tue Oct 21, 2008 5:48 pm
Location: Oakland, CA

Post by Avoraciopoctules »

Though the writer mentions card games, they don't say much about procedural generation. Roguelikes often draw in players specifically because the randomness of actions combines with the randomness of dungeon layouts to assure you can never be certain of victory. There is satisfaction in improving your risk management so your average progress gets better,

I'm a little disappointed that the writer doesn't talk about games where you can't load a save, or go into depth on how a random operation with lasting results can push the game towards guaranteed success or failure.

Fire Emblem takes the "find a Holy Avenger at level 2" feeling farther with its random level-up gains. The impact goes way beyond a hand of Magic cards, since a character getting dramatically blessed or cursed in stat gains can upend your strategy for the whole run. It may be a niche experience, but so is Telepath Tactics.
User avatar
tussock
Prince
Posts: 2937
Joined: Sat Nov 07, 2009 4:28 am
Location: Online
Contact:

Post by tussock »

Even regression to the mean the law of large numbers, where rolling more dice means your average roll gets closer to average. How stuff like Warhammer is pretty deterministic for the most part because you end up rolling about a thousand d6's, though early kills are still worth more, and a single die to deploy something or make a stand's morale check is far more likely to change the game than any particular 5+ armour save.

Though he did get into how critical event rolls generate breadth and depth of tactics for pre-responding to the future probability space before they resolve. Like for Bloodbowl where any failure can end your team turn, so you want to position free units to cover multiple possible outcomes before you even start rolling, while also considering their availability to potential future developments. Which is to say, run a seagull.


edit: fixed name of thing after extensive bone-headedness on my part.
Last edited by tussock on Mon May 04, 2015 6:44 am, edited 1 time in total.
PC, SJW, anti-fascist, not being a dick, or working on it, he/him.
User avatar
Kaelik
ArchDemon of Rage
Posts: 14838
Joined: Fri Mar 07, 2008 7:54 pm

Post by Kaelik »

tussock wrote:Even regression to the mean, where rolling more dice means your average roll gets closer to average.
That is not what regression to the mean is.

This message is brought to you by Tussock Is Always Wrong About Everything(TM).
DSMatticus wrote:Kaelik gonna kaelik. Whatcha gonna do?
The U.S. isn't a democracy and if you think it is, you are a rube.

That's libertarians for you - anarchists who want police protection from their slaves.
nikita
Apprentice
Posts: 56
Joined: Tue Mar 29, 2011 5:12 pm

Re: Can we talk about mathematical analysis of rules?

Post by nikita »

Schwarzkopf wrote:Hi guys.
What exactly ARE the mathematical and statistical analysis techniques that we're talking about? What is the procedure for going about each of them? How much academic knowledge of statistics is required? What kind of computational and software resources are needed? How much playtest data, and therefore how many playtesters?
When you analyze something you generally look at the expected value for a particular chance and effect. If there are wildly differing expected values you can identify dominant strategies. Tabletop role-playing games rely a lot on chance and all analysis is rooted on probability. This information is learned in any mathematics class about probability and statistical analysis.

I do this analysis as part of my day job and in my experience there is no one real way to "do it correctly". Some use Excel. My own favourite way is to write open rules to a small (typically Java or C# based) computer program. This allow me to play a prototype rule set and change rules as needed. Similarly I can quickly change different values to quickly test out hypothesis or another.

Amount of testing depends on what kind of effect you are looking for. I made rules for child birth and infant death within afternoon and they are effectively frozen once done and play tested. However, more complex things like economic rules are constantly evolving and thus related play testing is ongoing.

My own technique is to write the "correct end values" right to my simulation program as comments so I can try them whenever I need to revisit the mechanics. All this can be done with laptop.

Please remember that you can do a lot with computer but you should remember that testing for a player interest requires human testers and human testing.
User avatar
Previn
Knight-Baron
Posts: 766
Joined: Tue May 12, 2009 2:40 pm

Post by Previn »

DragonChild wrote:Ok, so, breaking it down as easy as possible. If you're doing a dice pool system, the bionmial distribution is how you figure out the average number of hits and whatnot. The formula is:

f= (n!)(p^k)(1-p)^(n-k) / k!(n-k!)

It's that image block right at the start, it's all you care about.

f is the actual probability of getting the number of hits you want.
n is the number of dice you're rolling.
k is how many "hits" you want.
p is the odds of getting a hit on each die (as in, for After Sundown and the graphs I posted, p=1/3)
I found Scott Gray's Dice Pool Calculator about 3 years ago when I started seriously working on a dice pool game. It's a very hand resource that I feel is worth mentioning given how often we talk about dice pool related probability.
User avatar
tussock
Prince
Posts: 2937
Joined: Sat Nov 07, 2009 4:28 am
Location: Online
Contact:

Post by tussock »

Kaelik wrote:
tussock wrote:Even regression to the mean, where rolling more dice means your average roll gets closer to average.
That is not what regression to the mean is.
Really? In Warhammer, you throw 20 armour saves on round 1 and they all fail. On round two, three, and four, you'll expect to get more successes, and any long run of samples will tend toward average, because dice. That's regression to the mean as far as I can tell.

Yes, the variance grows when you sum the things, but obviously when I'm talking about regression to the mean I'm talking about multiple samples, eh ... I checked wikipedia, I may be wrong, but I'm not sure how?
PC, SJW, anti-fascist, not being a dick, or working on it, he/him.
Omegonthesane
Prince
Posts: 3697
Joined: Sat Sep 26, 2009 3:55 pm

Post by Omegonthesane »

tussock wrote:
Kaelik wrote:
tussock wrote:Even regression to the mean, where rolling more dice means your average roll gets closer to average.
That is not what regression to the mean is.
Really? In Warhammer, you throw 20 armour saves on round 1 and they all fail. On round two, three, and four, you'll expect to get more successes, and any long run of samples will tend toward average, because dice. That's regression to the mean as far as I can tell.

Yes, the variance grows when you sum the things, but obviously when I'm talking about regression to the mean I'm talking about multiple samples, eh ... I checked wikipedia, I may be wrong, but I'm not sure how?
Also, IIRC if you're adding more dice together, the variance drops relative to the range even though both of them increase in absolute terms. Because regression to the mean - rolling 20d6 damage is a lot like rolling 1d6 20 times for statistical purposes...
Kaelik wrote:Because powerful men get away with terrible shit, and even the public domain ones get ignored, and then, when the floodgates open, it turns out there was a goddam flood behind it.

Zak S, Zak Smith, Dndwithpornstars, Zak Sabbath, Justin Bieber, shitmuffin
User avatar
momothefiddler
Knight-Baron
Posts: 883
Joined: Sat Feb 22, 2014 10:55 am
Location: United States

Post by momothefiddler »

tussock wrote:Really? In Warhammer, you throw 20 armour saves on round 1 and they all fail. On round two, three, and four, you'll expect to get more successes, and any long run of samples will tend toward average, because dice.
I can't tell whether you're saying that on rounds 2, 3, and 4, you're expecting more successes than round 1 because 0/20 is not very likely, or if you're saying that once you've gotten 0/20 on round 1, you can expect more one 2, 3, and 4 than you would otherwise expect.

The first is regression to the mean. It's not a particularly elaborate concept - if you roll a 2 on 1d20 and then roll again, you'll probably get higher than a 2. Not because the die remembers, just because if you roll 1d20 you'll probably get higher than a 2.

The second is not regression to the mean. It's "I rolled this d20 until it rolled 1 three times in a row and now I keep it in a special foam case until I really really need to roll not-a-1 because four 1s in a row???? What are the odds????"
Omegonthesane wrote:rolling 20d6 damage is a lot like rolling 1d6 20 times for statistical purposes...
If by "a lot like" you mean "indistinguishable", yeah.
User avatar
Kaelik
ArchDemon of Rage
Posts: 14838
Joined: Fri Mar 07, 2008 7:54 pm

Post by Kaelik »

tussock wrote:
Kaelik wrote:
tussock wrote:Even regression to the mean, where rolling more dice means your average roll gets closer to average.
That is not what regression to the mean is.
Really? In Warhammer, you throw 20 armour saves on round 1 and they all fail. On round two, three, and four, you'll expect to get more successes, and any long run of samples will tend toward average, because dice. That's regression to the mean as far as I can tell.

Yes, the variance grows when you sum the things, but obviously when I'm talking about regression to the mean I'm talking about multiple samples, eh ... I checked wikipedia, I may be wrong, but I'm not sure how?
And do you not see how the part you said above about regression to the mean, which I even quoted, doesn't say a single goddam thing about rolling twice.

You said "If you roll 20 dice instead of 10 dice, you are more likely to get the mean, and that is regression to the mean." Which is of course, completely wrong. (about being regression to the mean).
Last edited by Kaelik on Fri May 01, 2015 11:10 am, edited 1 time in total.
DSMatticus wrote:Kaelik gonna kaelik. Whatcha gonna do?
The U.S. isn't a democracy and if you think it is, you are a rube.

That's libertarians for you - anarchists who want police protection from their slaves.
User avatar
tussock
Prince
Posts: 2937
Joined: Sat Nov 07, 2009 4:28 am
Location: Online
Contact:

Post by tussock »

@Kaelik: I was talking about rolling dice over time, in an actual game with rules, as exampled in the following sentence that you trimmed. You're really stretching to find an interpretation where I'm wrong, by removing all the context.

Like, it's pretty fucking obvious how to read that in a way that I'm right, eh.

@momo, thanks, yeh, it's interesting how you can't tell if I'm right or wrong once all the context is gone, eh. Like when I distinguished "x dice" as the "x armour saves" type of roll, or the type where each roll can end your turn. In the same paragraph. Which is different to rolling 20d6 and summing their total. Duh.
PC, SJW, anti-fascist, not being a dick, or working on it, he/him.
User avatar
momothefiddler
Knight-Baron
Posts: 883
Joined: Sat Feb 22, 2014 10:55 am
Location: United States

Post by momothefiddler »

tussock wrote:@momo, thanks, yeh, it's interesting how you can't tell if I'm right or wrong once all the context is gone, eh. Like when I distinguished "x dice" as the "x armour saves" type of roll, or the type where each roll can end your turn. In the same paragraph. Which is different to rolling 20d6 and summing their total. Duh.
I still honestly do not know what you mean.

I just looked up Warhammer Armour Saves to see if there's anything special there that clarifies things and... there's not. It's a 1d6 vs a target defined per unit, yes? Roll 20 of those and fail all of them (roll low), then roll the 20 again, and you probably won't fail all of them again.

But regression to the mean still doesn't mean the dice remember anything. Because even with Armour values (dunno terminology here) of 6 on all the units, that's a 1/6 chance of success per unit, or (5/6)^20 ~= 2.6% chance of failing all of them. So on round 2 (unless you're referring to a Warhammer mechanic where failing makes it harder to fail again, which would not be regression to the mean) you have a roughly 97.4% chance of rolling better than you did in round 1. Because you have a ~97.4% chance of rolling at least one 6.

That's all it means.

(I at no point mentioned summing 20d6? I agree that that gives you a single sample off a bell curve that is wildly different than 20 individual samples off a linear d6? Where did that part even come from?)
User avatar
tussock
Prince
Posts: 2937
Joined: Sat Nov 07, 2009 4:28 am
Location: Online
Contact:

Post by tussock »

I'm aware of the gambler's fallacy, thanks. The summing bit is where I can't figure out what the fuck Kaelik's on about and am randomly guessing at what he thinks I mean.

In context of the article, the dude wrote that a 1-in-1000 event at the start of a game was terrible and a good reason never to do random attacks. But if you throw enough dice later in the game, it doesn't really matter.

Your first Warhammer shot might get 0/10 hits, but at 1/3 calculated average wounds, that tends to become 10/40 and then 30/100 and finally 330/1000, or 99% of average, closer to average than you could possibly get on the first action. That's what I mean. Sure, thousand-die Warhammer battles will have a larger absolute variance in hits than ten-die 1st level D&D skirmishes, but not in the proportion of hits, like regression to the mean fucking well has to be about.

And the important bit for RPG design/analysis is that more dice is more deterministic. 20-round solo slogs in 4e normally felt to players like they knew what was going to happen a very long time ago and they're still waiting for it to actually get on and happen.

Deterministic games need to keep throwing emergent tactical choices at you. Good Warhammer players don't force base-contact when there's an uncertain outcome unless it's for the win in the late game, but after your opponent actually moves and engages you, it changes what you have to do. How many victory points can you throw away holding up their heavy cav and still hold the hill they're after for a net gain, is it better to give it up and leave them out there, or try and set up a trap (if your opponent's a noob).
PC, SJW, anti-fascist, not being a dick, or working on it, he/him.
User avatar
momothefiddler
Knight-Baron
Posts: 883
Joined: Sat Feb 22, 2014 10:55 am
Location: United States

Post by momothefiddler »

...Okay. I don't know that we're disagreeing at all, then. Except that unless I'm way off, regression to the mean is about individual measurements and you're just talking about the fact that, the larger the sample size, the closer it sticks to the curve. I don't know what the term for that is, but I don't dispute it.
Interestingly, at least based on my experiences with (almost universally overwhelmingly superstitious) gamers, you can have enough dice to make things essentially deterministic, but if you spread them out (in terms of real time) enough that it's not immediately obvious, people will have more fun than if the determinism was transparent.
User avatar
Kaelik
ArchDemon of Rage
Posts: 14838
Joined: Fri Mar 07, 2008 7:54 pm

Post by Kaelik »

momothefiddler wrote:...Okay. I don't know that we're disagreeing at all, then. Except that unless I'm way off, regression to the mean is about individual measurements and you're just talking about the fact that, the larger the sample size, the closer it sticks to the curve. I don't know what the term for that is, but I don't dispute it..
This.
DSMatticus wrote:Kaelik gonna kaelik. Whatcha gonna do?
The U.S. isn't a democracy and if you think it is, you are a rube.

That's libertarians for you - anarchists who want police protection from their slaves.
User avatar
brized
Journeyman
Posts: 141
Joined: Sun Jun 17, 2012 9:45 pm

Post by brized »

momothefiddler wrote:the fact that, the larger the sample size, the closer it sticks to the curve. I don't know what the term for that is, but I don't dispute it.
The Law of Large Numbers.

Image
Tumbling Down wrote:
deaddmwalking wrote:I'm really tempted to stat up a 'Shadzar' for my game, now.
An admirable sentiment but someone beat you to it.
Post Reply