Showing posts with label Probability. Show all posts
Showing posts with label Probability. Show all posts

Sep 26, 2011

Shadowrun 4th Ed. - Strength and Lifting

In Shadowrun 4th Edition, how much a person can lift or carry is based on the character's Strength, modified by the successes from a Strength + Body roll.  Human Strength and Body attributes lie on a 1-6 scale, and the manual says that average humans have scores of 3.  With the average person's STR + BOD = 6, it is possible to roll up to 6 successes to modify his base lifting amount (though very unlikely to get all 6 successes).  Each success rolled adds 15 kg to the amount that can be lifted.  Here is a graph of the average lifting abilities (after rolling) for characters of average Body and any given Strength:
We see here that the average real-world person is as strong as a Shadowrun character with a Strength of 2, one level below average given an average Body.  The perfectly average Shadowrun character will (on an average roll) be stronger than about 70% of real people.  With the randomization in the game mechanics, it is possible for characters with strength of 2 to lift more than shown on this graph about 26% of the time.  So, it gets a little messy comparing the probability distributions of game characters to the single limits I have for real people.  Real people just do not have wide variance for how much an individual is able to lift.  A person's max lift will fluctuate a little based on factors like rest, warm-up, time of day, and how long it's been since working out, but the fluctuation will not come anywhere close to the 90 kg variance an average Shadowrun character has.

Shadowrun's mechanics have the typical trend that average characters are stronger than average real-world people, but on average the difference is not as severe as other popular systems.  What is quite deviant in the mechanics is the huge variance within a single person due to rolling so many dice to determine lifting ability during each attempt to lift something.


Here is a table of probabilities of successes based on die pool:


Here is the table of base lifting amounts and modifiers:
Rolled successes add 15 kg to lifting, and 10 kg to carrying.  I would prefer the system to have less randomization.  It is also unfortunately messy to use the real strengths that I have in comparison to Shadowrun characters all of Body 3.  I have no clear way to break real world people into six Shadowrun-equivalent groups by body size to create separate graphs by Body and Strength.  This is one of the least clear comparisons I'm making for strength, but I hold to the opinion that less randomization is better in a simulation mechanic.

Jun 5, 2011

Death by Falling: Revisions and Simulation

One thing I realized while looking over my last post was that I only showed chance of death by impact velocity, not by distance.  Of course, you could calculate distances yourself, but I want to be more helpful than that (see second graph below).  Also, I've been bothered by my assumption of how many meters tall a "floor" is.  I had originally used the average height of the Empire State Building (12' per floor), but later used 3.5m.  This morning I checked out a resource for average floor heights by building type, and used those numbers instead, assuming that Ramos's and Delany's data was mostly from residential buildings.  Here is the revised graph of probabilities of death by impact velocity:

Here is the graph that I have put together from my estimates for chance of death for an average person by distance fallen, as well as two possible dice systems for simulation:

So, for a 3d6 system, you would try to roll higher than or equal to (meters_fallen - 9).  For a 3d10 system, just roll higher than or equal to the number of meters fallen.  For elderly characters, maybe add 2 to the number of meters fallen, or multiply by 1.5.  For children or acrobats, maybe subtract 1 from meters fallen, or multiply meters by .8.  Remember that even survivors are typically severely injured, even from falls of as little as 3m, and can require extensive medical treatment.   

Jun 4, 2011

Death by Falling: Real World Information to Guide Mechanics Development

So I don't turn away too many readers with the length of this post, here is the executive summary:

For an average person in the real world:

  • The shortest fall distance that can result in death: 0m (or I guess ~1m if we focus on center mass)
  • The average distance that will result in death: ~15m
  • The maximum distance a person can fall and survive: technically any with a lot of luck and medical attention, but practically closer to 30m (still with luck and medical attention)
[Edit: For a graph of chances of death by distance fallen, see the next post.]

My Process:

To help game designers (and for myself) with developing simulation mechanics for falling fatalities, I tried to get some real world data on fatalities and injuries from falls. My first stops, of course, were the Center for Disease Control and Prevention (CDC, because it tracks all causes of death), the National Institute of Health, and the Occupational Safety and Health Administration (OSHA, part of the Dept. of Labor). Amazingly, none of these sources made available the proportions of falls that result in fatalities or injuries by distances fallen. There was just a lot of information on the numbers of people who died from falls each year by profession, age, job, and fall context (ladder, roof, scaffold, etc...) In fact, I could only find one document via the CDC reporting a proportion of falls resulting in injuries, and it was only for Americans over the age of 65 in 2006.

I turned to regular Google searches and found a few research articles from over the last four decades with some data on fall fatalities. I also explored some information on pedestrians and unbelted drivers in front-on car collisions in case I would have to use it as a not-ideal proxy for a person hitting the ground (like the Marvel system's use of charging attack mechanics). Interestingly, the fatal car collision speeds are very close to the fatal fall speeds that I found, despite significant situational differences such as body position and impact angles. People tend to survive slightly higher speed impacts in front-on car collisions than falling.

In this graph, falling speed is estimated based on distance fallen, which was also estimated because Ramos & Delany (1986) only reported distance fallen in floors (like the Marvel system).  The rest of the data points are generated by the regression equations from the Richards (2010) document, which is why the curves are so smooth.

[I later revised this graph using different assumptions about floor heights.]

Terminal Velocity:

I learned a lot about terminal velocity, and made a calculator in Excel that works for dry air. Humidity and water vapor decrease air density, but I do not know how much. For an average spread man, terminal velocity is about 56 m/s near sea level.
Terminal Velocity = SQRT(2mg/pad)
m = mass of object in kg
g = gravity (9.81 m/s at sea level)
p = air density, which equals 1.225*0.9883^(altitude_in_meters_over_sea_level/80)
a = object surface area facing down, generally .5-.6 square meters for a spread skydiver
d = drag coefficient, which is probably .6 for a person (McIlveen, 2002)

I derived the equation for air density based on other information I found, so it may not be precise.  Terminal velocity is largely irrelevant because 99% fatality rates occur at about .6 of terminal velocity at sea level. Using v=at works well enough up to the nearly assured fatality point that I do not feel pressured to accurately model how drag affects falling acceleration. Wikipedia says that half of terminal V is reached in about 3 seconds, which matches v=at, but that .99 of terminal V takes 15 seconds instead of <6s. This equation relatively closely approximates velocity in m/s as a function of time (s) for a 70kg person falling near sea level: y = 0.0375 x^3 + -1.28 x^2 + 14.9x + -4.02.  [Edit: I do not like how the line starts at a positive value and tilts up anti-asymptotically at the end, so I would probably replace x in the equation with (x-0.35), and say that terminal velocity is fully reached at 12 seconds.]


Facts:

Falls are one of the leading causes of injury and death, especially for kids and the elderly. Kids take less damage, and the elderly take a lot more. Falls are the 2nd leading cause of death for Americans age 60-72. About a quarter of elderly falls (from standing, steps, or furniture) result in injuries, and 1% of those result in death.  20-30% of elderly falls result in permanent debilitation.

Fatalities in the data here occur up to months after the falls.  I do not have real data on instant deaths.

The average survived work-related fall results in 100 days of missed work.  These falls are generally among contractors and roofers, from ladders, scaffolding, and roofs.

20-30% of fatal falls at work are not from a height!  Tripping can be fatal if the head is struck against something in a bad way.

The record speed of falling is 614 mph, achieved over 40 years ago by a guy who jumped from a balloon at 30,000 meters where the air is only 0.015 as dense as it is at sea level.

Jumps from the Golden Gate Bridge, about 70m, have a 2% survival rate, but even many who survive the fall drown quickly. 80% break bones, mostly ribs, and 75% suffer lung injuries. More than half rupture their livers, and a quarter fracture their skulls. The record high dive is from about 52m (you can find videos on YouTube). It is vital to hit the water feet first, minimizing surface area and protecting the torso and head.

The Richards document for the London DfT has a great graph on injury severities by velocity.


Sources:

Center for Disease Control and Prevention. (2008). Self-Reported Falls and Fall-Related Injuries Among Persons Aged >65 Years --- United States, 2006. MMWR, 57(09), March 7, p. 225-229.

McIlveen, J. (2002). The everyday effects of wind drag on people. Weather, 57, p. 410-413.

Occupational Safety and Health Administration, Department of Labor. (2010). 29 CFR Part 1910. Federal Register 75 (99), May 24.

Ramos, S. and Delany, H. (1986). Free falls from heights: a persistent urban problem. Journal of the National Medical Association, 78 (2), p. 111-115.

Richards, D. (2010). Road Safety Web Publication No.16: Relationship between Speed and Risk of Fatal Injury: Pedestrians and Car Occupants. Department for Transport: London.

Snyder, R. and Snow, C. (1967). Fatal injuries resulting from extreme water impact. Aerospace Medicine. 38 (8).

May 25, 2011

Death by Falling

 [Edit: If you're looking for real information on deaths by falls, see my next two posts here and here.]

This is the first of several posts I have planned about simulating the results of falls from elevations.  Here I simply determined the minimum distance necessary to fall for an average human to die, the distance at which an average person would die on average, and the maximum distance that an average person could fall without dying for ten different systems.
As you can see, there are wide differences among systems.  The grades I give are subjectively based on how each mechanic models reality and contributes to game balance.

  • Aberrant: For any fall under 30 meters, even the most feeble person has a 99.6% chance of only sustaining minor injuries that will heal in a day (bashing damage).  At 30 meters, damage becomes lethal and maxes out at 10 dice (an average of 4 levels of damage), with only a 1.3% chance of dying even when falling miles.  F
  • Chaosium: Average health is actually 12hp, not 11, but the distances are correct.  1d6 damage for each 3 meters gives us a nice distribution of injuries and chances of death up to the assured death point at 36 meters. B
  • D&D 3.5 (OGL): The average human in this system has 1d4 hp, which I round up to 3, but does not die until reaching -10 hp.  Most falls that are not immediately fatal will still result in wounds that may result in a person's eventual death if not stabilized, but I did not calculate that.  B
  • D&D 4th ed.: The most appropriate stats I found for a non-heroic person in this game were for "Human Rabble", who have 1 hp.  At 1d10 damage for each 10' fallen, everybody dies from any fall of at least 10'. D
  • GURPS 3rd ed.: Damage involves rolling 1d6 and subtracting a constant for each yard fallen.  Since it is possible to roll the constant or less on each 1d6, it is possible to take no damage at all when falling from any height.  Instant death requires 6xHealth damage in the GURPS systems. D
  • GURPS 4th ed.: Now there is an equation for determining how many d6 to roll based on velocity.  GURPS in one of the few systems that takes acceleration into account instead of just distance.  A-
  • Heavy Gear: Roll 1d6 for each meter up to 10 meters, and multiply the result by meters fallen up to 30.  Remember that the Silhouette system is funky, so "result" means the highest number rolled among the dice, and additional 6s each add 1 to the first 6.  It is possible (ridiculously unlikely) to roll all 1s and survive any fall.  It is also possible (ridiculously unlikely) to roll all 6s and die falling 5 meters.  An average person has a 40% chance of death falling 8 meters, and an 81% chance of death falling 9 meters. B-
  • Marvel Super Heroes 2nd ed.: The rules as written were clearly not proofread or edited.  They make absolutely no sense in the English language.  On page 21 the rules say to take 1 point of damage for each floor fallen (a person would have to fall 24 floors), but also say to treat falling as a charge attack.  Charge attack rules on page 27 gave me the numbers I use for this post.  Using the Empire State Building for reference, I decided that a "floor" is 12 feet. F
  • Rifts: People take 1 point of damage for each 10' fallen.  Instant death is at -(PE+1) hp.  A healthy average person will survive any fall under 390'.  F
  • Shadowrun 4th ed.: I did not find stats for an average human.  Humans have 1-6 body points, bought up from 1 at character creation.  Looking at sample characters, I figured that an average human has a body of 2. Damage from falls over 6m is about (distance+4)/2, and characters roll (Body)d6 to resist some damage.  For someone with a Body of 3, the distances are 22m, 24m, 28m.  C
  • 7th Sea: This is a game focused on dramatic swashbuckling stories, and seems to not have rules for falls.  
And here is a graph:

May 6, 2011

Lucky Dice

Do you have lucky dice?  This is a slightly modified version of something I wrote a couple years ago that I think has a place here.

I have encountered more than one gamer over the years who believes that he has lucky dice. These dice are reported to roll the highest damage, the most critical hits, and generally turn the player's characters into unstoppable juggernauts. Of course, I did not notice any disproportionate numbers of good or bad rolls. I argued with these players that their perceptions were tainted by the availability heuristic and confirmation bias. When they can more easily recall rolling good numbers with certain dice, they label the dice "lucky". Then, whenever those dice roll well, they say, "See? This proves the dice are lucky!" Whenever the dice roll poorly, they say, "That was a fluke! These lucky dice usually roll well.", and fail to store the failures for future recall, feeding back into the availability heuristic. Well, there is a relatively easy way to determine if a die is lucky.

If you think you have a lucky die, record what it rolls EVERY TIME. If you believe it is lucky only in a certain situation (e.g.: "This is my saving-throw die!"), then record what it rolls every time you roll it in that situation. Do not leave out any rolls. There are no Mulligans. When you have a good amount of rolls (at least 30, but more is better), you can calculate the z-score for them, then compare that z-score to a threshold. This comparison is called a one-tailed test of proportion, and we use this specific type of comparison to test the hypothesis that your die rolls a higher (not just different) proportion of good rolls than a fair die. Though there are different ways to calculate the z-score based on how sure you want to be of the results, the following simple examples should be good enough for most of you.

The equation for z is:
z = (p - Po) / (sqrt((Po(1 - Po))/n))

The variables are:
p: the proportion of the rolls you recorded that were good (natural 20, 11 or higher, 8-10 on 1d10, etc...). p = ((# of good rolls) / (total # of rolls)).
Po: the proportion expected of fair dice (0.05 for a natural 20, 0.5 for 11 or higher on d20, 0.3 for 8-10 on d10). This should technically be written as pi subscript 0.
n: the total number of rolls you recorded

To make things easy, we will use an alpha of .05 in the examples (I explain further down). This gives us a threshold of 1.645. So, all you have to do is figure out z using the equation above (or one of the examples below), and if z > 1.645 you can claim that you may have a lucky die.

Example 1:
"My die rolls high."
Po = 0.5 (half of a fair die's rolls will be above the mean, and half below)
z = (p - 0.5) / (sqrt(0.25 / n))

Example 2:
"I roll 20s."
Po = 0.05
z = (p - 0.05) / (sqrt(0.0475 / n))

To elaborate on Example 1, let's say that I claim I have a d20 that usually rolls at least an 11, and I have countless stories of how it let my characters defeat monsters and overcome challenges. I want to prove to my naysayer friends that it really is lucky, so I write down every roll for a month. I rolled the die 100 times. 58 of the rolls were at least 11, and 42 were 10 or less. I get really excited about rubbing it in everyone's faces, but remember that there's more to do. After all, I only rolled the die 100 times, and even a fair die is likely to roll 58/100 good rolls eventually. Fair dice are only expected to roll exactly 50/50 as the number of rolls approaches infinity. So, I plug in the variables:
p = 0.58
n = 100
Po = 0.5
z = (0.58 - 0.5) / (sqrt(0.25 / 100)) = 1.600
1.600 < 1.645 (our threshold)
We should probably not be impressed that 58 of the rolls were above average. If the die had rolled 59 good rolls out of 100, z would have been 1.800.  What would that mean?

This is where I need to explain about alpha. In this case, alpha is the probability that you have a fair die even if z is greater than the threshold. Usually, an alpha of 0.05 lets us feel confident enough that the effect we have observed is based on the properties of what we are observing instead of a statistical fluke of the sample of observations.  It is easy to increase our confidence by using a smaller alpha, such as 0.01 (which would increase the z threshold), but using a smaller alpha increases the probability that we falsely think a lucky die is fair. There is a trade-off between the risks. Personally, I would demand a high degree of confidence, and would insist on an alpha of at most 0.01.  The best way to manage both risks of false results is to get a bigger sample of rolls. So, if you want to be more sure of whether your die is lucky or not, record 200 rolls, or 500. The bigger n gets, the better.


When alpha is 0.01, the z threshold is 2.328, so even 59% good rolls does not make me confident that the die is lucky.  For an alpha of 0.01, 62 out of 100 rolls would have to be above average.
To elaborate on Example 2, let's find out how many natural 20s have to be rolled with an alpha of 0.01 for someone to tell me that he rolls 20s.  
(p-0.05)/(sqrt(0.0475 / 100)) > 2.328
(p-0.05)/0.0218 > 2.328
p-0.05 > .0507
p > .1007
You would have to roll 11 20s out of 100 rolls.


Good luck.

May 2, 2011

Graphs of Success Probability by Skill Total and Difficulty

I've given you tables of success probabilities by skill total and difficulty for two systems (World of Darkness, Shadowrun 4th ed.), plus a graph for Heavy Gear.  Here I present that information again in graphs, plus two more systems, to show some of the different patterns that exist for success probabilities with increases in skill among different systems.

Linear
Here is your standard d20 system, most popular in Dungeons and Dragons.  Each character has a skill modified by an attribute and various other junk, added to a d20 result and compared to a difficulty level.  Each increase in the skill total raises the probability of success by 5% linearly.  There is always at least a 5% chance of failure (rolling a 1).  In the D&D games, skills are not bought with general character development points, but characters are alloted a few points each level to be used only for skills.  Difficulty levels typically scale with character levels, so it behooves players to specialize in a few skills that are always increased with the character level in order to maintain good probabilities of success as characters level up.  I am not getting in to "taking 10" or "taking 20".

Inconsistent
Here is the graph for Dream Pod 9's Silhouette system, used in their Heavy Gear game.  We can see that the progression is not consistent.  The lowest skill is concave, rapidly dropping the probability of success at low difficulties relative to the drop at higher difficulties where the probability of success is already very low.  A skill of 1 has a linear descent.  Higher skills progressively maintain high success rates among lower difficulties before rapidly plunging at higher difficulties, and then there is the bent tail as it becomes more possible to roll multiple 6s.  Attribute bonuses are added to skill roll results, shifting the graph to the right without changing its shape.

Normal
Isn't that pretty?  I am not sure if I am completely representing the GURPS system accurately here, but I think players just have to roll lower than the characters' skills on 3d6 to succeed at tasks (17s and 18s fail).  So, there is no real "difficulty level" for tasks other than what is forced by skill levels.  There may be modifiers that increase or decrease a skill for the purpose of a challenge, shifting the whole curve to the left or right.  If we graphed the probabilities of each individual outcome for 3d6, the line would be shaped like a bell.  I call this "normal" because as a "normal distribution" it has higher probabilities of outcomes in the middle, progressively less likely outcomes away from the middle, and is relatively symmetrical.

Inconsistent Normal


We can see here that both Shadowrun by Catalyst Game Labs and World of Darkness by White Wolf approach the normal curve as their dice pools (skill total, or skill + attribute) increase.  With few dice in these systems, it is impossible to approximate the distribution of the normal pattern, and the results more follow the Inconsistent pattern.  These systems both involve rolling multiple dice (d6 and d10, respectively), and counting die results over a threshold as "successes".  Players need a number of successes equal to a task's difficult in order to succeed.  So, the terminology can get annoying as people get a bunch of successes but still fail at a task.

I really like how the Normal distribution of probabilities of success works in simulations, but not necessarily the way that GURPS implements it in the absence of difficulty levels.  In real life, when we encounter tasks far below our skill level, we are quite likely to succeed at them and have a low variance with our high success rate.  When we encounter tasks far above our skill level, we are quite likely to fail at them and have a low variance with our high failure rate.  Tasks closer to our skill level have increasingly variant success rates.  Because of this, I am in favor of the use of normal distributions of probability of success in simulation systems.  This typically requires rolling more than one die and summing the results.

Apr 23, 2011

White Wolf's World of Darkness Probability Tables

White Wolf's game mechanics typically look as though they were created by coked-up baboons.  I experienced a lot of frustration creating the probability tables for their 2004 version of the World of Darkness because of the mechanic of re-rolling 10s.  The whole game is like rolling damage for the arquebus in old D&D.  Technically, it is possible to roll forever, so I set some limits.  I stop calculating when the probability of an outcome drops below 0.001, or after the third roll.  It was relatively easy to find the probabilities of up to three successes with one die, then much more complicated for two dice, then after some struggles I noticed a pattern in how many separate equations must be solved and combined for each possible outcome (that meets my criteria) for a given number of dice:
So, instead of trying to solve over two thousand equations or trying to figure out how to write a computer program that would do it for me, I brute forced the problem.  I used Excel to whip up 10,000 sets of 3 rolls, then mixed them up twenty different ways, then averaged the occurrences of each number of successes.  The values in the following tables should be correct to about +/- 0.002.  (Click on the pictures to see bigger versions. I'm annoyed with blogspot's layouts.)
And, of course, by adding from the right we can find the probabilities of rolling at least any specific number of successes.  Remember that these probabilities include up to two re-rolls of 10s.
I hope that these tables will be useful to game masters (storytellers) in determining difficulty levels of challenges for characters in their campaigns.  They may also be helpful to players in deciding how much to increase a skill or attribute.

Apr 9, 2011

Shadowrun 4th Edition Probability Tables

This is a straightforward post of dice tables for 4th edition Shadowrun.  A player rolls a number of d6s equal to the sum of the character's relevant attribute and skill.  Dice that come up 5 or 6 count as successes.  If at least half of the dice come up 1, a Glitch occurs (something bad) even if there are also successes.  A Glitch with no successes is a Critical Glitch (something very bad).  These tables assume that players do not spend edge.  The first table shows the probability of each outcome for up to 15 dice.

What I find particularly interesting here is that the likelihood of both types of Glitch actually increases from 1 die to 2 dice, and that pattern continues for each even number of dice.  There is a kind of mechanical penalty for being better at a task half of the time, though probabilities of successes always increases.  This bizarre feature of the Glitch system does not make any sense from a simulation or game balance perspective.


This table may help game masters determine task difficulties based on characters' dice totals and the probabilities of success the GM wants in each situation.

Mar 29, 2011

Dream Pod 9's Silhouette System part 2

When we last left our intrepid system, I had graphed probabilities of success at various difficulty thresholds for different skill levels, holding attributes constant, and I made the claim that the system encourages min-maxing.  Let us follow up on that.

This table shows the probabilities of succeeding at tasks with a difficulty threshold of 6, which is hard, for various combinations of skill and attribute.  It also shows the character creation point cost of each skill/attribute combination, and the point cost per percentage change of success.
















We see that costs mirror each other across the center diagonal, and it is a more efficient use of points to buy a high attribute than a high skill.  Even more important to note is that Attributes are applicable to many skills, and are sometimes used to determine secondary traits (Health is the average of Fitness, Psyche, and Willpower).  So, not only would it be more efficient to buy a high attribute for just one skill, there is compound efficiency for buying a high attribute in general and with multiple related skills.

This table shows the average probabilities of success across tasks with difficulty thresholds from 1 to 7.  That should be a relatively standard distribution, since a threshold of 4 is considered average.


A notable difference here is that it is actually more efficient in some cases to buy a lower attribute than skill, but only when the average probability of success is less than 51%, which is not usually desirable in a heroic simulation.  At the useful levels of success, it is still more efficient to buy a high attribute, even for a single related skill.  We also see that an attribute of 2 and a skill of 3 is a kind of sweet spot for good success at a moderate price.

There are many available skills, but the overwhelming majority of them are based on just three attributes: Agility, Knowledge, and Creativity.  As far as skills go, this means there is a strong incentive to min-max, and just pick one of the three areas to focus on while taking negative scores in the other two.  If you don't care about having a lot of skills, and want more of a brute character, scrap all three and raise the Build, Fitness, Psyche, and Willpower attributes instead.

Since those three attributes apply to so many skills, it would be more appropriate to make a new version of each of the above tables for each number of desired skills, adding in only the average attribute cost per skill.  I am not currently inclined to make a dozen more tables.  This would make it drastically more evident that a high attribute score (a 4 is possible for a starting heroic character, but a 3 is practically as high as even a min-maxer should go) allows for the most success at multiple skills for an efficient price.

Something that I did not highlight is the fact that the same point pool is not used to buy attributes and skills.  It is impossible to use a huge number of points on attributes and then buy a bunch of low level skills as it is in GURPS.  This system guarantees a set block of points for skills.  If you don't want a lot of skills, use your attribute points to build a brute, and buy high levels of the couple skills you do want.  If you want a lot of skills, pick one of the three polyskill attributes to focus on, crank it up and buy many low level related skills.  I am glad that Dream Pod 9 split the pools this way, as it does slightly limit min-maxing and forces characters to have skills, but the system still does encourage attribute min-maxing within its point pool.

Also interesting is that it is incredibly difficult to increase attributes during play.  The experience point costs are  different than the character creation point costs, and strongly incentivize buying skills during play instead of saving up to increase an attribute.