How sudoku puzzles are made

From a full grid to a puzzle with one solution, and why the level depends on logic, not on how many numbers you're given.

It starts with a finished grid

Every sudoku begins as a completed grid: all 81 squares filled so that each row, column and 3×3 box holds 1 to 9 once. A computer makes one by filling squares in a random order and backing up whenever it paints itself into a corner, which takes a fraction of a second. There are a lot to choose from: mathematicians counted 6,670,903,752,021,072,936,960 valid completed grids in 2005, or about 5.5 billion once you treat grids that are only relabeled, rotated or reflected copies of each other as the same.

The puzzle is what’s left after numbers are taken away. The art is in which ones, and how many.

Taking numbers away, two at a time

Our generator removes clues in pairs that mirror each other through the center of the grid, so a clue at the top left goes with one at the bottom right. That rotational symmetry is a tradition from printed puzzles: it doesn’t make a puzzle easier or harder, it just looks deliberate. Every pair is tried once, in a random order, and after each removal one question decides whether the pair stays out.

The question is: can the puzzle still be finished by logic alone, using only the techniques allowed for the level it’s meant to be? A logical solver, the same one that writes our hints, works it through. If it gets stuck, the pair goes back. That one check also keeps the puzzle fair: if logic can finish it step by step, it has exactly one answer, so you can never reason perfectly and still be told you’re wrong.

Each level also has a floor, a number of clues the generator won’t go below, so a Gentle puzzle keeps plenty of numbers to work from while Hard and Expert puzzles are pared down as far as their level allows. A puzzle that comes out easier than the level it was meant for is thrown away and made again. Before any puzzle is used, a separate solution counter, which tries every way to finish the grid and stops the moment it finds a second answer, checks once more that there is only one.

Fewer clues isn't the same as harder

It’s natural to think the number of clues sets the difficulty, but it’s only a loose guide. What makes a puzzle hard is the hardest single step you have to take. A puzzle with 25 clues can fall to simple singles all the way, while one with 30 can hide a step that needs an X-wing. That’s why our level is decided by the solver, not by counting.

There is a floor. In 2012, a team of mathematicians proved by an exhaustive computer search that no standard sudoku with 16 clues has exactly one solution: 17 is the minimum. Puzzles that sparse are rare and usually not especially hard; the hardest puzzles often have more clues than that.

How a level is decided

The hardest step a person needs.

To grade a finished puzzle, the solver works through it the way a careful person would, always trying the simplest technique first and moving to a harder one only when nothing simpler works. The puzzle’s level is the hardest technique it needed along the way. Because every technique only rules possibilities out, the simplest route through a puzzle is well defined, so the same puzzle always gets the same level. And if logic alone finishes the puzzle, that also proves it has just one solution.

LevelHardest technique allowedClues on a 9×9 board
GentleLast number left38 to 43
EasyOnly spot left32 to 37
MediumPointing, claiming, pairs and hidden pairs26 to 34
HardTriples, hidden triples, X-wings and XY-wingsas few as the level allows, often 22 to 33
ExpertSwordfish, XYZ-wings and coloringas few as the level allows, often 22 to 34
MasterXY-chains and forcingas few as the level allows

Each technique is explained, with a real example board, in how to solve sudoku.

Why the daily puzzles are the same for everyone

Sudoku Sunrise’s five daily puzzles are made well in advance, and every one is checked a second time before it’s used: solved again by logic and run through the solution counter again. Each day has a number, counted from the first day, and everyone who plays that day’s number gets the same five puzzles, which is what makes comparing times with friends fair. Smaller Mini 6×6 boards, with 2×3 boxes, are made the same way for a quick game.

Today’s set is free to play in your browser: today’s five puzzles.