Showing posts with label maths. Show all posts
Showing posts with label maths. Show all posts

Friday, 7 August 2009

Maths and Stuff, or How I Learned to Stop Worrying and Love Magnitudes of Outcome

One of my great heroes is Nassim Nicholas Taleb. It's not often you read a non-fiction book where you find yourself agreeing with almost everything contained therein, and, not only that, but having it illuminate certain parts of your own worldview which you haven't been able to properly express. Stephen Pinker did this with The Blank Slate, and I can think of a few other examples, but Nassim Taleb is the only author I've read who has managed the feat of doing it twice. (Fooled by Randomness and The Black Swan.)

I'm re-reading Fooled by Randomness at the moment. Last night I was struck by this passage and how it applies to D&D:

Assume I engage in a gambling strategy that has 999 chances in 1,000 of making $1 (event A) and 1 chance i n 1,000 of losing $10,000 (event B)... My expectation is a loss of close to $9 (obtained by multiplying the probabilities by the corresponding outcomes). The frequency or probability of the loss, in and by itself, is totally irrelevant; it needs to be judged in connection with the magnitude of the outcome. Here A is far more likely than B. Odds are that we would make money by betting for event A, but it is not a good idea to do so.

You can apply this way of thinking to rpg combat too. Take a D&D fighter with a THAC0 of 19 and a longsword (average damage 4.5), fighting a 1+1 HD orc (average 5.5 hp) with an AC of 6. The chance of hitting is 8 - that is, there is a 40% chance of success. From this we can extrapolate the expected damage per round the fighter deals to the orc: 1.8 hp (4.5/100x40). So the orc can hope to survive 4 rounds on average (just). So much for that.

Now let's take the example of an 8th level fighter (THAC0 12) with a longsword +2, fighting a 9+9 HD dragon with AC 1 (average 81 hp). The chance of hitting is 12, or 60%. The average damage for a +2 longsword is 6.5. The average damage per round is 3.9. Thus an 8th level fighter whaling away at the dragon will finally triumph after 21 rounds. However, the reverse (let's say the dragon does 1-8/1-8/1-10 damage per round, or 4.5/4.5/5.5, which is to say an expectation of 2.25/2.25/2.75 [7.25 hp] damage per round assuming the fighter's AC is -1) will likely mean that the fighter won't last quite as long.

My maths here may well be incorrect (it isn't my strong suit, and you'll notice I didn't calculate extra attacks for the 8th level fighter, frankly because I'm lazy) but you get the point, which is that it's useful for a DM to have a basic idea of this sort of thing when planning encounters and so forth. Nassim Taleb, ladies and gents. Read him.