Beating Children at Mastermind

This post is also available as a video. If you'd prefer to watch/listen to me talk about this topic, give it a look.

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 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 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.”

Fnorders

I’ve not posted much recently: I’ve had a lot of Complicated Life Stuff going on, sorry.

But I did make a thing: fnorders.com. You’re welcome.

Fnord.

Stones Under Yetzin

For the last few months, I’ve been GMing a GURPS campaign (that was originally a Warhammer Fantasy Roleplay 1st-edition campaign, in turn built upon a mixture of commercially published and homegrown modules, including, in turn, an AD&D module…) for a few friends.

So far, it’s included such gems as a player-written poem in a fictional language, another player’s drawing of the most-cinematic action sequence they’ve experienced so far… and the opportunity, during a play session that coincided with a player’s birthday, to explain the layout of a ruined tower by presenting them with a cake baked into the shape of the terrain.

Cake shaped sort-of like The Lone Tower.
“So we’re… here?” asked a player, jabbing with his finger at the cream-filled section of the tower at which he was standing.

If you’re interested in what we’ve been up to, the campaign has it’s own blog where you can read about the adventures of Newman, Bret, Lythil, Keru, and (the late) Sir Bea.

But mostly I wanted to make this post so that I had a point of context in case I ever get around to open-sourcing some of the digital tools I’ve been developing to help streamline our play sessions. For example, most of our battle maps and exploration are presented on a ‘board’ comprised of a flat screen monitor stripped of its stand and laid on its back, connected via the web to a tool that allows me to show, hide, or adapt parts of it from my laptop or mobile phone. Player stats, health, and cash, as well as the date, time, position of the sun as well as the phases of the moons are similarly tracked and are available via any player’s mobile phone at any time.

Players fight a basilisk across a paper RPG map.
A rare instance of us using a paper-based battle map. Despite the fact that we play in-person, we’ve used digital tools to save table space!

These kinds of tools have been popular for ‘long-distance’/Internet roleplaying for years, but I think there’s a lot of potential in locally-linked, tabletop-enhancing (rather than replacing) tools that deliver some of the same benefit to the (superior, in my opinion) experience of ‘proper’ face-to-face adventure gaming. Now, at least, when I tell you for example about some software I wrote to help calculate the position of the sun in the sky of a fictional world, you’ll have a clue why I would do such a thing in the first place.

×

The Hardest Hangman

What’s the hardest word to guess, when playing hangman? I’ll come back to that.

A game of hangman; D_N; wrong guesses are R, E, S, O, T and I.
Whatever could the missing letter be?

Last year, Nick Berry wrote a fantastic blog post about the optimal strategy for Hangman. He showed that the best guesses to make to get your first “hit” in a game of hangman are not the most-commonly occurring letters in written English, because these aren’t the most commonly-occurring letters in individual words. He also showed that the first guesses should be adjusted based on the length of the word (the most common letter in 5-letter words is ‘S’, but the most common letter in 6-letter words is ‘E’). In short: hangman’s a more-complex game than you probably thought it was! I’d like to take his work a step further, and work out which word is the hardest word: that is – assuming you’re playing an optimal strategy, what word takes the most-guesses?

A hanged man being quartered by his executioner.
The rules of hangman used to be a lot more brutal. Nowadays, very few people die as a result of the game.

First, though, we need to understand how hangman is perfectly played. Based on the assumption that the “executioner” player is choosing words randomly, and that no clue is given as to the nature of the word, we can determine the best possible move for all possible states of the game by using a data structure known as a tree. Suppose our opponent has chosen a three-letter word, and has drawn three dashes to indicate this. We know from Nick’s article that the best letter to guess is A. And then, if our guess is wrong, the next best letter to guess is E. But what if our first guess is right? Well, then we’ve got an “A” in one or more positions on the board, and we need to work out the next best move: it’s unlikely to be “E” – very few three-letter words have both an “A” and an “E” – and of course what letter we should guess next depends entirely on what positions the letters are in.

A tiny fragment of possible states for the tree of three-letter words, in hangman.
There are billions of possible states of game play, but you can narrow them down quickly with strategic guessing.

What we’re actually doing here is a filtering exercise: of all of the possible letters we could choose, we’re considering what possible results that could have. Then for each of those results, we’re considering what guesses we could make next, and so on. At each stage, we compare all of the possible moves to a dictionary of all possible words, and filter out all of the words it can’t be: after our first guess in the diagram above, if we guess “A” and the board now shows “_ A _”, then we know that of the 600+ three-letter words in the English language, we’re dealing with one of only about 134. We further refine our guess by playing the odds: of those words, more of them have a “C” in than any other letter, so that’s our second guess. If it has a C in, that limits the options further, and we can plan the next guess accordingly. If it doesn’t have a C in, that still provides us with valuable information: we’re now looking for a three-letter word with an A in the second position and no letter C: that cuts it down to 124 words (and our next guess should be ‘T’). This tree-based mechanism for working out the best moves is comparable to that used by other game-playing computers. Hangman is simple enough that it can be “solved” by contemporary computers (like draughts – solved in 2007 – but unlike chess: while modern chess-playing computers can beat humans, it’s still theoretically possible to build future computers that will beat today’s computers).

Pile of stones, and the text "the best word to choose in hangman is the word that your opponent will not guess"
Zen Hangman asks the really important questions. If a man has one guess left and refuses to pick a letter, does he live forever, or not at all?

Now that we can simulate the way that a perfect player would play against a truly-random executioner, we can use this to simulate games of hangman for every possible word (I’m using version 0.7 of this British-English dictionary). In other words, we set up two computer players: the first chooses a word from the dictionary, the second plays “perfectly” to try to guess the word, and we record how many guesses it took. So that’s what I did. Here’s the Ruby code I used. It’s heavily-commented and probably pretty understandable/good learning material, if you’re into that kind of thing. Or if you fancy optimising it, there’s plenty of scope for that too (I knocked it out on a lunch break; don’t expect too much!). Or you could use it as the basis to make a playable hangman game. Go wild.

The hardest three-letter hangman words: xxv, xxx, wiz, oak, vex, vox, aux, fox, yuk, www...
The hardest three-letter hangman words. “Sly” is particularly… well, sly.

Running the program, we can see that the hardest three-letter word is “xxv”, which would take 22 guesses (20 of them wrong!) to get. But aside from the roman numeral for 25, I don’t think that “xxv” is actually a word. Perhaps my dictionary’s not very good. “Oak”, though, is definitely a word, and at 20 guesses (17 wrong), it’s easily enough to hang your opponent no matter how many strokes it takes to complete the gallows.

The hardest four-letter hangman words: xxxv, quiz, jazz, zinc, faux, foxy, hazy, jibe, quay, buzz, gibe, guan, huge...
Interestingly, “oaks” is an easier word than “oak” (although it’s still very difficult): the addition of an extra letter to a word does not make it harder, especially when that letter is common.

There are more tougher words in the four-letter set, like the devious “quiz”, “jazz”, “zinc”, and “faux”. Pick one of those and your opponent – unless they’ve seen this blog post! – is incredibly unlikely to guess it before they’re swinging from a rope.

The hardest five, six, and seven-letter hangman words, including jazzy, quaff, foxed, foxing, queued, favour, vaquero, jazzier, quizzed...
“Hazing foxes, fucking cockily” is not only the title of a highly-inappropriate animated film, but also a series of very challenging Hangman words.

As we get into the 5, 6, and 7-letter words you’ll begin to notice a pattern: that the hardest words with any given number of letters get easier the longer they are. That’s kind of what you’d expect, I suppose: if there were a hypothetical word that contained every letter in the alphabet, then nobody would ever fail to (eventually) get it.

The hardest eight, nine, and ten-letter hangman words, including quizzing, puppyish, picklock, jazziness, pollywogs, cufflinks, humbuggery, juxtaposed, bucketfuls...
Some of the longer words are wonderful, like: dysprosium, semivowel, harrumph, and googolplex.

When we make a graph of each word length, showing which proportion of the words require a given number of “wrong” guesses (by an optimised player), we discover a “sweet spot” window in which we’ll find all of the words that an optimised player will always fail to guess (assuming that we permit up to 10 incorrect guesses before they’re disqualified). The window seems small for the number of times I remember seeing people actually lose at hangman, which implies to me that human players consistently play sub-optimally, and do not adequately counteract that failing by applying an equal level of “smart”, intuitive play (knowing one’s opponent and their vocabulary, looking for hints in the way the game is presented, etc.).

Graph showing the proportion of each word of a given length that take a given number of "wrong" guesses to optimally solve.
The “sweet spot” in the bottom right is the set of words which you would expect a perfect player to fail to guess, assuming that they’re given a limit of 10 “wrong” guesses.

In case you’re interested, then, here are the theoretically-hardest words to throw at your hangman opponent. While many of the words there feel like they would quite-rightly be difficult, others feel like they’d be easier than their ranking would imply: this is probably because they contain unusual numbers of vowels or vowels in unusual-but-telling positions, which humans (with their habit, inefficient under normal circumstances, of guessing an extended series of vowels to begin with) might be faster to guess than a computer.

Word Guesses taken “Wrong” guesses needed
quiz 24 20
jazz 22 19
jazzy 22 18
quaff 22 18
zinc 21 17
oak 20 17
vex 20 17
vox 20 17
foxing 22 16
foxed 21 16
queued 20 16
fuzzy 20 16
quay 20 16
pinup 20 16
fox 19 16
yuk 19 16
vaquero 22 15
jazzier 21 15
quizzed 21 15
hazing 21 15
favour 21 15
yoking 21 15
quays 20 15
quark 20 15
joked 20 15
guyed 20 15
foyer 20 15
bumph 20 15
huge 19 15
quip 19 15
gibe 19 15
rump 19 15
guan 19 15
quizzed 19 15
oaks 19 15
murk 19 15
fezzes 19 15
yuck 19 15
keno 19 15
kazoo 19 15
Download a longer list
(there’s plenty more which you’d expect to “win” with)

If you use this to give you an edge in your next game, let me know how it works out for you!

Update – 8 March 2019: fixed a broken link and improved the layout of the page.

× × × × × × × × ×

What’s Wrong With Monopoly?

Monopoly – the world’s best-selling board game – sucks. I’ve said it before, but it bears saying again. I’ve never made any secret of my distaste for the game, but it’s probably worth spelling out the reasons, in case you’ve somehow missed them.

Monopoly (British Edition) in its current branding
Monopoly (British Edition) in its current branding

Broadly-speaking, there are four things wrong with Monopoly: the rules, the theme, the history, and the players.

The Rules

The following issues have plagued Monopoly for at least the last 75 years:

  • It takes a disproportionately long time to play, relative to the amount of fun it provides or skill it tests. A longer game is not intrinsically more-exciting: would a 1000-square Snakes & Ladders be ten times as good as a 100-square one? Monopoly involves a commitment of three to four hours, most of it spent watching other people take their turns.
  • It’s an elimination game: players are knocked out (made bankrupt) one at a time, until only one remains. This invariably leads to a dull time for those players first removed from the game (compounded by the game length). In real-world play, it’s usually the case that a clear winner is obvious long before the game ends, leading to a protracted, painful, and frankly dull slow death for the other players. Compare this to strategic games like Power Grid, where it can be hard to call the winner between closely matched players right up until the final turns, in which everybody has a part.
  • It depends hugely on luck, which fails to reward good strategic play. Even the implementation of those strategies which do exist remain heavily dependent on the roll of the dice. Contrast the superficially-simpler (and far faster) property game For Sale, which rewards strategic play with just a smidgen of luck.
  • It’s too quick to master: you can learn and apply the optimal strategies after only a handful of games. Coupled with the amount of luck involved, there’s little to distinguish an expert player from a casual one: only first-time players are left out. Some have argued that this makes it easier for new players to feel like part of the game, but there are other ways to achieve this, such as handicaps, or – better – variable starting conditions that make the game different each time, like Dominion.
  • There’s little opportunity for choice: most turns are simply a matter of rolling the dice, counting some spaces, and then either paying (or not paying) some rent. There’s a little more excitement earlier in the game, when properties remain unpurchased, but not much. The Speed Die add-on goes a small way to fixing this, as well as shortening the duration of the game, but doesn’t really go far enough.
  • The rules themselves are ambiguously-written. If they fail to roll doubles on their third turn in jail, the rules state, the player much pay the fine to be released. But does that mean that they must pay, then roll (as per the usual mechanic), in which case must it be next turn? Or should it be this turn, and if so, should the already-made (known, non-double) roll be used? Similarly, the rules state that the amount paid when landing on a utility is the number showing on the dice: is this to be a fresh roll, or is the last roll of the current player the correct one? There are clarifications available for those who want to look, but it’s harder than it needs to be: it’s no wonder that people seem to make it up as they go along (see “The Players”, below, for my thoughts on this).
Calvin and Hobbes demonstrate exactly what's wrong with Monopoly, by demonstrating exactly what's wrong with Monopoly players. Click for the full comic.
Calvin and Hobbes demonstrate exactly what’s wrong with Monopoly, by demonstrating exactly what’s wrong with Monopoly players. Click for the full comic.

The Theme

But that’s not what Monopoly‘s about, is it? Its purpose is to instil entrepreneurial, capitalist values, and the idea that if you work hard enough, and you’re lucky enough, that you can become rich and famous! Well, that’s certainly not its original purpose (see “The History”, below), but even if it were, Monopoly‘s theme is still pretty-much broken:

  • It presents a false financial model as if it were a reassuring truth. “The Bank can never go bankrupt,” state the rules, instructing us to keep track of our cash with a pen and paper if there isn’t enough in the box (although heaven help you if your game has gone on long enough to require this)! Maybe Parker Brothers’ could have simply given this direction to those financial institutions that collapsed during the recent banking crisis, and saved us all from a lot of bother. During a marathon four-day game at a University of Pittsburgh fraternity, Parker Brothers couriered more money to the gamers to “prop up” their struggling bank: at least we can all approve of a bailout that the taxpayer doesn’t have to fund, I suppose! Compare this to Puerto Rico, a game which also requires a little thematic suspension of disbelief, but which utilises the depletion of resources as an important game mechanic, forcing players to change strategies in order to remain profitable.
  • Curiously, this same rule does not apply to the supply of houses and hotels, which are deliberately limited: the Monopoly world is one in which money is infinite but in which bricks are not. This makes it more valuable to build houses when there are few resources (in order to deprive your opponents). In actual economies, however, the opposite is true: houses are always needed, but the resources to built them change in value as they become more or less scarce. Watch the relative perceived values of the huts available to build in Stone Age to see how a scarcity economy can really be modelled.
The more houses I build on a street, the more each one is individually worth. Wait, what?
The more houses I build on a street, the more each one is individually worth. Wait, what?
  • Also, it has a completely-backwards approach to market forces. In the real world, assuming (as Monopoly does) a free market, then it is consumer demand that makes it possible to raise capital. In the real world, the building of three more hotels on this side of the city makes it less-likely that anybody will stay at mine, but this is not represented at all. Compare to the excellent 7 Wonders, where I can devalue my neighbour-but-one’s goods supply by producing my own, of the same type.
  • It only superficially teaches that “American dream” that you can get ahead in the world with a lot of work and a little luck: this model collapses outside of frontier lands. If you want to see what the real world is like, then wait until you’ve got a winner in a game of Monopoly, and then allow everybody else to re-start the game, from the beginning. It’s almost impossible to get a foothold in a market when there’s already a monopoly in existence. This alternative way of playing might be a better model for real-world monopolies (this truth is captured by the game Anti-Monopoly in a way that’s somehow even less-fun than the original).

You might shoot down any or all of these arguments by pointing out that “it’s just a game.” But on the other hand, we’ve already discovered that it’s not a very good game. I’m just showing how it manages to lack redeeming educational features, too. With the exception of helping children to learn to count and handle money (and even that is lost in the many computer editions and semi-computerised board game versions), there’s no academic value in Monopoly.

The electronic banking edition of Monopoly.
The electronic banking edition of Monopoly makes an already slow game even slower, unless you’re REALLY bad at arithmetic: in which case you should be playing with money so that you can learn some arithmetic!

The History

You’ve seen now why Monopoly isn’t a very good game both (a) because it’s not fun, and (b) it’s not really educational either – the two biggest reasons that anybody might want to play it. But you might also be surprised to find that its entire history is pretty unpleasant, too, full of about as much backstabbing as a typical game of Monopoly, and primarily for the same reason: profit!

You can think of a baby as a Monopoly piece, but I wouldn't recommend it.
You can think of a baby as a Monopoly piece, but I wouldn’t recommend it. Click for the full comic.

If you look inside the rulebook of almost any modern Monopoly set, or even in Maxine Brady’s well-known strategy guide, you’ll read an abbreviated version of the story of Charles Darrow, who – we’re told – invented the game and then published it through Parker Brothers. But a little detective work into the history of the game shows that in actual fact he simply made a copy of the game board shown to him by his friend Charles Todd. Todd, in turn, had played it in New Jersey, to which it had traveled from Pennsylvania, where it had originally been invented – and patented – by a woman called Elizabeth Magie.

A home-made 1920s "Landlord's Game" board.
Home-made “Landlord’s Game” boards, like this one, were popular in the early part of the 20th century.

Magie’s design differed from modern interpretations in only one major way: its educational aspect. Magie was a believer in Georgian economic philosophy, a libertarian/socialist ideology that posits that while the things we create can be owned, the land belongs equally to everybody. As a result, Georgists claim, the “ownership” of land should be taxed according to its relative worth, and that this should be the principal – or only, say purists – tax levied by a state. Magie pushed her ideas in the game, by trying to show that allowing people to own land (and then to let out the right of others to live on it) serves only to empower landlords… and disenfranchise tenants. The purpose of the game, then, was to show people the unfairness of the prevailing economic system.

Diagram from Lizzie Magie's 1904 patent application.
Lizzie Magie’s 1904 patent application shows a board with familiar features like streets for sale (which can then be rented out), stations, taxes, utilities, and the “public park” (free parking).

Magie herself approached Parker Brothers several times, but they didn’t like her game. Instead, then, she produced sets herself (and an even greater number were home-made), which proved popular – for obvious reasons, considering their philosophical viewpoints – among Georgists, Quakers, and students. She patented a revised version in 1924, which added now-familiar features like cards to mark the owned properties, as well as no-longer-used ideas that could actually go a long way to improving the game, such as a cash-in-hand “goal” for the winner, rather than an elimination rule.

An early boxed copy of Monopoly.
An early boxed copy of Parker Bros’ “Monopoly”.

Interestingly, when Parker Brothers first rejected Charles Darrow, they said that the game was “too complicated, too technical, took too long to play”: at least they and I agree on one thing, then! Regardless, once they eventually saw how popular Lizzie Magie’s version had become across Philadelphia, they changed their tune and accepted Darrow’s proposal. Then, they began the process of hoovering up as many patents as they could manage, in order to secure their very own monopoly on a game that was by that point already 30 years old.

Rich Uncle; a 1940s Parker Bros' game.
The “Rich Uncle” character, from the Parker Bros’ game of the same name, would eventually come to be the familiar mascot of Monopoly.

They weren’t entirely successful, of course, and there have been a variety of controversies around the legality and enforcability of the Monopoly trademark. Parker Brothers (and nowadays, Hasbro) have famously taken to court the makers of board games with even-remotely similar names: most-famously, the Anti-Monopoly game in the 1970s, which they alternately won, then lost, then won, then lost again on a series of appeals in the early 1980s: there’s a really enjoyable book about the topic, and about the history of Monopoly in general. It’s a minefield of court cases and counter-cases, but the short of it is that trade-marking “Monopoly” ought to be pretty-much impossible. Yet somehow, that’s what’s being done.

What’s clear, though, is that innovation on the game basically stopped once Parker’s monopoly was in place. Nowadays, Hasbro expect us to be excited when they replace the iron with a cat or bring out yet another localised edition of the board. On those rare occasions when something genuinely new has come out of the franchise – such as 1936’s underwhelming Stock Exchange expansion, it’s done nothing to correct the fundamental faults in the game and generally just makes it even longer and yet more dull than it was to begin with.

The Players

The fourth thing that I hate about Monopoly is the people who play Monopoly. With apologies for those of you I’m about to offend, but here’s why:

Firstly, they don’t play it like they mean it. Maybe it’s because they’ve come to the conclusion that the only value in the game is to waste time for as long as possible (and let’s face it, that’s a reasonable thing to conclude if you’ve ever played the game), but a significant number of players will deliberately make the game last longer than it needs to. I remember a game once, as a child, when my remaining opponent – given the opportunity to bankrupt me and thus win the game – instead offered me a deal whereby I would give him some of my few remaining properties in exchange for my continued survival. Why would I take that deal? The odds of my making a comeback with a total of six houses on the board and £200 in my pocket (against his monopoly of virtually all the other properties) are virtually nil, so he wasn’t doing me any favours by offering me the chance to prolong my suffering. Yet I’ve also seen players accept deals like like, masochistically making their dull pick-up-and-roll experience last even longer than it absolutely must.

Burning money on a Monopoly board.
Kill it. Kill it with fire. Image courtesy Daniela Hartmann.

Or maybe it’s just that Monopoly brings out the cruel side of people: it makes them enjoy sitting on their huge piles of money, while the other players grovel around them. If they put the other players out of their misery, it would end their fun. If so, perhaps Lizzie Magie’s dream lives on, and Monopoly really does teach us about the evils of capitalism: that the richest are willing to do anything to trample down the poorest and keep them poor, so that the divide is kept as wide as possible? Maybe Monopoly’s a smarter game than I think: though just because it makes a clever point doesn’t necessarily make a board game enjoyable.

It’s not that I’m against losing. Losing a game like Pandemic is endless fun because you feel like you have a chance, right until the end, and the mechanics of games like Tigris & Euphrates mean that you can never be certain that you’re winning, so you have to keep pushing all the way through: both are great games. No: I just object to games in which winning and losing are fundamentally attached to a requirement to grind another person down, slowly, until you’re both sick and tired of the whole thing.

Monopoly for the Sega Master System.
Nowadays, with computerised Monopoly games, you don’t even have to have friends to play. Which is great, because if you’re suggesting a game of Monopoly, you don’t deserve any.

The second thing that people do, that really gets on my nerves, is make up the damn rules as they go along. I know that I spent a while further up this page complaining that Monopoly’s rules are pretty awful, but I can still have a rant about the fact that nobody seems to play by them anyway. This is a problem, because it means that if you ever play Monopoly with someone for the first time, you just know that you’re setting yourself up for an argument when it turns out that their crazy house rules and your crazy house rules aren’t compatible.

House rules for board games are fine, but make them clear. Before you start the game, say, “So, here’s the crazy rule we play by.” That’s fine. But there’s something about Monopoly players that seems to make them think that they don’t need to. Maybe they assume that everybody plays by the same house rules, or maybe they don’t even realise that they’re not playing by the “real” rules, but it seems to me that about 90% of the games of Monopoly I’ve been witness to have been punctuated at some point by somebody saying “wait, is that allowed?”

Free Parking
The “Free Parking Jackpot” is probably the worst house rule for Monopoly that’s ever been invented. But it’s incredibly popular.

Because I’m a bit of a rules lawyer, I pay attention to house rules. Free Parking Jackpot, in which a starting pile of money – plus everybody’s taxes – go in to the centre of the board and are claimed by anybody who lands on Free Parking, is probably the moth loathsome house rule. Why do people feel the need to take a game that’s already burdened with too much luck and add more luck to it. My family used to play with the less-painful but still silly house rule that landing exactly on “Go!” netted you a double-paycheque, which makes about as much sense, and it wasn’t until I took the time to read the rulebook for myself (in an attempt, perhaps, to work out where the fun was supposed to be stored) that I realised that this wasn’t standard practice.

Toothpaste For Dinner comic: World's Worst Boardgame.
Toothpaste For Dinner has the right idea. Click through to the original comic.

Playing without auctions is another common house rule, which dramatically decreases the opportunity for skillful players to bluff, and generally lengthens the game (interestingly, it was a house rule favoured by the early Quaker players of the game). Allowing the trading of “immunity” is another house rule than lengthens the game. Requiring that players travel around the board once before they’re allowed to buy any properties is yet another house rule that adds a dependence on luck and – yet again – lengthens the game. Disallowing trading until all the properties are owned dramatically lengthens the game, and for no benefit (why not just shuffle the property deck and deal it out to everybody to begin with: it’s faster and achieves almost the same thing?).

I once met a family who didn’t play with the rule that you have to spend 10% extra to un-mortgage a property, allowing them to mortgage and un-mortgage with impunity (apparently, they found the arithmetic too hard)! And don’t get me started on players who permit “cheating” (so long as you don’t get caught) as a house rule…

Spot something in common with these house rules? Most of them serve to make a game that’s already too long into something even longer. Players who implement these kinds of house rules are working to make Monopoly – an already really bad game – into something truly abysmal. I tell myself, optimistically, that they probably just don’t know better, and point them in the direction of Ticket to Ride, The Settlers of Catan, or Factory Manager.

But inside, I know that there must be people out there who genuinely enjoy playing Monopoly: people who finish a game and say “fancy another?”, rather than the more-rational activity of, say, the clawing out of their own eyes. And those people scare me.

Further Reading

If you liked this, you might also be interested in:

× × × × × × × × × ×

Non-transitive Games

Non-transitive dice

Have you ever come across non-transitive dice? The classic set, that you can get in most magic shops, consists of three different-coloured six-sided dice:

A "Grimes" style set of 3 non-transitive dice. Notice the unusual numbering.
A “Grime’s” style set of 3 non-transitive dice. Notice the unusual numbering.

There are several variants, but a common one, as discussed by James Grime, involves one die with five “3” sides and one “6” side (described as red below), a second die with three “2” sides and three “5” sides (described as green below), and a third die with one “1” side and five “four” sides (described as blue below).

They’re all fair dice, and – like a normal six-sided dice – they all have an average score of 3.5. But they’ve got an interesting property, which you can use for all kinds of magic tricks and gambling games. Typically: the red die will beat the green die, the green die will beat the blue die, and the blue die will beat the red die! (think Rock, Paper, Scissors…)

Red beats Green beats Blue beats Red.
Seemingly paradoxically, the dice will generally beat one another in a circular pattern.

If you want to beat your opponent, have them pick a die first. If they pick green, you take red. If they take red, you take blue. If they take blue, you take green. You now have about a 60% chance of getting the highest roll (normally you’d have about a 33% chance of winning, and a 17% chance of a draw, so a 60% chance is significantly better). To make sure that you’ve got the best odds, play “best of 10” or similar: the more times you play, the less-likely you are to be caught out by an unfortunate unlucky streak.

But if that doesn’t bake your noodle enough, try grabbing two sets of nontransitive dice and try again. Now you’ll see that the pattern reverses: the green pair tends to beat the red pair, the red pair tends to beat the blue pair, and the blue pair tends to beat the green pair! (this makes for a great second act to your efforts to fleece somebody of their money in a gambling game: once they’ve worked out how you keep winning, give them the chance to go “double or nothing”, using two dice, and you’ll even offer to choose first!)

Double Red beats Double Blue beats Double Green beats Double Red
When you pair up the dice, the cycle reverses! While red beats green, double-green beats double-red!

The properties of these dice – and of the more-exotic forms, like Oskar van Deventer’s seven-dice set (suitable for playing a game with three players and beating both of your opponents) and like the polyhedral varieties discussed on Wikipedia – intrigue the game theorist and board games designer in me. Could there be the potential for this mechanic to exist in a board game? I’m thinking something with Risk-like combat (dice ‘knock out’ one another from highest to lowest) but with a “dice acquisition” mechanic (so players perform actions, perhaps in an auction format, to acquire dice of particular colours – each with their own strengths and weaknesses among other dice – to support their “hand” of dice). There’s a discussion going on in /r/tabletopgamedesign

I’ve even written a program (which you’re welcome to download, adapt, and use) to calulate the odds of any combination of any variety of non-transitive dice against one another, or even to help you develop your own non-transitive dice sets.

Penney’s game

A coin being flipped.
Heads or tails? Image courtesy David M. Diaz.

Here’s another non-transitive game for you, but this time: I’ve made it into a real, playable game that you can try out right now. In this game, you and I will each, in turn, predict three consecutive flips of a fair coin – so you might predict “tails, heads, heads”. Then we’ll start flipping a coin, again and again, until one of our sequences comes up. And more often than not, I’ll win.

If you win 10 times (or you lose 20 times, which is more likely!), then I’ll explain how the game works, so you know how I “cheated”. I’ll remind you: the coin flips are fair, and it’s nothing to do with a computer – if we played this game face-to-face, with a real coin, I’d still win. Now go play!

× × ×

Edinburgh 2012 – Day Four

For our fourth day at the Edinburgh Fringe, Ruth, JTA and I decided to take a little break from the rushing-around-to-comedy-shows game and get out and see the sights. Ruth had somehow acquired a somewhat romantic idea of nearby Leith: that it would be full of quays and boats and suchlike, and not – as we would come to discover instead – full of rain and a foul-smelling burst sewer pipe.

Self-important seagull sits solemnly, soaked, surveying South.
Self-important seagull sits solemnly, soaked, surveying South.

We started with breakfast from Snax Cafe, under Matt‘s recommendation, which turned out to be a good one, as this tiny greasy spoon/takeaway turns out to serve a fantastic selection of fried foods ready-to-eat at great prices. I opted for a fried egg sandwich, with which I quickly made a mess of my t-shirt and shorts when I accidentally spilt the yolk all over myself.

Ruth and JTA trudge through the wet suburban streets of Leith.
Ruth and JTA trudge through the wet suburban streets of Leith.

A combination of the weather quickly turning against us, Leith being significantly further away than it first appeared on a map, and the three of us still being remarkably tired since the previous day turned this expedition into a far more arduous affair than we had initially expected. By the time we’d reached the pretty little boats and bars of the waterfront, we were damp (admittedly, we’d all but JTA underdressed for the excursion: his overcoat helped protect him, but it had the side-effect of making him look like a flasher, his bare legs poking out from under it).

Ruth and Dan playing Scrabble[TM] in a pub in Leith.
Ruth and Dan playing Scrabble[TM] in a pub in Leith.
We escaped from the weather just as it began to get sunnier again, into a pub called the Teuchter’s Landing, which Ruth had discovered earlier during her research into the area. There, we drank beer and played some of the boardgames made available by the pub: Scrabble™ (at which I scored abysmally low, for which I partially blame rotten luck on draw after draw: my final hand – representative of my fortunes – was R-R-R-L-L-U-O; my starting hand contained only one consonant), the Who Wants To Be A Millionare boardgame (which took a significant amount of sorting to put it back into a working order, and in which we had to work around some missing pieces), and a few hands of Knockout Whist (with the most static-electricity-inducing deck of cards I’ve ever encountered: almost impossible to deal without giving each player four or five cards at the same time).

(Veggie) haggis stovie (in a mug), a bowl of oatcakes, and a pint of beer.
(Veggie) haggis stovie (in a mug), a bowl of oatcakes, and a pint of beer. Is there a better lunch? The shiny white thing is my new phone: oh yeah, I have a new phone. the old one broke. I should probably do a blog post about that rather than just mentioning it in the caption of a picture of an unrelated post, shouldn’t I? I’ll try to remember to do so.

The food was good, though: we lunched upon freshly-made haggis stovies, served in mugs, with chunky chips (in further mugs) and oatcakes. And when we were done, and set out into the world again to explore the waterfront… that’s when it began raining again, even harder than before. Fucking marvellous.

JTA and Dan by the waterside in Leith.
JTA and I by the waterside in Leith. For some reason, at this point, a whole queue of Three Rings clients decided to phone me (about unrelated things), in a row, so in most of the photos I seem to be on the telephone.

By the time we’d worked our way around the docks, we were damp and tired, so we found a bus to take us back to Princes’ Street, cut across to a cheesemonger in Grassmarket to stock up on delicious cheeses, and then returned to the flat for a quick nap, because we were all pretty pooped.

Ruth aims a harpoon.
Ruth aims a harpoon. I’m not sure what she’s hoping to hit from here: it’s too rainy for whales. Whales hate the rain, right? Everybody knows that.

Later, we went out for another helping of Peter Buckley Hill and Some Comedians. Being Tuesday – the day before Buckers’ day off – and close to the end of the Fringe, he was clearly exhausted, and kept digressing from the usual (awesome) shite to random stream-of-consciousness new shite. Still all funny, and some enjoyable guests.

And then we slept. A lot.

× × × × × ×

Three Parties

I’ve had a few weekends fully of party. It’s no wonder I’m knackered.

Andy’s 30th

First, there was Andy‘s 30th birthday. Ruth, JTA and I slogged our way over to Cardiff to celebrate in style with pizza, booze, and dancing.

Dancing to Black Lace at Andy's 30th birthday.
Dancing to Black Lace at Andy’s 30th birthday.

Siân‘s got more to say on the subject, but suffice it to say this: it’s been a long, long time since I’ve found myself dancing in a nightclub until half past two in the morning, then grabbing a thoroughly disgusting-looking (but remarkably good-tasting) portion of fried food as an after-club snack. Oh, and Alec drooled all over himself long before he ended up sharing a bed with me.

Honestly, I didn’t think I had it in me to party like that any more: I’m such an old man (having myself turned thirty a good year and a bit prior). Didn’t stop me from getting up before anybody else the following morning for a quick geocaching expedition, though…

Summer Party On Earth

The following weekend was the Summer Party On Earth: an event that started out with Ruth saying “Let’s have a summer party!” and finished as a nostalgia-themed marathon of epic proportions.

This… was a party with everything. It had kids’ toys like Brio wooden railway, Lego bricks, and a marble run; it had soup and buffets and a barbeque and cakes; it had board games and party games and drinking games; it had beer and wine and cocktails; it had the world’s tiniest and most-nettley geocaching expedition… and from the time that we first started entertaining guests to the moment that the last of them left, it lasted for an exhausting 36 hours.

Some early guests play Ca$h 'N' Gun$, a live-action game of gun-toting gangsters.
Some early guests play Ca$h ‘N’ Gun$, a live-action game of gun-toting gangsters.

It was particularly interesting to get together with people from all of our varied social circles: workmates, former workmates, local friends, distant friends, partners of friends… all kinds of random folks coming to one place and – for example – pointing foam guns at one another.

Gareth, Rory and Adam put the finishing touches on their (second) wooden railway layout.
Gareth, Rory and Adam put the finishing touches on their (second) wooden railway layout. I’m pretty sure we ‘lost’ them for more than half of the party as they disappeared into the ‘playroom’.

In order to help us identify, classify, and dispose of some of the vast collection of booze that Ruth has recently inherited, JTA invented a drinking game. What can I say about it? Well: it certainly brought us all a lot closer together to suffer through some of the drinks we were served…

Everything seems a little blurry, and Alec isn't grimacing as much as he did with some of the other drinks he's been forced to try.
Everything seems a little blurry, and Alec isn’t grimacing as much as he did with some of the other drinks he’s been forced to try.

As usual for any party at which Ruth caters, everybody was required to consume their own weight in (delicious, delicious) desserts, and we only just finished eating the very last of the party food, almost two weeks later.

Matthew & Katherine’s Wedding

Finally, then, just the weekend after that, was the wedding of two folks I know via the Oxford Quakers: Matthew and Katherine.

Matthew and Katherine cut the cake in the garden of the Quaker Meeting House.
Matthew and Katherine cut the cake in the garden of the Quaker Meeting House.

I turned down the curious “What to expect at a Quaker wedding” leaflet as I entered: after all, I felt like an old-hand now, after helping make Ruth & JTA’s wedding into one of the most spectacular events ever. Well, maybe I shouldn’t have, because every wedding is as different as every bride and groom, and Matthew and Katherine’s was no exception. They’d clearly put so much thought into exactly what it is they wanted to do to celebrate their special day, and – with their help of their friends and family – had pulled everything together into a beautiful and remarkable occasion.

The céilidh. More weddings should have cèilidhean.
The céilidh. More weddings should have cèilidhean.

For me, particular highlights included:

  • One of the most adorable couples ever.
  • Not just a “vegetarian-friendly” meal, but one where vegetarianism was the norm (and guests were required to state if this wasn’t okay for them).
  • Catching up with folks who I don’t see as much of these days as I might like (and meeting new people, too).
  • A céilidh! More weddings should have these (although it’s the first time I’ve ever seen a “first dance” where the bride and groom were given instructions on what steps to do right before the music started).
× × × × ×