Like Most GMs, you probably find your self wondering from time to time just how competent your players are. Are they the well oiled, expertly min-maxed team they claim to be, or are they a bunch of bumbling monkeys? Luckily there’s a simple mathematically accurate method to test their claims based on simple linear algebra:

Start with your dungeon map. Here’s a sample randomly generated dungeon from Donjon RPG tools:

Once you have your map you’ll have to decide where the entrance is, which room is the goal room, and then mark up each room on the map with the probabilities the PCs would randomly move from each room to another. Use your best judgment for this. In this example, I assume that PCs have twice the chance to utilize an obvious exit over a locked, portcullised, or secret exit.

Once this quick and easy process is finished, the data needs to be input into a matrix. The matrix should have a row AND a column for each room. The entrance room should be the first row/column and the goal room should be last. Each row should contain the probabilities mapped out in the previous step. For example, if a party in room 12 has probability 1/2 to travel to room 4, 1/5 to travel to room 10, and 3/10 to travel back to room 12 itself (in this case because two of the possible exits from the room lead to obstructed paths that the PCs may not overcome) then the 12th row would have the following values: 0 0 0 1/2 0 0 0 0 1/5 0 3/10 0 0 0 0. Regardless of probabilities mapped out in the previous step, the goal room should have a row of zeros with a single 1 in it’s own column. This represents the fact that once the PCs have achieved this room that they’re done.

Of particular interest is the highlighted sub-matrix which excludes the row and column from the goal room. This sub-matrix is denoted Q, and is the portion of our matrix on which we’ll actually be performing matrix algebra.

Speaking of which, we’re now going to want to calculate (I-Q)^-1 * R where I is a standard identity matrix of the appropriate dimensions, ^-1 indicates and inverse matrix function, and R is a standing vector of 1s of appropriate dimension. If you need help with that, head over to http://www.bluebit.gr/matrix-calculator/ which is an excellent web-based matrix calculator.

You’ll first want to select their Matrix Addition/Subtraction tool and insert your identity matrix into in the input box for matrix A (an identity matrix is a matrix of all 0s, except for the elements on the diagonal, which are 1s. In this case you want it to have the same number of rows and columns as your Q matrix) and your Q matrix into the input box for matrix B.

After you click the “Subtract A-B” button, you’ll get a results page where you can verify your two matrices and see the result of your operation. Select and copy the output matrix, which is (I-Q) then go back to the matrix calculator.

Once there, you’ll want to select the “Matrix Inverse” checkbox and paste your (I-Q) matrix into the input box and click “calculate”. That will take you to a results page where you can select and copy your inverted matrix (I-Q)^-1 then return to the matrix calculator for a final step.

Finally, select the “Matrix Multiplication” tool and paste your (I-Q)^-1 matrix into the input box for matrix A. For Matrix B, enter a single column of 1s with the same number of rows as your (I-Q)^-1 matrix. Then click the “Multiply A*B” button.

This will result in an output matrix that’s a standing vector with a single column and the same number of rows as your B matrix, but you’re only interested in the very first element in this matrix (which is why we re-arranged the rows and columns of our original matrix to put your entrance room in the first row/column. For our example, this number is 54.349.

So what is that number? That’s the average number of (non-unique) rooms a party will travel through before finding the goal room **if they travel completely randomly through the dungeon**. The larger and more complex the dungeon, and the more difficult optimal paths are to take, the larger this number will grow. Of course, this number assumes totally random movement so it assumes a certain amount of stupidity on the part of your players. In room 14 of our dungeon for example, we see the party has a 60% chance to exit via the closet door in the north wall and then return (the other doors are either locked or the door in which they came) but the random movement doesn’t assume that once they’ve tried that door they won’t try it a few more times just to be sure. In fact, with a 60% probability attached to it, they probably do try it a few times. Of course, we’ve all seen our players do the exact same thing, so it’s probably not so bad a model after all.

With a quick glance at your map, you can also see the minimum number of rooms the party will have to travel through to reach the goal room. In our example, this is 4.

Using these two numbers as guidelines, you can easily gauge your player’s performance through your dungeon. If they can’t beat the average completely random number of rooms, they’re actually doing WORSE than if they simply rolled dice to decide what to do. If they do better than the optimal number, they’re bloody cheaters, but it’s the numbers in the middle that are the most interesting.

16 Comments To "Just how competent are your players?"

#1 CommentByNoumenonOn April 1, 2012 @ 6:01 am“we’re now going to want to calculate (I-Q)^-1 * R”… this is where I started to grin.

#2 CommentByChaosmarineOn April 1, 2012 @ 6:13 amAlthough I like the idea of a gauge, I do press back on the “stupid player” formula as there I a critical variable missing. If players worked in a vacuum and were self driven through a dungeon crawl this would be a better representation. Other elements are how the GM presents the stimuli, architecture (and if you have a gm who likes to really do the colourful descriptions!) and where important elements physically are in a room. These are difficult to interpret into probability. Spending a few minutes investigating cave drawings or an old painting can lead them in unexpected directions.

Interesting post though! Thanks!

#3 CommentBydanrothOn April 1, 2012 @ 8:26 amooo! A scary bear!

#4 CommentBySherbnizOn April 1, 2012 @ 10:30 amI just tried this on my players, and they performed outstandingly poor.

I suppose I must mark down my experiment to teach Dungeons & Dragons to genetically modified salmon as an utter failure…

Oh well, nothing else to do than to keep going!

#5 CommentByMatthew J. NeagleyOn April 1, 2012 @ 10:41 am@Sherbniz – Hey! don’t give up! If you run them through the same dungeon repeatedly and their score improves over time, you’ve proven learning, which is better than regular salmon!

#6 CommentBySherbnizOn April 1, 2012 @ 1:59 pm@Matthew J. Neagley – You’ve given me the motivation to try again, but all the improvement their tiny, modified fish brains can achieve is ultimately thwarted during the final battle… in no small part due to their deep-rooted, inborn fear of scary bears.

Still their are quivering in their tanks…

#7 CommentByKitchen WolfOn April 1, 2012 @ 3:28 pmThis is *really* awful. A whole lot of gratuitous math to pretend you’re being rational so that you can taunt your group about being “suboptimal”. Not only that, we handwaved the difficult exits – D&D at least has a pretty cut and dried chance for the party to find them. Adding to that that taking the shortest route to the cheese isn’t always optimal (there’s usually “powerups” of some variety amongst the lesser encounters, or even a game-winning MacGuffin), and this is simply an exercise in futility.

#8 CommentByNoumenonOn April 1, 2012 @ 3:33 pmMaybe I was wrong to have taken this as an April Fool’s post… or at least alone.

#9 CommentByKurt “Telas” SchneiderOn April 1, 2012 @ 8:19 pmMy group did far worse than the upper limit, but they convinced themselves that there was something they had missed in this article, er dungeon.

#10 CommentByPatrick BensonOn April 1, 2012 @ 8:26 pmDoes this approach work with games other than D&D? What if my game does not rely on a dungeon crawl type setup? Just curious as I am planning my Star Trek game, and I was thinking that I could include this as part of the game during a Vulcan logic training exercise, but while the players think of it as part of the game I would actually be gaining great insight into whether or not I should be gaming with them at all.

#11 CommentBygriffon8On April 1, 2012 @ 8:28 pmPretty good article for today’s date. Good job.

The actually valuable thing in this article was the link to Donjon; hadn’t seen that before. Thanks.

#12 CommentBydrowOn April 1, 2012 @ 11:16 pmholy crap, that’s awesome. i could probably build those matrix calculations into the generator…

😀

#13 CommentByMatthew J. NeagleyOn April 2, 2012 @ 7:40 am@Kitchen Wolf – Don’t forget, you can also taunt your players if they can’t check your math and find the places you “rounded creatively” to make them look even worse!

@Kurt “Telas” Schneider – You can adjust the scores by multiplying by your group’s “ADD score” ie: how often they get side tracked by nothing and run around in circles. See the closet example above.

@Patrick Benson – The technique is system neutral and works in all kinds of challenges! I would map your Vulcan Logic puzzle with each logical step the players have to make as a “room” and then your matrix will be filled by your estimated probabilities that they make each logical deduction given the step they’re on.

@griffon8 – Yes! Donjon is pure magic and I link them all the time, which means if you haven’t seen them before, you haven’t been reading my articles… Wait… I know a joke when I see one. :p

@drow – You really should! I mean, this is going to catch on like wildfire!

#14 CommentByMatthew J. NeagleyOn April 2, 2012 @ 10:01 amP.S. in case you’ve come here weeks later, this was a joke post (check the date). The technique covered is actually a real technique but you’d never want to use it like this. It’s a lot of work for numbers that obviously don’t translate well to the gaming table.

So thanks everyone for commenting, playing along and being good sports! As usual, everyone kept it classy.

#15 CommentBykirkdentOn April 2, 2012 @ 2:40 pmThis ties in wonderfully with your New Year’s pledge to provide more crunch, less fluff. Actually, this goes beyond just crunch; this is Grape-Nuts-break-your-teeth crunch. Awesome.

#16 CommentByMonsterMikeOn April 3, 2012 @ 8:36 amLove it! I was thinking “I get that this is an April Fool’s gag, but they’re actually getting the math right. Cool!”

Of course, if you split the party, you can reach the objective more quickly.