Wednesday, January 13, 2021

Simplifying Xanadu's clock "puzzle" using discrete Markov chain analysis

I recently picked up the Old-School Essentials adventure Xanadu by Vasili Kaliman, which garnered the coveted rating of "The Best" from Bryce at tenfootpole, as well as a favorable review from Ben over at Questing Beast. I haven't read it 100% through, but having skimmed it I tend to agree with them that it's a pretty great addition to the stable of R-rated "weird fantasy" adventures for Old School D&D. It features some freaky body horror stuff, a fun nightmarish take on the Tooth Fairy, and tons of treasure for intrepid adventurers to recover (if they survive). I probably would be cautious about throwing it into a long-term OSE campaign due to its lethality and a few "gotcha" moments, but it's a slam dunk for a one-shot with a group that will enjoy that sort of thing. Very fun pixel art-styled interior art, too.

Enough of that, though. This post isn't a review; the two reviewers I linked above are some of the best in the business, so go ahead and check their reviews out if you want to read more about the adventure overall. Nope, this post is... a math problem. Because I'm a mad lad who's been away from work for too long and needs to solve some equations to truly feel alive.

The puzzle that wasn't

Near the end of his review, Ben mentions one of his minor gripes with the adventure is that one of the marquee puzzles of the dungeon (required in order to escape the dungeon, so all groups will have to interact with it at some point) isn't so much a puzzle as a "randomized flowchart" where the players have essentially zero control over whether or not they succeed in solving the puzzle. 

This puzzle consists of the aforementioned flowchart (pictured below), along with instructions that when a player character attempts to solve the puzzle, they should repeatedly roll a d10, moving from node to node until they reach the "Start", "Uh Oh!", or "Solved" nodes. There are some additional caveats - each full attempt risks wandering monsters, bad things will happen if you hit "Uh Oh!", etc. - but that's the long and short of it. Ben concludes his critique by pointing out that there "really is just a statistical chance that you will end up here or here... so why not just... make them roll a die to see if they end up here or here?"

Xanadu clock puzzle (p. 31)
Xanadu's clock puzzle

Ben is, of course, completely correct here. The clock puzzle isn't really a puzzle, and the flowchart is functionally completely unnecessary - it's just a bunch of repeated die rolls to eventually land on "good thing", "bad thing", or "try again". With any given attempt, there really is just a statistical chance that you will end up at any given end state of the flowchart. The whole thing could be replaced by a table with 3 entries and a probability for each of the 3 possible results. Well... why not?

Today I'd like to answer the question Ben didn't ask: what actually is the statistical chance that on any given try, you will end up at any given end state of the Xanadu clock puzzle?

Quick note: the rest of the blog post is a bunch of math, albeit (hopefully) presented in a format most folks can more or less follow along with. It's worth noting though that the analytical method I present here isn't just useful for this Xanadu problem - it applies to most any "random flowchart" problem in any arena. That said, if you don't care about the math, scroll to the very bottom of the post for the TL;DR answer.

Markov-ifying Xanadu's clock puzzle

If you've dealt much with probability and/or random processes, you might have recognized (probably faster than I did) that the Xanadu clock puzzle is a textbook example of a discrete Markov chain. For anyone who's not familiar with the term, a discrete Markov chain is a mathematical model for describing a system that:

  • Has a set number of possible states
  • Transitions from the current state to the next state at regular intervals
  • Only cares about what the current state is when deciding what the next state will be - the history is irrelevant, the only thing that matters is the current state

That's about it, for our purposes*. And indeed, our flowchart above is literally just a discrete Markov chain. There are a bunch of nodes, or states... each state (with the exception of the end states) transitions to another state with a set probability... and the state you go to next is entirely dependent on whatever state you're currently in. Let's make this a bit clearer - I'm going to rewrite the flowchart, but this time numbering the states and replacing the die ranges with probabilities (expressed as decimals rather than percentages).

Xanadu's clock puzzle, Markov-ified

Quick aside... before we go further, I'd like to answer a question I'm sure at least half of you are asking: "why bother with this? Even if you really want to know the answer you can just write a simulation to run 10,000 trials and figure it out." The answer is that math is cool and I think this is a lot more fun than brute-forcing it. As you'll see below, we can calculate an exact answer to the question posed. We don't need to run 10,000 simulations to be sure we have the right answer, we can just get the exact answer. How cool is that? This method is also much less time-consuming... at least if you're not also writing up a detailed explanation of how to do it.

Alright, back to the math. The observant reader will notice 3 major differences between the original flowchart and my Markov-ification of it above.

  1. I split the "Start" node into two states. This is because when first starting the puzzle, you can transition from that "Start" node to states 2, 3, or 4 - but if you return to the "Start" node after that you don't just continue the flowchart, you have failed to solve the puzzle this attempt and the Referee gets to roll for wandering monsters before you can try again. Functionally, the "Start" node actually hides two different states - the actual start state and the "try again" end state.
  2. I drew additional loopy arrows from each of the three end states (also known in the lingo as "absorbing" states) back to themselves, with probabilities of 1 (aka 100%). This is basically just a visual representation of the fact that they are terminal states that effectively end the chain. To be a valid Markov chain, every state has to have all the arrows leaving it add up to 1, so adding these loopy arrows satisfies that requirement.
  3. The original flowchart has the "8" d10 result listed twice going out of state 6, once going up to state 3 and once going down to state 9 (aka "Uh Oh!"). I asked the author on DTRPG and he confirmed that this is a typo. I chose to resolve this typo in the "nicer" way, changing the die range for the transition from state 6 to state 9 from 8-0 to 9-0, aka a probability of 20% instead of 30% - and fortunately, that's what the author did as well, so I don't have to redo this whole post to match v3.1 of the adventure. Success.

The next step in Markov-ifying our state machine is to represent it in matrix form. Matrices are the building blocks of linear algebra, and they're amazing for solving a whole range of mathematical problems, especially those that involve multiplying specific sets of numbers in very specific ways. That's a woefully inadequate summary, but I'll leave the detailed further reading to anyone who's interested and for now will move on with the problem.

Turning this flowchart into a matrix is pretty easy. Each current state gets a row, each future state gets a column, making a square matrix. The value of any given element is the probability that the state in the given row will transition to the state of the given column. This is called the "transition matrix", and it is a complete mathematical representation of the Markov chain (aka it contains all the info contained in the flowchart).

Clock puzzle Markov transition matrix P

This probably just looks at first glance like a bunch of random numbers, so take a second to compare the matrix to the flowchart and see how we constructed it. Note that the (1,1) entry is 0, because state 1 cannot transition directly to state 1. The (1,2) entry is 0.3, because there is a 30% chance state 1 will transition to state 2. The (3,4) entry is 0.1, because there is a 10% change state 3 will transition to state 4... and so on.

OK. For those of you who have held on this long... here's the super cool part and the reason Markov chains are amazing. If we want to know the probability of being in any given state after N cycles (rolls), all we have to do is multiply the matrix by itself that many times (aka raise it to the Nth power). That's it. Then just look at whatever row corresponds to your starting position (in our case, the 1st row since we always start in state 1) and the column entries give you the probabilities that given that starting position, and after N cycles, you are now in the state corresponding to that column.

Here's an example. Say we want to know where we're likely to be after rolling the d10 5 times. All we have to do is first raise the matrix to the 5th power... (many programming languages and graphing calculators will do matrix math, you can also use one of the myriad of free calculators available online) 

EDIT: Microsoft Excel/Google Sheets will also do matrix multiplication and inversion, though you need to make a custom function for exponentiation.

Clock puzzle probabilities after 5 cycles

Now we look at the first row (since we started in state 1), and we see that after 5 die rolls we have a 46.9% probability of having looped back to the start (column 8), a 17.9% probability of having hit "Uh Oh!" (column 9), a 9.3% probability of having solved the puzzle (column 10), and that the rest of the remaining probability is spread out among the other nodes (aka we are somewhere in the blue nodes and are still rolling after making 5 d10 rolls).

Solving the problem (good enough)

Alright! We can now solve our initial problem, which was to answer the question "what is the probability that any given solution attempt will result in any of the three given end states?" Since we know that after enough cycles we must eventually end up in one of the three absorbing states (note that this isn't true for all Markov chains, but it is true for this particular Markov chain), we could just raise the matrix to some arbitrarily high power (aka until the probabilities of the non-absorbing states go to 0) and check the probability of each absorbing state. Aaaand.... yeah, that would work. It'd work just fine. Let's go ahead and do that.

Clock puzzle probabilities after 100 cycles

And there we have it. Looking at the 1st row of this matrix (because we always start in state 1), we see that on any given attempt there is a 60.8% probability of looping back to the start, a 25.8% probability of having to roll on the "Uh Oh!" table, and a 13.4% probability of solving the puzzle. In fact, if you are running this adventure and don't think your table would enjoy rolling a d10 over and over again until you spit out a random answer, you can replace the flowchart with a table containing the above probabilities (or an approximation using a d8, see the final section of the post) and get pretty much the exact same results with much less rolling.

Hold on though... I promised you an exact solution, with no need to do a large enough number of trials or whatnot. Haven't I just come up with a method that still requires some trial and error to see when you've gotten a "high enough" power? Well... yes. That's true. Funny story though... it turns out that for an absorbing Markov chain like this there is actually a way to go straight to the exact solution, no multiple tries or high power iteration needed. It's slightly more involved, but still pretty easy. Let's dive in.

Solving the problem (exact solution) 

In the interest of brevity (ha), in this section I'm going to more or less go straight through the solution steps without much explanation. For those interested in the details, the wikipedia article on absorbing Markov chains is a pretty decent high-level overview that basically just has the formulas, and this probability book chapter from Dartmouth gives a awesome undergrad-level detailed treatment of the entire subject of Markov chains (absorbing chain stuff starts on page 12 of the PDF).

Alright. Here we go... the first step in finding the exact solution is to make sure the Markov chain is constructed such that all of the absorbing states have the highest numbers, thus arranging our transition matrix so there are 0's in the bottom left quadrant, diagonal 1's in the bottom right quadrant, and some other stuff in the top two quadrants. Note that the quadrants aren't necessarily of equal size, just depends how many absorbing states there are. Fortunately, I knew this was coming so I numbered the states that way from the start, no re-arranging needed. Success! I'll repeat the transition matrix below, this time drawing little dotted lines to show the quadrants and with an additional term showing the names of the quadrants.

Clock puzzle Markov transition matrix P with quadrants shown 

The next step is to calculate something the called "fundamental matrix" for this absorbing Markov chain. Take the top left quadrant, also known as Q, and subtract it from a diagonal 1 matrix of the same size (also called an identity matrix because anything you multiply by it ends up the same - like multiplying by 1).

Step 1 of calculating fundamental matrix N

Now we take the inverse of the matrix above. The inverse A^-1 of any given matrix A is the matrix that yields an identity matrix (diagonal 1's) when you multiply the two together. Actually finding this inverse by hand can be quite tricky, so back to the calculators and... bam. We now have the fundamental matrix, also known as N, for this Markov chain.

Fundamental matrix N for this Markov chain

For a host of interesting reasons that you can read about in the Dartmouth paper, we can do some incredibly cool stuff with this matrix. For starters... what does this matrix even represent on its own? Well, each row still represents the starting state, and as it turns out, any given column entry is the expected (average) number of times you will visit the state given by that column number before being absorbed. So entry (1,4) tells us that if you start in state 1 (aka the "Start" node), you will on average visit node 4 0.525 times (aka roughly once every other try). Looking at the top row as a whole, we can see that most of the states are visited roughly once every other try, but that the start node and node 3 (aka the one in the middle) are visited roughly once every try. That makes sense given that node 3 is smack dab in the middle and that, well, we always start on node 1.

That's sort of interesting, maybe... but it's not what we wanted. We wanted the exact solution for the probability of ending up in any given absorbing state, and the absorbing states aren't even in this matrix! Right you are. Let's get that answer right quick. Easy. All we have to do is multiply the fundamental matrix N by the top right quadrant of the original matrix, also known as R, which yields an absorption probability matrix B.

Absorption probability matrix B

Same as always, the row indicates the starting state, so we'll look at row 1 here. The columns are the absorbing states only, which are in the same order as before. Hmm, well whaddaya know? This confirms that indeed, any given attempt has a 60.8% probability of looping back to the start, a 25.8% probability of having to roll on the "Uh Oh!" table, and a 13.4% probability of solving the puzzle - a nice double check for our earlier "good enough" answer. Math is great, yeah?

Last thing before we go... how long, exactly, does it take to solve the clock puzzle? Obviously there will be a lot of variance, but can we get an idea of the average number of rolls? Of course we can. The expected (average) number of steps (die rolls) needed to reach an absorbing state, given a certain starting state, is given by the row of the vector t that results from multiplying the fundamental matrix N by a vertical column of 1's, as seen below. Note that multiplying by a vertical column of 1's is the same thing as just adding together all the entries of each row, which makes sense because each entry is the expected (average) number of times you'll visit any given state before being absorbed - so of course the average number of total steps would just be the sum of those individual visits.

Expected # of steps vector t

And there we have it. On average, any given attempt takes 4.51 die rolls to reach an end state (though there is definitely very high variance here - a successful escape will almost certainly take more rolls than the typical attempt which ends in a return to the start). Since the probability of solving the puzzle on any given try is 13.4%, that means our expected number of tries is 1/.134 = 7.46 and that any given group will roll their d10, on average, 7.46*4.51 = 33.6 times trying to escape this dungeon.

Markov chains, huh... what are they good for? 

Alrighty. So what was the point of all this, beyond figuring out how to simplify a somewhat lame "puzzle" that's a fairly small part of an otherwise pretty awesome adventure as a flimsy excuse to give a math lesson on an RPG blog? There are a few reasons why I think this was a worthwhile endeavor:

Markov chains are everywhere

Markov chains, if you know where to look, show up fairly often in RPG products. Off the top of my head there's hex flowers, the innovation track progressions from Magical Industrial Revolution, and of course any sort of "random flowchart" system for randomly navigating between points in a chaotic landscape such as in Silent Titans or Xanadu. If it involves randomly determined travel between a predetermined set of nodes or states, it's a Markov chain.

With that in mind, I think having a bit of knowledge about how Markov chains work and how to do some basic analysis of them can aid any RPG designer who's implementing such a structure in their product. Mathematical literacy is an important tool in the RPG designer's toolbox. Granted, Markov chain analysis isn't quite as important as knowing (for example) that 1d20 gives you a flat distribution and 3d6 gives you a bell curve... but it's in that same ballpark, in the sense that you absolutely can do good RPG design without knowing it, but knowing it will almost certainly make anything you design better.

I don't know if Vasili Kaliman is 100% aware of the overall probabilities his flowchart results in, or if he just tuned it more by trial and error. Either way, I'd like to equip any future flowchart-makers with the tools to quickly and easily tune these sorts of mechanics without needing to do a ton of trial and error that will almost certainly not give you a great sense of how the chain will actually play (due to the small sample size). Instead, just change a few entries in your P matrix, recalculate, and you have your new probabilities - you can spend your playtesting time on something more important instead. 

I hope I've shown, too, that despite not being a topic commonly taught (I'm an engineer and I didn't even see them til an elective course in grad school), Markov chains aren't actually that difficult to analyze. While there's a lot of matrices and numbers above, everything I did ultimately just boils down to making a flowchart, moving numbers from that flowchart into a matrix, and plugging that matrix into a calculator. I didn't do any arithmetic in the "background" of this post other than the (I - Q) bit (which was subtraction), everything else was just plug 'n play.

It's fun to solve problems

As previously mentioned, I find solving this sort of problem fun. When I saw Ben comment in his review that there should just be a single die roll to determine which end state they end up at, I not only agreed with him, but was fairly confident I remembered a way to rigorously determine the exact die roll that would be equivalent to the flowchart... so... I did. It's always good to stretch the brain now and again, refresh one's memory on techniques and concepts long forgotten. Even better if that knowledge can be shared and potentially used by other people! 

Extra credit

  1. Try solving the Markov chain with a different resolution of the typo in node 6 - perhaps by removing the arrow back to node 3 entirely. How does this change the overall probabilities? Does it make the flowchart "meaner", and if so, by how much?
  2. Try solving the Markov chain assuming that you don't exit the chain when returning to Start, but instead keep going until you hit Uh Oh! or Solved. Can you infer what the new absorption probabilities should be before doing any additional matrix math? How does this affect the expected number of tries? What about the expected number of die rolls? The answer may surprise you.

TL;DR / Summary

The probabilities

In summary... the Xanadu clock "puzzle" flowchart takes, on average, about 4.5 rolls to reach an end state, will require about 7.5 tries to solve, and is equivalent (plus or minus half a percentage point) to a single d100 roll with the results and ranges shown below. If you want to cut all of the "make multiple die rolls before something happens" out, axe the flowchart and use the single roll instead for each attempt. 

Equivalent and approximate probabilities for Xanadu clock puzzle

If/when I run this adventure, I'll probably use the d8 table instead, it's surprisingly close to the base probabilities and having a d100 table with the uneven breakpoints shown above slightly unsettles me.

Improving the Xanadu clock puzzle

Also, one final note - while I've been fairly critical of the Xanadu clock puzzle in this post, that's mainly because as-designed, it really does boil down to a random determination of end state with the intermediate states having zero effect on gameplay (other than taking up more table time with additional rolls). My complaint isn't that it's a Markov chain - rather, it's that it's a Markov chain that doesn't leverage any of the properties of being a Markov chain and that really should just be a random table. 

If, instead, each of the blue nodes had some sort of specific property or effect every time it was visited, the flowchart could be otherwise identical mechanically but add much more flavor. Every die roll would mean something, rather than the players making 5+ die rolls in a row waiting for something to happen. If/when I run this adventure, I might write up an entry for each of the 6 blue nodes - or maybe even 6 separate random tables, one for each node! Project for another day, perhaps.

Thanks for reading! Let me know what you think below. Also don't hesitate to point out if you think I've made an error - I manually entered all of those numbers into the matrices after doing the math, so I absolutely could've mis-entered something (and/or made a fundamental error in the analysis, fingers crossed that isn't the case). 

*For any math teachers/profs in the audience, I apologize for my fairly streamlined way of presenting all of this. I'm sure there's all sorts of caveats I'm leaving out and some ways in which my language is less rigorous than it could be. Feel free to clarify if I got something wrong. :P 

Sunday, December 27, 2020

Chesterton's fence part 2: idiosyncratic gems in B/X D&D

The strangeness of B/X D&D

Yesterday I began a discussion of how G.K. Chesterton's precautionary principle (to paraphrase: "don't tear down a fence until you understand why it is there in the first place") can allow us to run better games and write better house rules while not missing what the systems we run have to offer in their rules-as-written form. Today I'll continue by talking about a few ways in which this applies specifically to old-school D&D.

The RPG I'm currently running, Old School Essentials, is a much better organized but otherwise identical clone of Moldvay and Cook's 1981 Basic/Expert (aka B/X) D&D. It's a great system - considered by many to be the most concise and playable incarnation of D&D ever written*. 

B/X is also extremely idiosyncratic by the standards of newer editions, containing many rules that seem like oddities to someone who has mainly played 5e. To name a few: "Elf" and "Dwarf" are character classes (character racial heritage and vocation/class are combined instead of being picked separately, also called race-as-class), characters earn XP mainly from recovering/stealing treasure rather than combat or completing story objectives, different classes have different XP requirements to level up, and character attributes are determined entirely randomly rather than being picked by the players via point-buy or slotting an array of rolled numbers into the desired stats. 

Those familiar with newer editions of D&D will recognize that precisely none of the rules I name above have survived to 5e (in fact, none of them made it past 3e). Why is that? Were the original designers of Basic D&D just not quite sure what they were doing? Are the newer editions more perfectly evolved games and the older editions relics we can simply discard? Well, no. They're different games. In fairly stark contrast to some systems whose edition changes are more or less "upgrades" (see: Savage Worlds), each edition of D&D is very much its own thing, chasing a very specific sort of play experience. Different groups will prefer different editions, and each version of the rules tends to be good at running different types of campaigns.

In my (anecdotal) experience, few people who play B/X (I here include those who play the myriad of retroclones that are basically B/X with some house rules) play it entirely rules-as-written. Indeed, hacking the game is a favorite practice of the group of people (collectively known as the OSR, for Old-School Revival/Renaissance) who play these games, other "old-school" versions of D&D, and games inspired by them today. There are about as many versions of old-school D&D as there are GMs who run it, and it tends to lend itself very well to changing and hacking and experimentation. None of the rules I mention at the start of this section are sacred cows in the OSR (though XP for treasure comes close), and they are often bent, discarded, or molded to suit the user's taste. 

As someone who moved from 5e to B/X and has come to look at many of the latter's idiosyncrasies with fondness, I'd like to briefly discuss two of these odd rules, and why after understanding what they add to the gameplay experience, I've ultimately decided they're not only worth keeping, but a vital part of what makes the game special.

Race-as-class

As someone whose favorite D&D character has long been the doughty Dwarven Cleric, wielding mace and shield and holy magic, my first reaction to the idea of folding race and class into a single choice was to look at it as a simplifying design choice that may make things easier for new players, but doesn't really make for a better game. And indeed, both the original (pre-Basic) D&D and all editions of Advanced D&D allow players to choose race and class separately (albeit often with more restrictions than the current edition). 

However, on closer examination this mechanic offers more than mere simplicity in character generation. An underappreciated asset of the race-as-class approach is in the way it absolutely weaves archetype and worldbuilding into the core mechanics of the game. The reason you can't be a Dwarven Cleric in B/X rules-as-written is that Dwarfs simply aren't participants in the same organized vaguely-Catholic-with-the-serial-numbers-filed-off religion implied by the Cleric class in D&D. Dwarfs aren't just short bearded Scottish people, they're different, maybe even alien. In the world implied by B/X D&D, it's enough to just say an adventurer is a "Dwarf" or an "Elf". The melding of race and class has significant worldbuilding implications. 

Modern D&D settings almost always imply a cosmopolitan mishmash of a world where everyone is more or less fundamentally human, they just might be humans with pointy ears and a +2 to INT, or short bearded humans with a +2 to CON. Part of this is a chicken-and-the-egg change in the types of fantasy worlds we associate with D&D-type games, but part is certainly mechanically driven. There are no racial class restrictions or level caps in 5e, because as far as the mechanics are concerned, everyone is basically the same aside from bonuses to a few attribute scores.

None of this is to say that if you're running B/X you can't have a cosmopolitan setting. It's quite easy to separate race and class to get that "unrestricted" feel (Basic Fantasy RPG and Old School Essentials:  Advanced Fantasy both do this quite well), and many GMs who run B/X or one of its clones do exactly that. But if you want a setting, perhaps, where maybe the only Assassins are Elves, or maybe Dwarfs are the only people with Clerical powers? It's every bit as easy to just create an "Elven Shadowblade" class or a "Dwarven Stonesinger" class to tack onto the default B/X offerings of (essentially) "Elven Spellblade" and "Dwarven Fighter". You could also take the route I currently take, which is to allow demihuman characters (what B/X calls non-humans) to "multiclass" into human character classes, keeping some of their unique benefits (better saving throws and keener ears, mostly) in exchange for getting a slightly slower start on leveling.

Race-as-class, despite the name, isn't really saying humans are the only fantasy race with any variety in adventuring professions (even though that's true of the setting implied by the core B/X rules). Rather, it's a different way of setting up character creation that is, yes, simpler for new players... but also does significant worldbuilding work for you if you're willing to leverage it. 

XP for treasure

For as long as D&D has existed, players have wanted to gain XP. Throughout the editions, it's always been the main metric judging how they "make progress" in the game, and is thus one of the main incentives the GM has for motivating player behavior. Fundamentally, when designing incentive structures you should incentivize the behaviors you want to see. In the context of a game, you want to see players doing things that match with the theme of the game, so that's what you should incentivize... and here's where we get to B/X being a fundamentally different game than its successors. 

Since 3e (or so), D&D has been a game primarily about fighting monsters. That's what you earn XP for doing, that's how you make progress in the game, so that's what the game is about. At least until 5e where there's a bit of a "or you can just advance whenever the story says" loosey-goosey cop-out offloading that work from the game designers onto the individual GMs... but I digress. B/X is a game about treasure-hunting because that's how players gain XP. It's not like XP actually represents anything specific in the fiction of the game. Diagetically, it hardly makes any more sense for the magic-user to get better at casting spells by stealing a golden statue from a forgotten temple than it does for him to get better at casting spells by killing 100 orcs. 

Realistically simulating how an adventurer improves at their craft has never really been the point of XP as a mechanic (see Gygax's note on p. 85 of the AD&D DMG). The point of XP in D&D has always been to incentivize the behaviors the game is designed around. In new D&D, that's making progress in the story and/or killing monsters. In old-school D&D, that's recovering treasure from dangerous locations by whatever means is most effective - could be violence, could be subterfuge, could be convincing the leader of the goblins that the Great Green Goblin God wishes them to steal the orcs' treasure and bring them to the party, who are of course the emissaries of the GGGG. 

The 5e GM needs to make a special ruling for the players to be rewarded for such a cunning plan - "OK, I guess I'll give you the XP the module would've given you for killing the orc chieftain even though you didn't fight him". The B/X GM (and the B/X players) know that it doesn't matter how the party got the treasure, what matters is that they got it and they will be duly rewarded with the currency the players actually care about (XP, not ingame gold, if that wasn't clear). 

Ultimately, it's pretty easy to turn B/X into a combat-centric game or 5e into a plunder-centric (or anything-centric) game... but I find the starting point of B/X to make for a much more compelling game. XP for treasure does seem odd, at first glance, to the GM coming from a newer edition - but it serves a vital purpose in shaping the play experience.

Idiosyncratic gems

Both of those idiosyncratic rules (and several more besides) could probably (and probably will at some point) fuel a blog post on its own, but for now I'll leave it at this: Almost without fail, whenever I pick up the oddly shaped rock of some strange B/X rule, there's a gem underneath. (pearl? worm? not sure how well this metaphor is working...) Not always, mind you. There are certainly a few design decisions in the game I think are simply wrongheaded. I will never, ever use the "two-handed weapons always lose initiative" rule from B/X, for example. But the vast majority of the time - there's a reason for the fence, and once I see what that reason is I often find myself nodding thoughtfully rather than reaching for the Sawzall.

Of course, I still have my 6+ pages of house rules for B/X. Chesterton's fence need not be left standing forever - simply pondered for a time. :)

In conclusion...

First off, I want to apologize to my high school English teacher (should he read this) for the title of this heading. Won't happen again.

Phew! That was kind of a long one, huh? I don't anticipate most posts being quite this verbose, but I think the meandering took us to some interesting places, at least. While I definitely intend to try to share plenty of more immediately gameable content, I'd also like to put out a series like this now and again - bit more "thinky" and philosophical, still related to RPGs but synthesized with some outside concepts. At least, if people like this sort of thing. Let me know what you think down below!

Further reading on Chesterton's fence: https://fs.blog/2020/03/chestertons-fence/

*For more on the lost "Basic" (as opposed to "Advanced") line of D&D systems, see this rundown. The newer systems most will probably be familiar with - 5e, 4e, 3.5e, etc. - those are all descended from "Advanced" D&D, which ran parallel to the "Basic" version of the game for many years before TSR folded and Wizards of the Coast decided to end the Basic line and rename AD&D simply: D&D.

Saturday, December 26, 2020

Chesterton's fence part 1: RPG house rules and Savage Worlds

Chesterton and his fence

"Chesterton's fence" refers to a principle articulated by the writer G.K. Chesterton, who said in his 1929 work The Thing:

In the matter of reforming things, as distinct from deforming them, there is one plain and simple principle; a principle which will probably be called a paradox. There exists in such a case a certain institution or law; let us say, for the sake of simplicity, a fence or gate erected across a road. The more modern type of reformer goes gaily up to it and says, “I don’t see the use of this; let us clear it away.” To which the more intelligent type of reformer will do well to answer: “If you don’t see the use of it, I certainly won’t let you clear it away. Go away and think. Then, when you can come back and tell me that you do see the use of it, I may allow you to destroy it.

I find this to be an enormously useful concept that applies (at least in part) to almost any arena. By my recollection, I first encountered the principle in music theory class, when the teacher responded to my inquiries about why there were so many rules of composition by saying "you have to know what the rules are before you can know when it's OK to break them." These days, I apply the principle most often in my job as a mechanical engineer, where my first instinct when looking at an underperforming or problematic system is to say "well obviously the designer made a mistake here and we should clearly do X, Y, or Z to fix this obvious deficiency." Sometimes I'm right. Very, very often... I'm wrong - and often spend more time than is necessary digging into the problem, eventually circling around to the same suboptimal (but maybe good enough) solution the original engineer arrived at. This "small c" conservative principle is also often brought up in politics, most often by "large C" Conservative thinkers but (in my humble opinion) also very useful for those who take a more Reform-heavy view... at least if they want to be effective in their reforms.

It's worth noting that the Chesterton's fence principle does not state that one should never make changes. Taken at face value, it doesn't even state that making changes is generally less preferable than leaving things the same. The principle simply states that one should endeavor to understand an existing system, particularly the rationale behind said system, before making changes to it. 

House rules in RPGs

This brings us, dear reader, to the subject of tabletop RPGs and house rules. Yes, I haven't forgotten what this blog is ostensibly about (not yet, at least). Most people who run RPGs (generally I'll just use the generic term Game Master/GM) loooove us some house rules. Arguably, the entire plethora of OSR systems is an outgrowth of the very simple fact that GMs adore bending and tweaking the rules of our games to suit our own preferences.

I am no exception:

  • Within a few months of starting my first campaign (5e D&D's excellent Lost Mines of Phandelver) I had developed a 5 page-long modular ruleset for long-term injuries, replacing 5e's death save system with a d20 x d4 table for wound severity/location, along with accompanying rules for permanent wounds, long-term injuries, and healing. My players quite liked it, so I'd call that a success. 
  • To support the continuation of that campaign in the Savage Worlds system as the characters journeyed to mysterious Hot Springs Island, I wrote several self-contained rules modules - conversion of the HSI monsters and hazards to the Savage Worlds system of course, but also 3-1/2 pages of rules to make Savage Worlds more closely resemble old-school D&D (for use with HSI, an OSR setting), a slot-based encumbrance system to replace the default Savage Worlds encumbrance rules, and a zone-based movement system combining the abstraction of theater-of-the-mind combat with the tactics of miniatures play (that last one wasn't a hit, my players just found it confusing rather than tactical).
  • Lastly, I currently maintain a 6-1/2 page (and counting) collection of house rules for my Old-School Essentials open table campaign, keeping with the time-honored OSR tradition of hacking old-school D&D into exactly the shape I most prefer.

I love me some house rules, is what I'm saying. I'd anticipate, in fact, that a healthy percentage of the posts on this blog will consist precisely of me presenting a specific house rule or set of house rules for a system, then discussing the reasoning behind it. 

But do you know why the fence is there?

Ah yes. As much as we naturally want to bend and tweak our games, Chesterton and his fence offer a valuable counterpoint to those natural GM instincts for excising every aspect of the game we don't like and replacing them with our own homebrewed concoctions. There is absolutely nothing wrong with changing and reforming systems, whether they be high pressure gas distribution networks, governmental policies, or RPG rules... but reformers would do well to understand the systems they purport to improve before diving in. They'll get better results in the end.

Using some examples from my two favorite RPGs, Savage Worlds and Basic/Expert D&D, I'd like to highlight why, in the midst of all our homebrewing and houseruling, we would do well to take a step back and assess the intentions of the fence's builder every now and again.

Tearing down fences in Savage Worlds

If you spend much time on the subreddit for the Savage Worlds generic RPG system, you'll notice an interesting trend. With astonishing regularity, newcomers to the system will post questions that go something like "I'm reading through Savage Worlds, and while I think the system looks really interesting, I was thinking about replacing the wound system with hit points / removing exploding damage / eliminating the Shaken status effect / giving everyone a Wild Die / decoupling Skills from Attributes. Thoughts?"

Anyone familiar with Savage Worlds will recognize that most of these changes would fundamentally alter the core gameplay experience of the system. It's not that they can't be made - just that making them willy-nilly without understanding the implications has the potential to greatly change the feel of the system, often not for the better. And, indeed, the vast majority of the replies to questions like this are some variation on "don't." or "try playing the system rules-as-written before you change it." Inevitably we then see the proverbial backlash to the backlash as others retort "stop telling people they're playing the game wrong" or "way to discourage a new player by gatekeeping."

Is this gatekeeping? I would argue no. Savage Worlds is a weird system. The best adjective I can use to describe it is "cinematic," but that's fairly imperfect as it conjures up images of narrative-first games such as Powered by the Apocalypse, when Savage Worlds is really an interesting blend of traditional, narrative, and unique RPG ideas. It's very much "its own thing", and the system creates a really fun play experience at the table. Note: the key phrase there is "at the table", because there are a lot of rules in Savage Worlds that just seem weird at first glance:

"Wait, you're telling me all damage rolls explode (roll again and add if you roll the highest value on a die, repeat as many times as that happens)? Doesn't that mean a mighty hero could be instantly killed by the smallest goblin even if he's at full health? That's dumb; I like the system overall but I think I'm gonna take that rule out when I run it."

Savage Worlds is full of these kinds of rules - they sound quite strange at first glance, and a novice to the system (particularly one coming from other, dissimilar RPG systems) might think the game would be better off without them. What our imaginary novice GM above doesn't realize, though, is that although exploding damage means a mighty hero could theoretically be instantly killed by the smallest goblin, players can spend Bennies (a metacurrency in Savage Worlds) to "soak" incoming damage before it happens. Additionally, taking too many Wounds will Incapacitate you but won't kill you unless you critically fail a Vigor roll (read: snake eyes on 2d6). Also, due to the way Toughness and Damage interact in the threshold-based (rather than attrition-based) wound system of the game, certain extra-tough baddies would never be damageable without exploding damage dice. Removing exploding damage from the game without addressing all the other mechanics that depend on and feed from it will result in some things simply not working.

The novice Savage Worlds GM who just starts taking down fences, drastically modifying the system without understanding it, will end up running a game where many of the underlying systems are fundamentally broken. They probably won't enjoy the experience very much, and will conclude (incorrectly) that the game just isn't all that fun. This isn't to say people shouldn't modify the rules - not at all. But the oft-given advice to "try the game rules-as-written before changing it" is, far from being an exclusionary mantra, a vital piece of advice for anyone looking to see what really makes Savage Worlds fun. There's just something about Savage Worlds that comes alive at the table, that creates a unique experience hard to conceptualize just reading the rulebook.

To be continued...

I originally intended to roll right ahead into a discussion of some of the unexpected gems to be found in the more idiosyncratic rules of Moldvay and Cook's 1981 Basic/Expert (aka B/X) D&D, and how the principle of Chesterton's fence can help us not to prematurely discard that which we don't understand, thus missing its value... but this post is already edging towards 10 minute reading time territory, and I'd prefer that anyone checking this blog out for the first time doesn't immediately run into a novella, so I will see you all tomorrow for part 2. Thanks for reading!

Friday, December 25, 2020

Merry Christmas, have some injury rules for 5e!

Whatever today is for you - a celebration of the birth of the Messiah, a cultural holiday centered around family/food/gift-giving, or just a day off work - I wish you a Merry Christmas.

Here's a stocking stuffer for ya... an alternate set of rules for adjudicating death, dying, and permanent injuries in 5e D&D. These are often called "death and dismemberment" rules by dint of the fact that they add some gray area to the binary alive/dead dichotomy of D&D's default system of hit points. Do you want the characters in your game to end up as old, grizzled adventurers with eye patches, hook hands, old head wounds leading them to occasional fits of berserker rage, or premature retirement after one too many arrows to the knee?* Try these out and let me know how it goes! 

Click on picture for PDF link

There are many versions of these types of rules floating around the internet; this is my take on the concept. In this ruleset, instead of making death saving throws upon dropping to 0 hit points a character rolls 1d20 for wound severity and 1d4 for location. Possible results range from instant death, to loss of limb, to temporary wounds, to an adrenaline surge restoring the character's hit points and bolstering their spirit. I also include rules for healing from temporary injuries, with or without the aid of curative magic. They're fully compatible with (and written for) 5e, but many of the concepts could be easily lifted into your system of choice (probably vastly simplified if you're running a lighter system like B/X).

My wife's Paladin, the first player character to die during my career as a GM (yep, she was a Dwarf), went out in a blaze of glory thanks to this ruleset, and she wasn't even (all that) mad. The probabilities in the wound table are tuned to give relatively equal weight to death/permanent damage, temporary wounds, or no lasting damage when reaching 0 hit points - but it would be fairly easy to tune them to adjust lethality to your taste.

As the PDF says, my rules (particularly the table layout) are heavily inspired by Lloyd Neill's One Death & Dismemberment Table to Rule them All. He also has an entire series of blog posts gathering and discussing many versions of these rules from around the internet; highly recommended if you enjoy reading alternative versions of house rules and the like.

Quick warning/disclaimer, these rules do involve some talk of, well - dismemberment and head wounds and such. I think it's all relatively PG-13 (and there are no illustrations), but do be aware, dear reader. 

Coming up this weekend... a discussion on the nature of house rules, and why we can sometimes benefit from taking a little time to ponder the wherefore of fences.

*I know, I'm sorry...

Thursday, December 24, 2020

Welcome to "The Dwarf Died Again," a blog about old-school D&D (among other things).

Howdy! I'm Matt. I enjoy playing, talking about, and pondering tabletop RPGs - mainly old-school D&D and Savage Worlds these days, though I enjoy a lot of different games.

A few weeks ago I realized that between all the various places I discuss RPG theory and design (mostly Reddit and Discord these days), I probably string enough thoughts together and write more than enough words to fill a blog post every few weeks. I know I'm getting to the whole "start a blog about old-school D&D" thing a decade or so late by some estimations, but hey - the game I'm currently running turns 40 years old in a few weeks, so who's to say we won't still be playing it decades hence? I may not have been a participant in the halcyon days of Google+, but at least for the foreseeable future I hope to add Blogger to the list of places I talk to people about RPGs in my spare time (at least until our mighty tech overlords - may their code always be kind and merciful - shut that down too).

A few years ago when I was transitioning from "guy who grew up on 2e AD&D via the Baldur's Gate games but never played in person, then bought the 5e Starter Set in college but never touched it" to "guy who's starting a D&D group and trying to learn how to GM after getting into The Adventure Zone", how-to-GM blogs like The Angry GM and Sly Flourish were absolutely invaluable. As I started broadening my horizons beyond D&D 5e and learning about the history of the game, I found blogs such as DMDavid and B/X Blackrazor to be great and interesting reading. And as I spent way too much time thinking about the intricacies of design, the nature of the game, and (especially) how to tweak the game to my liking, I'd turn to Bastionland, Ten Foot Polemic, Coins and Scrolls, LLBlumire, Necropraxis, Methods & MadnessZadmar, and many, many others for ideas.

RPG blogs are great, is what I'm saying. The RPG blogosphere (do people still use that word?) is a vibrant network of folks sharing ideas, musings, and stories. Said network has magnified my own enjoyment of this hobby by at least a factor of 2. It's for that reason the first thing I did when setting up this blog was populate my blogroll over there to the right. Seeing an interesting post title on a sidebar while perusing a favorite blog, clicking on it, and discovering an entirely new perspective is a unique joy of consuming content in this medium.

I'd love it if even a few of my musings in this space help someone run their game better, learn something, or just spend an enjoyable lunch break reading about something interesting before getting back to work. I can't say at this point how often I'll post; I imagine it'll probably vary quite a bit as my workload (both at work proper and of the more family-oriented variety) does. I have roughly 10 titles  sitting in my "posts" box at the moment just waiting for elaboration, so I've no shortage of ideas at least.

In any case, that's it for now! Thanks for reading, and I hope you get something useful from the thoughts and musings to come!

But what about the name?

Oh, that? From my first campaign running 5e's "Lost Mines of Phandelver" to my current campaign running "Stonehell" in B/X, the bulk of player character deaths have been Dwarfs*. Don't ask me why, they're generally the most survivable characters by the numbers, it just... happens.

* Dwarfs or Dwarves? I think it depends on how much you like Warhammer. Feel free to weigh in though: https://www.strawpoll.me/42338698