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.


  1. That's three people in three different fields who've recommended Taleb in the last week. I wonder what he'd have to say about that...

    I have nothing other than ungenerous (and largely irrelevant) carping to add to your mathematical outcome analysis, so I won't comment.

  2. Speaking as a lawyer he's more or less completely irrelevant in my field, but I think he should be required reading for all academics and for anybody who's generally interested in empiricism and how the world works (as opposed to theory, which is mostly bullshit in any field).

    I like to think I "discovered" him, because I was reading him before his new found fame, or infamy, or whatever you want to call it.

  3. If you ever read the WoTC DnD site (at least in the 3.5 era), it's FULL of shit like that--about monster design and survival probability math--written for DMs. You can kinda see where the combat-crunchiness of 4e came from.

  4. I agree with the poster before me. I've played a lot of D&D 3.5 and the emphasis on balance has paid off. If a DM follows the guidelines for awarding treasure, xp and in selecting the type of monsters the PCs fight, well, everything works out in a fairly predictable manner.

    I hate predictability, though, so I like to mix things up when it comes to CRs and treasure awards.

    DMs from older editions of the game really need to finesse things a bit. You never know when a rather inane encounter might turn lethal!

    But where there's risk, there's drama. ;)

  5. Ha! Did you ever see the joint interview he and Mandelbrot gave together about the underlying causes of the planetary economic pile up? It was great!
    The interviewer kept prodding them to say some thing positive and reasuring, and they just got grimmer and grimmer.
    The math has no pity.

  6. Zak: If at all possible I always try to steer clear of the WotC DND site, so no, I've not seen that stuff. I might take a gander if I'm feeling brave or stupid enough one day.

    Christian: This is why I love older editions. A certain amount of predictability is geared into any system, even any random system within defined parameters, but with older editions it's mitigated a lot more.

    E. G. Palmer: I didn't, though I can imagine. I might see if I can find it on youtube.

  7. I've mucho math skills, but I try not to use them overly much in gaming.

    Generally, I use them more as a player...say, for eyeballing my odds of survival in a combat encounter.

    As a DM I absolutely LOATHE to use math as a method of balancing encounters. I prefer to design things...oh, I hate to say "more organic," but more towards an eye of the "what makes sense in a fantasy world + what would be fun in a game" sort of way.

    Sometimes, this results in wildly unbalanced scenarios, however it then opens the door for player creativity (necessity being the mother of invention and all).

    Mainly though, I've found that the random dice roll can and does upset any type of predictability. Given long enough stretches of time with plenty of dice rolls, the "law of averages" just never seems to come through at the RPG table.

    Chaos Theory MIGHT be more appropriate to look at (though *I* haven't).

  8. Sounds familiar :)