The daily puzzle I built out of a 19th-century theorem

Juan Miguel Cespedes Naveros · Leer en español

Years ago I read an article about why Dobble works, the card game where any two cards you pull share exactly one symbol. The first thing I tried to build out of it was a liminal-style game: you walk through rooms and have to spot the object that has gone missing, or the one that is there twice. I could not get it to work, so I let it go.

This summer a friend asked what ideas I had running, and it came back as something else. An alchemist taking commissions, filling them with materials that hold certain essences, working out by trial and error which material carries what. And then, late, the idea that stuck: that the whole thing might be a sudoku-shaped puzzle with gaps to fill in. That is where Grimoku came from.

The structure underneath Dobble is a finite projective plane. That mathematics was settled in the eighteen hundreds, long before anyone had a machine to check it on. Here's what happened when I put it on a board.

A geometry where nothing runs parallel

TL;DR: the board is an old piece of mathematics written out as a table, and the three rules the game puts on screen turn out to be enough to rebuild that table from nothing. This section is the mathematics, and if you came here from the game it is the part that gives it away. Skip to how it becomes a board if you would rather get on with playing.

Think back to geometry at school, points and lines. One rule always holds. Pick two points and there is a line through both of them, and only one.

Lines have a similar rule, except it breaks. Two lines nearly always cross at a point. But a pair of parallels never touches, however far you extend them. So you cannot say "any two lines cross at a point", because the parallels ruin it.

It turns out there are geometries where that does not happen. They have no parallels in them, and any two lines always cross at a point. They are called projective geometries, and the idea comes from perspective. Think of a railway track. On the ground the rails are parallel, but when you draw them on paper they close in on each other until they touch at a point on the horizon.

There are many different projective planes. The one the books reach for first is built out of the ordinary plane, an endless sheet that keeps going in every direction. To that sheet you add new points out on the horizon. Every family of parallel lines gets a point of its own, where they finally all meet, like the rails in the drawing. And those new points, taken together, make up one more line, the line at the horizon.

But there are also finite projective planes. Finite means just that, a set number of points and a set number of lines, the whole thing fits in one drawing and there is nothing outside it. Even so, no parallels are left in there either, and any two lines still cross. Those were the ones I wanted.

You have probably got one in a drawer, because Dobble is exactly that. The cards are the lines and the symbols are the points. Saying that two cards share exactly one symbol is the same sentence as saying that two lines meet at exactly one point. Eight symbols to a card, 57 different symbols in the game, and the geometry allows 57 cards, though the deck they sell you holds 55.

That is one of the big ones. The smallest worth looking at is the Fano plane. Seven points and seven lines, and that is the whole world. Every line holds exactly three of the points and every point sits on exactly three of the lines. Then there is the rule everything else hangs off, that if you pick any two points there is exactly one line through both, not two and not none.

Seven points joined by seven lines: the three sides of a triangle, three lines to the centre, and a circle. 12 34 56 7
The seven points, and the seven lines through them: three sides, three lines to the middle, and the circle. Count any line and you get three dots. Count the lines meeting at any dot and you get three. Take points 2 and 6, or 1 and 5, or any other pair you like, and exactly one line runs through both.

The circle is the part that trips everyone up. If this is about lines, what is a round one doing there?

The answer is that "line" here does not mean a straight stroke. A line is a group of three points that belong together, and that is all it is. This geometry does not measure distance or angles, and above all it cannot tell straight from curved. The only thing it cares about is which points go with which.

The drawing is just a way of putting the seven points on a page so you can see them all at once, and something curious happens there, because this system cannot be drawn with seven straight strokes. However you place the points, one of the lines always has to be drawn curved, and in the usual drawing that one is the circle. As far as the geometry is concerned, the circle is simply the line that joins 2, 3 and 5, the same as the bottom side is the one that joins 4, 5 and 6.

Gino Fano wrote the geometry down in 1892. The combinatorics is older, because Thomas Kirkman had already worked out in 1847 exactly which sizes such a system of triples can have, and at seven points there is only one of them, up to relabelling. Both men were doing pure mathematics. Neither had any reason to think about a grid you tap at on a phone.

From geometry to a grid

Here is the step that turns it into a game. Throw the drawing away and just write down who touches what. Number the seven points across the top, give every line a row of its own, and put a check wherever that line runs through that point.

The same seven points, with the line along the bottom picked out. 12 37 456 The same seven lines written as a grid of seven rows, with that line's row picked out. 123 7 456
One line, one row. The line along the bottom runs through points 4, 5 and 6, so its row is checked in those three columns and blank everywhere else. Do that seven times and the drawing has nothing left to say.

Mathematicians call that table the incidence matrix. For the Fano plane it is 7 by 7, with three checks in every row and, because each point sits on three lines, three in every column too.

So I hid the geometry and handed the player the grid. The materials and the essences were already sitting there from the alchemist, so rows became materials, columns became essences, and a check means the two belong together. You never see a point or a line. You see a board, and three rules:

Some cells start filled in. Your job is the rest.

Three rules and a single solution

Here's the fact that convinced me this could be a game. Those three rules do not just describe the Fano plane, they force it.

A 7 by 7 grid of checks where the rows and columns each hold three, and every pair of rows overlaps in exactly one spot, cannot be anything other than the Fano incidence matrix. Only one such object exists, up to relabeling. It is the unique 2-(7,3,1) design, and the three plain rules I put on screen are enough to pin it down completely.

For a puzzle designer this is a gift. Every board I ship is that one object with its labels shuffled, so the answer a player is walking toward was fixed by a theorem rather than by my testing. What I still have to check is the other half, that the cells I leave behind are enough to get them there. The player never needs to know any geometry. They follow three rules a child could read, and the deduction leads them to the one board that satisfies them. No guessing is ever required, and none is ever allowed. Every decent puzzle in this genre makes that promise. Here I don't have to keep it by hand, because the math keeps it for me.

The secret I don't tell players

The plane obeys one property beyond the three rules, and I keep it off the rules card on purpose. The hardest boards are built so you cannot finish them until you notice it yourself.

I won't spell it out here, because watching people find it has been the best part of the whole project. A tester goes quiet, stares at the board, and then something clicks and they solve the rest in a rush. One of them found it, and every hard board after that fell faster. That moment of discovering a law nobody told you is the thing I am really building. The geometry just makes it possible.

The closest I came to giving it away was a tester's own idea. They sent me a cleaner way to word rule three, and they were right, it reads better than mine and I have thought about it since. The trouble is that their wording is correct, and that is exactly why I cannot use it. Anyone who reads it walks off with the whole property in one sitting, without having played a single board. So I am keeping mine, which is clumsier but guards the secret better.

I got difficulty wrong

Every logic puzzle looks like it has an obvious difficulty knob. Take clues away, make it harder. I shipped that, and it doesn't work.

I measured it eventually, and a board I had labelled Master turned out to be trivial about twelve percent of the time, so the label told you nothing about what you were walking into. This grid also has a floor, because if you strip past about a dozen given cells there is no unique answer left to find, so the knob runs out before the board ever gets hard. Harder is not the same as emptier. What makes a board hard is the kind of reasoning it demands of you.

So I threw the clue counter out and wrote a solver that reasons like a person. It starts with the easy moves and only reaches for a harder technique when it gets stuck, and a board's label is the hardest one it needed to finish. Generation runs backwards. The program builds a valid board and strips it down, checking after every cut that the answer is still unique and that pure logic still gets you there. Boards that miss the tier I asked for get thrown out.

My favourite part of doing it this way is that each tier teaches you another way of looking at the grid. Apprentice only needs counting, because once a row has its three marks, everything left in that row is a cross. Adept turns it around on you, and you have to see that a mark has only one gap left it can go in, with nothing pointing at it. And Master has no way through without the property I am not talking about. Every tier assumes you are carrying the one before it.

That last one took a correction I did not see coming. A Master board could be ground out by trial, which means putting a mark down to see what happens, then another, then another, until something breaks and you know the first one was wrong. That is legitimate deduction and often it is all you have, but it feels closer to doing the books than to finding anything.

Measuring it was a bad afternoon. Out of thirty-four Master boards, thirty-one gave way to that grind, and the player never had to learn there was a property underneath at all. Meanwhile a player who had found it was still running those same trials up to thirteen times a board, so the discovery bought them very little. The tier was broken from both ends.

Those boards go in the bin now. The Master boards I publish open all the way up the moment you have the property, with no trial at all, and without it they stall on you half finished.

Why a daily

The fun of doing puzzles these days, on a phone and online, is that you can share them, with someone on the other side of the world or with the friends you already have. So there is one board a day and everyone gets the same one, and you can also send a friend a board of their own to see who gets it out faster. Miss a day and the last thirty are still sitting there.

As far as I know no other puzzle uses this mechanic, and that brings us back to Dobble. The structure is the same, but in Dobble the design is already built and you only have to spot a match inside it, and here you have to work the whole thing out.

I wanted it free and with no ads, now and later on, because I want you playing without anything in the way. I hope that turns out to be the right call.

Who's behind it

I have been making games for about fifteen years, mostly mobile and casual, and I publish Unity tools as Creative Spore. Grimoku got built because the idea wouldn't leave me alone. And because I wanted to see whether a nineteenth-century theorem can become a habit.

I did not do it on my own, though. Friends and family have sat through half-finished versions and been blunt about what made no sense. A lot of their ideas and their advice were better than mine, and they are still in there. If something you see strikes you as a good call, there is a fair chance it was not mine. Thank you, all of you.

Today's board is waiting, and everyone gets the same one.

Play Grimoku