Let Your Players Lead The Way

I’ve been GMing/DMing/facilitating1 roleplaying games for nearby 30 years, but I only recently began to feel like I was getting to be good at it.

The secret skill that was hardest for me to learn? A willingness to surrender control to the players.

Icons representing Karma (an arrow splitting into three choices), Drama (arrows converging into a single route), and Fortune (an arrow bending to the right then being diverted back the other way at the last second).
I’m a big fan of the Karma/Drama/Fortune (K/D/F) model for understanding resolution. My relationship with K/D/F is a story for another blog post, but I’ll use it as as a framework here.

Karma, Drama, Fortune

I could write a lot about the way I interpret the K/D/F model, but for today here’s a quick primer:

The K/D/F model describes the relationship between three forces: Karma (player choices), Drama (story needs) and Fortune (luck, e.g. dice rolls). For example,

  • When the lich king comes to the region to provide a villainous plot hook, that’s Drama. Nobody had to do anything and no dice were rolled. The story demanded a “big bad” and so – within the limitations of the setting – one turned up.
  • When his lucky critical hit kills an ally of the adventurers, that’s Fortune. That battle could have gone a different way, but the dice were on the villain’s side and he was able to harm the players. When we don’t know which way something will go, and it matters, we hit the dice.
  • When one of the heroes comes up with a clever way to use a magical artefact from a previous quest to defeat him, that’s Karma. It was a clever plan, and the players were rewarded for their smart choices by being able to vanquish the evil thing.
  • And elsewhere on their quest they probably saw many other resolutions. Each of those may have leaned more-heavily on one or another of the three pillars, or balanced between them equally.
Triangle showing that a balanced game requires a mixture of Karma, Drama, and Fortune, but not necessarily equally.
The balance point varies by group and can change over time, but crucially it doesn’t neglect any one of the three aspects.

Disbalancing drama

For most of my many years of gamemastering, I saw my role as being the sole provider the “drama” part of the K/D/F model. The story comes from me, the choices and dice rolls come from the players, right?

Nope, I was wrong. That approach creates an inevitable trend, whether large or small, towards railroading: “forcing” players down a particular path.

A gamemaster with an inflexible and excessively concrete idea of the direction that a story must go will find that they become unable to see the narrative through any other lens. In extreme examples, the players are deprotagonised and the adventure just becomes a series of set pieces, connected by the gamemaster’s idea of how things should play out. I’ve seen this happen. I’ve even caused it to happen, sometimes.2

Flowchart for the quest "Expedition to the Lonely Mountain: an adventure for 14 first-level characters, one of them a halfling and the rest of them dwarves." Shows a linear, non-branching flowchat: birthday party; accept quest; captured by trolls; rescued by wizard; meet elves; get weapons; captured by goblins; rescued by wizard; wolves; rescued by eagles; giant spiders; captured by wood elves; escape by river; lake town; climb mountain; meet dragon; trick dragon, learn weakness, steal treasure; dragon attack.
What if Bilbo and his party escaped from the wood elves by land, heading directly East to Erebor instead of via Esgaroth? What if he failed to determine Smaug’s weakness, or chose not to steal from him? What if the dwarves successfully fought off the goblins and didn’t need rescue? The difference between an adventure story and an adventure game should be that in a game, nobody – not even the author – can be certain ahead of time of the answers to all the questions.

A catalogue of failures

I’ve railroaded players to some degree or another on an embarrassing number of occasions.

In the spirit of learning from my mistakes, here are three examples of me being a Bad GM.

Quantum Ogre

Scenario: In a short-lived high fantasy GURPS campaign, I wanted the party to meet a band of gypsies and have their fortune told, in order to foreshadow other parts of the story yet to come.

What I did: I pulled a quantum ogre (magician’s choice) on them: whether they travelled by road, or water, or hacked their way through the forest, they were always going to meet the gypsies: their choice of route didn’t really matter.

Why that was wrong: I’d elevated the value of the encounter I’d planned higher than the importance of player agency. The more effort it took to write something, the more I felt the need to ensure it happened!

Two things I could’ve done: Reassessed the importance of the encounter. Found other ways to foreshadow the plot that didn’t undermine player choices, and been more-flexible about my set pieces.

Fudging

Scenario: In a Spirit of the Century one-shot an antagonist needed to kidnap a NPC from aboard an oceanbound ship. To my surprise – with some very lucky rolls – the players foiled the plot!

What I did: I used a fudge – an exploit based on the fact that in most games the gamemaster controls both the plot and the hidden variables of the game mechanics – to facilitate the antagonist kidnapping a different NPC, and adapted the story to this new reality.

Why that was wrong: It made the players feel like their choices didn’t matter. I justified it to myself by it being a one-shot, but that undermines the lesson: I could’ve done better.

Two things I could’ve done: Used the failed attack as a precursor to a later renewed offensive by a villain who’s now got a personal interest in seeing the party fail. Moved towards a different story, perhaps to a different element of the antagonist’s plan.

Ex Machina

Scenario: In a long-running Warhammer Fantasy Roleplay (1st edition!) campaign, a series of bad choices and terrible luck left the party trapped and unable to survive the onslaught of a literal army of bloodthirsty orcs.

What I did: I whipped out a deus spiritus ex machina, having a friendly ghost NPC basically solve for them a useful puzzle they’d been struggling with, allowing them to escape alive (albeit with the quest truly failed).

Why that was wrong: It deprotagonised the adventurers, making them unimportant in their own stories. At the time, I felt that by saving the party I was “saving” the game, but instead I was undermining its value.

Two things I could’ve done: TPK: sometimes it’s the right thing to allow everybody to die! Pivot the plot to facilitate their capture (e.g. the arch-nemesis can’t solve the puzzle either and wants to coerce them into helping), leading to new challenges and interesting moral choices.

Those examples are perhaps extreme, but I’m pretty sure I’ve set up my fair share of lesser sins too. Like chokepoints that strongly encourage a particular direction: do that enough and you train your players to wait until they identify the chokepoint before they take action! Or being less invested in players’ plans if those plans deviate from what I anticipated, and having a convenient in-party NPC prompting players with what they ought to do next. Ugh.3

The good news is, of course, that we’ve all always got the opportunity for growth and self-improvement.

Scan from the D&D 5e adventure book "Descent into Avernus", showing a linear progression from the Dungeon of the Dead Three to The Low Lantern to Vanthampur Villa. In each case, player motivation is supposed, e.g. "The characters confront another of Duke Vanthampur's sons", "the adventurers attack her villa", etc.
In my defence, many professionally published adventures are a series of scenes connected by the assumption that the author knows exactly how the players will proceed from each. These don’t teach gamemasters how to handle any deviation: no wonder we don’t learn not to railroad!

The self-improvement path

I’ve gotten better at this in general over the years, but when I took over from Simon at DMing for The Levellers in July, I decided that I was going to try to push myself harder than ever to avoid railroading. Simon was always especially good at promoting player freedom and autonomy, and I wanted to use this inspiration as a vehicle to improve my own gamemastering.

What does that look like within the framework of an established campaign?

Photo with narrow depth of field, showing a tabletop roleplaying game. A grey plastic minature of a dwarf with a battle axe faces off against a large red minature of a dragon. Beside them, two glassy red six-sided dice and a similarly-coloured twenty-sided die can be seen.
Some days, a critical hit is just enough. Other days, you should’ve just stayed at the inn and got drunk. This third-party photo is copyrighted with all rights reserved; not under my usual license.

Well: I ensure there are clues (usually three of them!) to point the players in the “right” direction. And I’ll be on hand to give “nudges” if they’re truly stuck for what to do next, typically by providing a “recap” of the things they’ve previously identified as hooks that are worth following-up (including both the primary plotline and any other avenues they’ve openly discussed investigating).

But that’s the limit to how I allow Drama to control the direction of the story. Almost everything else lies in the hands of Karma and Fortune.

Three-frame captioned screengrab from Community Season 5 Episode 10 (Advanced Advanced Dungeons & Dragons). Abed is sat amongst his dungeon mastering supplies. "South? You could go South," he says. He pulled out an thick binder and slams it onto the table. "I've generated some details about the surrounding area," he adds, flipping it open to show it full of notes. Beneath, it's captioned "eye contact intensifies".
Let all gamemasters strive to be as prepared as Abed.

Needless to say, opening up the possibility space for my players makes gamemastering harder4! But… not by as much as I expected. Extra prep-work was necessary, especially at the outset, in order to make sure that the world I was inheriting/building upon was believable and internally-consistent (while ensuring that if a player decided to “just keep walking East” they wouldn’t fall off the edge of the world). But mostly, the work did itself.

Because here’s the thing I learned: so long as you’re willing to take what your players come up with and run with it, they’ll help make the story more compelling. Possibly without even realising it.5

"Roll Safe" image meme showing a black man with his finger to his temple, indicating he's had a bright idea. The image is captioned "Players can't derail your plot... if your plot isn't on rails".
This tip brought to you from the Department of Splitting The Party Before They Think To Do It Themselves.

The Levellers are a pretty special group. No matter what the situation, they can always be relied upon to come up with a plan that wasn’t anywhere on their DM‘s radar. When they needed to cross a chasm over their choice of one of two bridges, each guarded by a different variety of enemy, I anticipated a few of the obvious options on each (fighting, magic, persuasion and intimidation, bribery…) but a moment later they were talking about having their druid wildshape into something easy-to-carry while everybody else did a group-spider climb expedition down the chasm edge and along the underside of a bridge. That’s thinking outside the box!

But the real magic has come when the party, through their explorations, have unlocked entirely new elements of the story.

Player-driven content

In our campaign, virtually all of the inhabitants of a city have inadvertently sold their immortal souls to a Archduchess of Hell by allowing, over generations, their declaration of loyalty to their city to become twisted away from their gods and towards their mortal leader, who sold them on in exchange for a sweet afterlife deal. The knights of the city were especially-impacted, as the oath they swore upon promised their unending loyalty in this life as well. When the fiendish pact was made, these knights were immediately possessed by evil forces, transforming into horrendous creatures (who served to harass the party for some time).

Pile of old papers with handwritten notes, including ingredients for a high fantasy "dream machine".
Every party’s got a character who pores over the textual detail of every prop6, right? Or is it just every party that includes JTA as a player?
But there’s a hole in this plot7. As-written, at least one knight avoided fiendish possession and lived to tell the tale! The player characters noticed this and latched on, so I ran with it. Why might the survivor knights be different from those who became part of the armies of darkness? Was there something different about their swearing-in ceremony? Maybe the reasons are different for different survivors?

I didn’t have answers to these questions to begin with, but the players were moving towards investigating, so I provided some. This also opened up an entire new possible “soft” quest hook related to the reason for the discrepancy. So just like that, a plothole is discovered and investigated by a player, and that results in further opportunities for adventure.

As it happens, the party didn’t even go down that route at all and instead pushed-on in their existing primary direction, but the option remains. All thanks to player curiosity, there’s a possible small quest that’s never been written down or published, and is unique to our group and the party’s interests. And that’s awesome.

Dan gestures with a wave as he peers into the camera over the top of a copy of Monsters of the Multiverse, by candlelight.
“The spell takes effect, and with whoosh of air you find yourself whisked to the bottom of the page, ready to finish reading the post.”

In Conclusion

I’m not the best GM in the world. I’m not even the best GM I know. But I’m getting better all the time; learning lessons like how to release the reins a little bit and see where my players can take our adventures.

And for those lessons, I’m grateful to those same players.

Footnotes

1 I’m using the terms GM, DM, and facilitator interchangeably, and damned if I’m writing them all out every single time.

2 A gamemaster giving all of the narrative power to any one of the three elements of K/D/F breaks the game, but in different ways. 100% karma and what you’ve got is a storytelling game, not a roleplaying game: which is fine if that’s what everybody at the table thinks they’re playing: otherwise not. 100% drama gives you a recital, not a jam session: the gamemaster might as well just be writing a book. 100% fortune leads to unrealistic chaos: with no rules to the world (either from the plot or from the consequences of actions) you’re just imagining all possible outcomes in your universe and picking one at random. There’s a balance, and where it sits might vary from group to group, but 100% commitment to a single element almost always breaks things.

3 A the “lesser sins” I mention show, the edges of what construes railroading and what’s merely “a linear quest” is a grey area, and where the line should be drawn varies from group to group. When I’m running a roleplaying session for my primary-school-aged kids, for example, I’m much more-tolerant of giving heavy-handed nudges at a high-level to help them stay focussed on what their next major objective was… but I try harder than ever to encourage diverse and flexible problem-solving ideas within individual scenes, where childish imagination can really make for memorable moments. One time, a tabaxi warrior, on fire, was falling down the outside of a tower… but his player insisted that he could shout a warning through the windows he passed before landing in flawless catlike fashion (albeit mildly singed). My adult players would be rolling athletics checks to avoid injury, but my kids? They can get away with adding details like that by fiat. Different audience, see?

4 A recent session took place after a hiatus, and I wasn’t confident that – with the benefit of a few months’ thinking-time – the party would continue with the plan they were executing before the break. And they didn’t! I’d tried to prep for a few other eventualities in the anticipation of what they might do and… I guessed wrong. So, for the first time in recorded history, our session ended early. Is that the end of the world? Nope.

5 Want a really radical approach to player-driven plot development? Take a look at this video by Zee Bashew, which I’m totally borrowing from next time I start running a new campaign.

6 You know what I miss? Feelies. That’s probably why I try to provide so many “props”, whether physical or digital, in my adventures.

7 The plothole isn’t even my fault, for once: it’s functionally broken as-delivered in the source book, although that matters little because we’ve gone so-far outside the original source material now we’re on a whole different adventure, possibly to reconvene later on.

× × × × × × × ×

[Bloganuary] Playtime

This post is part of my attempt at Bloganuary 2024. Today’s prompt is:

Do you play in your daily life? What says “playtime” to you?

How do I play? Let me count the ways!

RPGs

I’m involved in no fewer than three different RPG campaigns (DMing the one for The Levellers) right now, plus periodic one-shots. I love a good roleplaying game, especially one that puts character-building and storytelling above rules-lawyering and munchkinery, specifically because that kind of collaborative, imaginative experience feels more like the kind of thing we call “play” when done it’s done by children!

Composite photo showing a young boy rolling a D20 onto a character sheet in front of a tabletop battlemap, and three monitors in a dark room showing a video chat between people and a digital gameboard.
Family D&D and Abnib D&D might have a distinctly different tone, but they’re still both playtime activities.

Videogames

I don’t feel like I get remotely as much videogaming time as I used to, and in theory I’ve become more-selective about exactly what I spend my time on1.

Dan with his thumbs-up in front of the high-score table (with the top-ranking spot about to be filled) of Wonder Boy, on a generic "80s Arcade Classics" arcade cabinet.
I managed to beat Wonder Boy last week, and it “only” took me three and a half decades!

Board Games

Similarly, I don’t feel like I get as much time to grind through my oversized board games collection as I used to2, but that’s improving as the kids get older and can be roped-into a wider diversity of games3.

A girl, sat in front of an Agricola farmyard board, holds up a "sheeple" (small wooden sheep game piece) for the camera.
Our youngest wakes early on weekend mornings and asks to kick off his day with board games. Our eldest, pictured, has grown to the point where she’s working her way through all of the animal-themed games at our local board games cafe.

Escape Rooms

I love a good escape room, and I can’t wait until the kids are old enough for (more of) them too so I’ve an excuse to do more of them. When we’re not playing conventional escape rooms, Ruth and I can sometimes be found playing board game-style boxed “kit” ones (which have very variable quality, in my experience) and we’ve recently tried a little Escape Academy.

Ruth and Dan hold up an Alice In Wonderland themed sign reading "it went like a dream" underneath the sign for escape room company Escape Hunt. Both are wearing silly hats, and Dan is also wearing white rabbit ears.
Ruth and I make a great duo when we remember to communicate early-and-often and to tag-team puzzles by swapping what we’re focussing on when we get stuck.

GNSS Activities

I’m sure everybody knows I do a modest amount of geocaching and geohashing.4

Dan, outdoors in a field on a grey day and with the wind whipping his hair across his face, wearing a high-vis jacket over a warm fleece, holds up a GPS receiver which shows he's zero metres from his destination.
I’m out standing in my field.

They’re not the only satnav-based activities I do at least partially “for fun” though! I contribute to OpenStreetMap, often through the “gamified” experience of the StreetComplete app, and I’m very slowly creeping up the leader board at OpenBenches. Are these “play”? Sure, maybe.

And all of the above is merely the structured kinds of play I engage in. Playing “let’s pretend”-style games with the kids (even when they make it really, really weird) adds a whole extra aspect. Also there’s the increasingly-rare murder mystery parties we sometimes hold: does that count as roleplaying, or some other kind of play?

Guests dressed as a chef, a priest, and a librarian sit around a dining table at a murder mystery party.
A chef, a priest, and a librarian walk into a party… stop me if you’ve heard this one.

Suffice to say, there’s plenty of play in my life, it’s quite varied and diverse, and there is, if anything, not enough of it!

Footnotes

1 I say that, and yet somehow Steam tells me that one of my most-played games this year was Starfield, which was… meh? Apparently compelling enough that I’ve “ascended” twice, but in hindsight I wish I hadn’t bothered.

2 Someday my group and I will finish Pandemic Legacy: Season 2 so we can get started on Season 0 which has sat unplayed on my shelves since I got it… oooh… two or three years ago‽

3 This Christmas, I got each of them their first “legacy” game: Zombie Kids for the younger one, My City for the elder. They both seem pretty good.

4 Geocaching is where you use military satellite networks to find lost tupperware. Geohashing uses the same technology but what you find is a whole lot of nothing. I don’t think I can explain why I find the latter more-compelling.

× × × × × ×

Have Fun with Missions, Visions, and Values

I just spent a lightweight week in Rome with fellow members of Automattic‘s Team Fire.

Among our goals for the week was an attempt to strengthen the definition of who are team are, what we work on, and how and why we do so. That’s basically a team-level identity, mission, vision, and values, right?

In front of the Colosseum in Rome, Dan - wearing a rainbow-striped bandana atop which his sunglasses are perched - takes a selfie. Behind him stand a man with dark hair and a closely-trimmed beard wearing a purple "woo" t-shirt, a woman with long brown hair wearing beads and a multicoloured dress, a man wearing spectacles and a dark t-shirt on which the number "23" can be made out, and a man in sunglasses with a ginger beard, wearing an open blue shirt.
We were missing two members of our team, but one was able to remote-in (the other’s on parental leave!).

Fellow Automattician Ben Dwyer recently wrote about his experience of using a deck of Dixit cards to help his team refine their values in a fun and engaging way. I own a Dixit set, so we decided to give it a go too.

A deck of Dixit cards, bound by a twisted elastic band, sits on a flight itinerary for the journey "LGW to FCO" taking place on May 21, 2023 and costing $367.60.
The cards sat on my ‘plane tickets for a fortnight because it was just about the only way I’d remember to pack them.

Normally when you play Dixit, you select a card from your hand – each shows a unique piece of artwork – and try to describe it in a way that’s precise enough that some of the other players will later be able to pick it out of a line-up, but ambiguous enough that not all the other players will. It’s a delicate balancing act. Even when our old Geek Night was in full swing we didn’t used to play it often because our well-established group’s cornucopia of  in-jokes and references  made it trivially easy to “target” your descriptions at specific players1, but it’s still a solid icebreaker activity.

A trio of Dixit cards within a grid of nine. From left to right, they show: a heart, on fire, beneath a glass jar; a cubbyhole containing childrens' toys; a fairy leaping from a book towards a small person atop a stack of books.
Can you see your team’s values symbolised in any Dixit cards?

Perhaps it was the fantasy artwork that inspired us or maybe it just says something about how my team sees themselves, but what we came up with had a certain… swords-and-sorcery… even Dungeons & Dragons… feel to it.

Partial screenshot from a document entitled "Team Fire". The visible part is titled "Who we are (identity)" and reads:We are a band of brave adventurers who bring light into the wild forests of Extend. We tame the monsters who lurk in the dungeons beneath the Castle of Vendor Experience. The beasts we keep at bay include: PBS, which helps ensure code quality and extension standards compliance; the Vendor Dashboard, haunt of third-party developers, as well as their documentation and analytics platforms; Integrations with Payments Admin, to ensure that treasure is shared, and other tools.
The projects my team are responsible for aren’t actually monsters, but they can be complex, multifaceted, and unintuitive. And have a high AC.

Ou team’s new identity isn’t finalised, but I love the fact that we’ve been able to inject a bit of fun and whimsy into it. At our last draft, my team looks to be defined as comprising:

  • Gareth, level 62 Pathfinder, leading the way through the wilds
  • Bero, Level 5 Battlesmith, currently lost in the void
  • Dan (me!), Level 5 Arcane Trickster, breaking locks and stealing treasure
  • Cem, Level 4 Dragonslayer, smashing doors and bugs alike
  • Lae, Level 7 Pirate, seabound rogue with eyes on the horizon
  • Kyle, Level 5 Apprentice Bard, master of words and magic
  • Simran, Level 6 Apprentice Code Witch, weaving spells from nature

I think that’s pretty awesome.

Footnotes

1 Also: I don’t own any of the expansion packs and playing with the same cards over and over again gets a bit samey.

2 The “levels” are simply the number of years each teammate has been an Automattician, plus one.

× × × ×

Sisyphus: The Board Game (Digital Edition)

I’m off work sick today: it’s just a cold, but it’s had a damn good go at wrecking my lungs and I feel pretty lousy. You know how when you’ve got too much of a brain-fog to trust yourself with production systems but you still want to write code (or is that just me?), so this morning I threw together a really, really stupid project which you can play online here.

Screenshot showing Sisyphus carrying a rock up a long numbered gameboard; he's on square 993 out of 1000, but (according to the rules printed below the board) he needs to land on 1000 exactly and never roll a double-1 or else he returns to the start.
It’s a board game. Well, the digital edition of one. Also, it’s not very good.

It’s inspired by a toot by Mason”Tailsteak” Williams (whom I’ve mentioned before once or twice). At first I thought I’d try to calculate the odds of winning at his proposed game, or how many times one might expect to play before winning, but I haven’t the brainpower for that in my snot-addled brain. So instead I threw together a terrible, terrible digital implementation.

Go play it if, like me, you’ve got nothing smarter that your brain can be doing today.

Beating Children at Mastermind

This blog post is also available as a video. Would you prefer to watch/listen to me tell you about how I’ve implemented a tool to help me beat the kids when we play Mastermind?

I swear that I used to be good at Mastermind when I was a kid. But now, when it’s my turn to break the code that one of our kids has chosen, I fail more often than I succeed. That’s no good!

Black, white, brown, blue, green, orange and yellow Mastermind pegs in a disordered heap.
If you didn’t have me pegged as a board gamer… where the hell have you been?

Mastermind and me

Maybe it’s because I’m distracted; multitasking doesn’t help problem-solving. Or it’s because we’re “Super” Mastermind, which differs from the one I had as a child in that eight (not six) peg colours are available and secret codes are permitted to have duplicate peg colours. These changes increase the possible permutations from 360 to 4,096, but the number of guesses allowed only goes up from 8 to 10. That’s hard.

A plastic Mastermind board in brown and green; it has twelve spots for guessing and shows six coloured pegs. The game has been won on the sixth guess.
The set I had as a kid was like this, I think. Photo courtesy ZeroOne; CC-BY-SA license.

Or maybe it’s just that I’ve gotten lazy and I’m now more-likely to try to “solve” a puzzle using a computer to try to crack a code using my brain alone. See for example my efforts to determine the hardest hangman words and make an adverserial hangman game, to generate solvable puzzles for my lock puzzle game, to cheat at online jigsaws, or to balance my D&D-themed Wordle clone.

Hey, that’s an idea. Let’s crack the code… by writing some code!

Screenshot showing Mastermind game from WebGamesOnline.com. Seven guesses have been made, each using only one colour for each of the four pegs, and no guesses are corect; only red pegs have never been guessed.
This online edition plays a lot like the version our kids play, although the peg colours are different. Next guess should be an easy solve!

Representing a search space

The search space for Super Mastermind isn’t enormous, and it lends itself to some highly-efficient computerised storage.

There are 8 different colours of peg. We can express these colours as a number between 0 and 7, in three bits of binary, like this:

Decimal Binary Colour
0 000 Red
1 001 Orange
2 010 Yellow
3 011 Green
4 100 Blue
5 101 Pink
6 110 Purple
7 111 White

There are four pegs in a row, so we can express any given combination of coloured pegs as a 12-bit binary number. E.g. 100 110 111 010 would represent the permutation blue (100), purple (110), white (111), yellow (010). The total search space, therefore, is the range of numbers from 000000000000 through 111111111111… that is: decimal 0 through 4,095:

Decimal Binary Colours
0 000000000000 Red, red, red, red
1 000000000001 Red, red, red, orange
2 000000000010 Red, red, red, yellow
…………
4092 111111111100 White, white, white, blue
4093 111111111101 White, white, white, pink
4094 111111111110 White, white, white, purple
4095 111111111111 White, white, white, white

Whenever we make a guess, we get feedback in the form of two variables: each peg that is in the right place is a bull; each that represents a peg in the secret code but isn’t in the right place is a cow (the names come from Mastermind’s precursor, Bulls & Cows). Four bulls would be an immediate win (lucky!), any other combination of bulls and cows is still valuable information. Even a zero-score guess is valuable- potentially very valuable! – because it tells the player that none of the pegs they’ve guessed appear in the secret code.

A plastic Mastermind board in blue and yellow with ten guess spaces and eight pegs. The sixth guess is unscored but looks likely to be the valid solution.
If one of Wordle‘s parents was Scrabble, then this was the other. Just ask its Auntie Twitter.

Solving with Javascript

The latest versions of Javascript support binary literals and bitwise operations, so we can encode and decode between arrays of four coloured pegs (numbers 0-7) and the number 0-4,095 representing the guess as shown below. Decoding uses an AND bitmask to filter to the requisite digits then divides by the order of magnitude. Encoding is just a reduce function that bitshift-concatenates the numbers together.

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
 * Decode a candidate into four peg values by using binary bitwise operations.
 */
function decodeCandidate(candidate){
  return [
    (candidate & 0b111000000000) / 0b001000000000,
    (candidate & 0b000111000000) / 0b000001000000,
    (candidate & 0b000000111000) / 0b000000001000,
    (candidate & 0b000000000111) / 0b000000000001
  ];
}

/**
 * Given an array of four integers (0-7) to represent the pegs, in order, returns a single-number
 * candidate representation.
 */
function encodeCandidate(pegs) {
  return pegs.reduce((a, b)=>(a << 3) + b);
}

With this, we can simply:

  1. Produce a list of candidate solutions (an array containing numbers 0 through 4,095).
  2. Choose one candidate, use it as a guess, and ask the code-maker how it scores.
  3. Eliminate from the candidate solutions list all solutions that would not score the same number of bulls and cows for the guess that was made.
  4. Repeat from step #2 until you win.

Step 3’s the most important one there. Given a function getScore( solution, guess ) which returns an array of [ bulls, cows ] a given guess would score if faced with a specific solution, that code would look like this (I’m convined there must be a more-performant way to eliminate candidates from the list with XOR bitmasks, but I haven’t worked out what it is yet):

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/**
 * Given a guess (array of four integers from 0-7 to represent the pegs, in order) and the number
 * of bulls (number of pegs in the guess that are in the right place) and cows (number of pegs in the
 * guess that are correct but in the wrong place), eliminates from the candidates array all guesses
 * invalidated by this result. Return true if successful, false otherwise.
 */
function eliminateCandidates(guess, bulls, cows){
  const newCandidatesList = data.candidates.filter(candidate=>{
    const score = getScore(candidate, guess);
    return (score[0] == bulls) && (score[1] == cows);
  });
  if(newCandidatesList.length == 0) {
    alert('That response would reduce the candidate list to zero.');
    return false;
  }
  data.candidates = newCandidatesList;
  chooseNextGuess();
  return true;
}

I continued in this fashion to write a full solution (source code). It uses ReefJS for component rendering and state management, and you can try it for yourself right in your web browser. If you play against the online version I mentioned you’ll need to transpose the colours in your head: the physical version I play with the kids has pink and purple pegs, but the online one replaces these with brown and black.

Testing the solution

Let’s try it out against the online version:

As expected, my code works well-enough to win the game every time I’ve tried, both against computerised and in-person opponents. So – unless you’ve been actively thinking about the specifics of the algorithm I’ve employed – it might surprise you to discover that… my solution is very-much a suboptimal one!

A young boy sits cross-legged on the floor, grinning excitedly at a Mastermind board (from the code-maker's side).
My code has only failed to win a single game… and that turned out to because my opponent, playing overexcitedly, cheated in the third turn. To be fair, my code didn’t lose either, though: it identified that a mistake must have been made and we declared the round void when we identified the problem.

My solution is suboptimal

A couple of games in, the suboptimality of my solution became pretty visible. Sure, it still won every game, but it was a blunt instrument, and anybody who’s seriously thought about games like this can tell you why. You know how when you play e.g. Wordle (but not in “hard mode”) you sometimes want to type in a word that can’t possibly be the solution because it’s the best way to rule in (or out) certain key letters? This kind of strategic search space bisection reduces the mean number of guesses you need to solve the puzzle, and the same’s true in Mastermind. But because my solver will only propose guesses from the list of candidate solutions, it can’t make this kind of improvement.

Animation showing how three clues alone are sufficient to derive a unique answer from the search space of the original "break into us" lock puzzle.
My blog post about Break Into Us used a series of visual metaphors to show search space dissection, including this one. If you missed it, it might be worth reading.

Search space bisection is also used in my adverserial hangman game, but in this case the aim is to split the search space in such a way that no matter what guess a player makes, they always find themselves in the larger remaining portion of the search space, to maximise the number of guesses they have to make. Y’know, because it’s evil.

Screenshot showing a single guess row from Online Mastermind, with the guess Red, Red, Green, Green.
A great first guess, assuming you’re playing against a random code and your rules permit the code to have repeated colours, is a “1122” pattern.

There are mathematically-derived heuristics to optimise Mastermind strategy. The first of these came from none other than Donald Knuth (legend of computer science, mathematics, and pipe organs) back in 1977. His solution, published at probably the height of the game’s popularity in the amazingly-named Journal of Recreational Mathematics, guarantees a solution to the six-colour version of the game within five guesses. Ville [2013] solved an optimal solution for a seven-colour variant, but demonstrated how rapidly the tree of possible moves grows and the need for early pruning – even with powerful modern computers – to conserve memory. It’s a very enjoyable and readable paper.

But for my purposes, it’s unnecessary. My solver routinely wins within six, maybe seven guesses, and by nonchalantly glancing at my phone in-between my guesses I can now reliably guess our children’s codes quickly and easily. In the end, that’s what this was all about.

× × × × × ×

Printing Maps from Dungeondraft

I really love Dungeondraft, an RPG battle map generator. It’s got great compatibility with online platforms like Foundry VTT and Roll20, but if you’re looking to make maps for tabletop play, there’s a few tips I can share:

Screenshot showing Dungeondraft being used to edit a circular tower. The Export window is visible.
Tabletop players can’t zoom in and will appreciate you printing with good contrast.

Planning and designing

Dungeondraft has (or can be extended with) features to support light levels and shadow-casting obstructions, openable doors and windows, line-of sight etc… great to have when you’re building for Internet-enabled tabletops, but pointless when you’re planning to print out your map! Instead:

  • Think about scale: I’m printing to A4 sheets and using inch-size squares, so every 11 x 8 squares equates to one sheet of paper. Knowing this, I can multiply-up to a whole number of sheets of paper and this informs my decisions about how to best make use of the maps (and what will and won’t fit on my dining table!).
  • Focus on legibility: Your printer probably won’t have the same kind of resolution as your screen, and your players can’t “zoom in” to get details. Play with the grid styles (under Map Settings) to find what works best for you, and try not to clash with your floor patterns. If you’re printing in monochrome, use the “Printer-Friendly” camera filter (also under Map Settings, or in the Export Options dialog) to convert to gorgeous line-art. Make sure critical elements have sufficient contrast that they’ll stand out when printed or your players might walk right over that chest, campfire, or bookshelf.
  • Think about exposure: You don’t get digital “fog of war” on the tabletop! Think about how you’re going to reveal the map to your players: plan to print in multiple sections to put together, jigsaw style, or have card to “cover” bits of the map. Think about how the tool can help you here: e.g. if you’ve got multiple buildings the players can explore, use a higher “level” or roof layer to put roofs on your buildings, then print the relevant parts of that level separately: now you’ve got a thematic cover-up that you can remove to show the insides of the building. Go the other way around for secret doors: print the empty wall on your main map (so players can’t infer the location of the secret door by the inclusion of a cover-up) and the secret door/passage on the overlay, so you can stick it onto the map when they find it.
Monochrome map showing a crane tower and attached dwelling.
If you’re printing in black and white, line art can be a gorgeous look.

Printing it out

There’s no “print” option in Dungeondraft, so – especially if your map spans multiple “pages” – you’ll need a multi-step process to printing it out. With a little practice, it’s not too hard or time-consuming, though:

Screenshot showing a cavern map in Gimp, with the Export Image dialog open and PDF selected as the output format.
Gimp makes light work of converting a PNG into a PDF.

Export your map (level by level) from Dungeondraft as PNG files. The default settings are fine, but pay attention to the “Overlay level” setting if you’re using smart or complex cover-ups as described above.

To easily spread your map across multiple pages, you’ll need to convert it to a PDF. I’m using Gimp to do this. Simply open the PNG in Gimp, make any post-processing/last minute changes that you couldn’t manage in Dungeondraft, then click File > Export As… and change the filename to have a .pdf extension. You could print directly from Gimp, but in my experience PDF reader software does a much better job at multi-page printing.

Foxit print dialog showing a preview of a map printed across 6 sheets of A4 paper.
Check the print preview before you click the button!

Open your PDF in an appropriate reader application with good print management. I’m using Foxit, which is… okay? Print it, selecting “tile large pages” to tell it to print across multiple sheets. Assuming you’ve produced a map an appropriate size for your printer’s margins, your preview should be perfect. If not, you can get away with reducing the zoom level by up to a percent or two without causing trouble for your miniatures. If you’d like the page breaks to occur at specific places (for exposure/reveal reasons), go back to Gimp and pad one side of the image by increasing the canvas size.

Check the level of “overlap” specified: I like to keep mine low and use the print margins as the overlapping part of my maps when I tape them together, but you’ll want to see how your printer behaves and adapt accordingly.

Multiple sheets of A4 paper joined with a slight overlap by long strips of sticky tape.
The overlap provides stability, rigidity, and an explanation as to exactly what that character tripped over when they rolled a critical fail on a DEX check.

If you’re sticking together multiple pages to make a single large map, trim off the bottom and right margins of each page: if you printed with cut marks, this is easy enough even without a guillotine. Then tape them together on the underside, taking care to line-up the features on the map (it’s not just your players who’ll appreciate a good, visible grid: it’s useful when lining-up your printouts to stick, too!).

I keep my maps rolled-up in a box. If you do this too, just be ready with some paperweights to keep the edges from curling when you unfurl them across your gaming table. Or cut into separate rooms and mount to stiff card for that “jigsaw” effect! Whatever works best for you!

Miniatures on a cave map, with the D&D Player's Handbook acting as a paperweight.
Any hefty tome, e.g. the 5e Player’s Handbook, can act as a paperweight.
× × × × × ×

The Board Game Remix Kit

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

New rules for old games! The Board Game Remix Kit is a collection of tips, tweaks, reimaginings and completely new games that you can play with the board and pieces from games you might already own: MonopolyCluedo, Scrabble and Trivial Pursuit.

The 26 rule tweaks and new games include:

  • Full Houses: poker, but played with Monopoly properties
  • Citygrid: a single-player city-building game
  • Use Your WordsScrabble with storytelling
  • Them’s Fightin’ Words: a game of making anagrams, and arguing about which one would win in a fight
  • Hunt the Lead Piping: hiding and searching for the Cluedo pieces in your actual house
  • Guess Who Done It: A series of yes/no questions to identify the murderer (contributed by Meg Pickard)
  • Zombie Mansion: use the lead piping to defend the Cluedo mansion
  • Judy Garland on the Moon with a Bassoon: a drawing game that uses the answers to trivia questions as prompts

The Board Game Remix Kit was originally released in 2010 by the company Hide&Seek (which closed in 2014). We are releasing it here as a pdf (for phones/computers) and an epub (for ereaders) under a CC-BY-SA license.

If you enjoy the Kit and can afford it, please consider a donation to the World Health Organisation’s COVID-19 Response Fund.

Confined to your house? What a great opportunity to play board games with your fellow confinees.

Only got old family classics like Monopoly, Cluedo and Scrabble? Here’s a guide to mixing-them-up into new, fun, and highly-playable alternatives. Monopoly certainly needs it.

Cheating Hangman

A long while ago, inspired by Nick Berry‘s analysis of optimal Hangman strategy, I worked it backwards to find the hardest words to guess when playing Hangman. This week, I showed these to my colleague Grace – who turns out to be a fan of word puzzles – and our conversation inspired me to go a little deeper. Is it possible, I thought, for me to make a Hangman game that cheats by changing the word it’s thinking of based on the guesses you make in order to make it as difficult as possible for you to win?

Play “Cheating Hangman”

The principle is this: every time the player picks a letter, but before declaring whether or not it’s found in the word –

  1. Make a list of all possible words that would fit into the boxes from the current game state.
  2. If there are lots of them, still, that’s fine: let the player’s guess go ahead.
  3. But if the player’s managing to narrow down the possibilities, attempt to change the word that they’re trying to guess! The new word must be:
    • Legitimate: it must still be the same length, have correctly-guessed letters in the same places, and contain no letters that have been declared to be incorrect guesses.
    • Harder: after resolving the player’s current guess, the number of possible words must be larger than the number of possible words that would have resulted otherwise.
Gallows on a hill.
Yeah, you’re screwed now.

You might think that this strategy would just involve changing the target word so that you can say “nope” to the player’s current guess. That happens a lot, but it’s not always the case: sometimes, it’ll mean changing to a different word in which the guessed letter also appears. Occasionally, it can even involve changing from a word in which the guessed letter didn’t appear to one in which it does: that is, giving the player a “freebie”. This may seem counterintuitive as a strategy, but it sometimes makes sense: if saying “yeah, there’s an E at the end” increases the number of possible words that it might be compared to saying “no, there are no Es” then this is the right move for a cheating hangman.

Playing against a cheating hangman also lends itself to devising new strategies as a player, too, although I haven’t yet looked deeply into this. But logically, it seems that the optimal strategy against a cheating hangman might involve making guesses that force the hangman to bisect the search space: knowing that they’re always going to adapt towards the largest set of candidate words, a perfect player might be able to make guesses to narrow down the possibilities as fast as possible, early on, only making guesses that they actually expect to be in the word later (before their guess limit runs out!).

Cheating Hangman
The game is brutally-difficult, but surprisingly fun, and you can have it tell you when and how it cheats so you can begin to understand its strategy.

I also find myself wondering how easily I could adapt this into a “helpful hangman”: a game which would always change the word that you’re trying to guess in order to try to make you win. This raises the possibility of a whole new game, “suicide hangman”, in which the player is trying to get themselves killed and so is trying to pick letters that can’t possibly be in the word and the hangman is trying to pick words in which those letters can be found, except where doing so makes it obvious which letters the player must avoid next. Maybe another day.

In the meantime, you’re welcome to go play the game (and let me know what you think, below!) and, if you’re of such an inclination, read the source code. I’ve used some seriously ugly techniques to make this work, including regular expression metaprogramming (using regular expressions to write regular expressions), but the code should broadly make sense if you want to adapt it. Have fun!

Play “Cheating Hangman”

Update 26 September 2019, 16:23: I’ve now added “helpful mode”, where the computer tries to cheat on your behalf rather than against you, but it’s not as helpful as you’d think because it assumes you’re playing optimally and have already memorised the dictionary!

Update 1 October 2019, 06:40: Now featured on MetaFilter; hi, MeFites!

×

What can board game strategy tell us about the future of the car wash?

I’m increasingly convinced that Friedemann Friese‘s 2009 board game Power Grid: Factory Manager (BoardGameGeek) presents gamers with a highly-digestible model of the energy economy in a capitalist society. In Factory Manager, players aim to financially-optimise a factory over time, growing production and delivery capacity through upgrades in workflow, space, energy, and staff efficiency. An essential driving factor in the game is that energy costs will rise sharply throughout. Although it’s not always clear in advance when or by how much, this increase in the cost of energy is always at the forefront of the savvy player’s mind as it’s one of the biggest factors that will ultimately impact their profit.

Power grid's energy cost tracker
8 $money per $unit of electricity I use? That’s a rip off! Or a great deal! I don’t know!

Given that players aim to optimise for turnover towards the end of the game (and as a secondary goal, for the tie-breaker: at a specific point five rounds after the game begins) and not for business sustainability, the game perhaps-accidentally reasonably-well represents the idea of “flipping” a business for a profit. Like many business-themed games, it favours capitalism… which makes sense – money is an obvious and quantifiable way to keep score in a board game! – but it still bears repeating.

There’s one further mechanic in Factory Manager that needs to be understood: a player’s ability to control the order in which they take their turn and their capacity to participate in the equipment auctions that take place at the start of each round is determined by their manpower-efficiency in the previous round. That is: a player who operates a highly-automated factory running on a skeleton staff benefits from being in the strongest position for determining turn order and auctions in their next turn.

Empty Factory Manager staff room
My staff room is empty. How about yours?

The combination of these rules leads to an interesting twist: in the final turn – when energy costs are at their highest and there’s no benefit to holding-back staff to monopolise the auction phase in the nonexistent subsequent turn – it often makes most sense strategically to play what I call the “sweatshop strategy”. The player switches off the automated production lines to save on the electricity bill, drags in all the seasonal workers they can muster, dusts off the old manpower-inefficient machines mouldering in the basement, and gets their army of workers cranking out widgets!

With indefinitely-increasing energy prices and functionally-flat staff costs, the rules of the game would always eventually reach the point at which it is most cost-effective to switch to slave cheap labour rather than robots. but Factory Manager‘s fixed-duration means that this point often comes for all players in many games at the same predictable point: a tipping point at which the free market backslides from automation to human labour to keep itself alive.

There are parallels in the real world. Earlier this month, Tim Watkins wrote:

Abandoned automatic car wash

The demise of the automated car wash may seem trivial next to these former triumphs of homo technologicus but it sits on the same continuum. It is just one of a gathering list of technologies that we used to be able to use, but can no longer express (through market or state spending) a purpose for. More worrying, however, is the direction in which we are willingly going in our collective decision to move from complexity to simplicity. The demise of the automated car wash has not followed a return to the practice of people washing their own cars (or paying the neighbours’ kid to do it). Instead we have more or less happily accepted serfdom (the use of debt and blackmail to force people to work) and slavery (the use of physical harm) as a reasonable means of keeping the cost of cleaning cars to a minimum (similar practices are also keeping the cost of food down in the UK). This, too, is precisely what is expected when the surplus energy available to us declines.

I love Factory Manager, but after reading Watkins’ article, it’ll probably feel a little different to play it, now. It’s like that moment when, while reading the rules, I first poured out the pieces of Puerto Rico. Looking through them, I thought for a moment about what the “colonist” pieces – little brown wooden circles brought to players’ plantations on ships in a volume commensurate with the commercial demand for manpower – represented. And that realisation adds an extra message to the game.

Beneath its (fabulous) gameplay, Factory Manager carries a deeper meaning encouraging the possibility of a discussion about capitalism, environmentalism, energy, and sustainability. And as our society falters in its ability to fulfil the techno-utopian dream, that’s perhaps a discussion we need to be having.

Sorry to Bother You
Seriously, this film is awesome.

But for now, go watch Sorry to Bother You, where you’ll find further parallels… and at least you’ll get to laugh as you do so.

× × ×

Note #12733

12-sided die with multiple "0" stickers placed over the sides

“All #boardgames can be legacy games if you want it enough!” – @fleeblewidget, after drunkenly stumbling upon @thegodzillagirl’s label maker.

×

REPORT: Cards Against Humanity officially surpasses acoustic guitars as the most annoying thing you can bring to a party – The Beaverton

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

https://www.thebeaverton.com/2018/06/report-cards-against-humanity-officially-surpasses-acoustic-guitars-as-the-most-annoying-thing-you-can-bring-to-a-party/ (thebeaverton.com)

VICTORIA, BC – After data collection from thousands of parties across the country, reports are coming in that the annoying person who brings an acoustic guitar to a party is now officially less hated than the person who expects everyone to sit down and play Cards Against Humanity.

“At least when some asshole starts playing the tune to Wonderwall you can get up and go to a different room,” says Michelle Kalleta, 22, avid partygoer. “Jerks who show up with any sort of card game expect everyone to play, and the last thing I want to do at a party is sit in a circle with a bunch of people who think they’re hilariously edgy.”