⚙️ How sudokus are made
By Miguel Arechaga
Ever wondered where sudokus come from? Does someone invent them by hand? How do they know there is a solution... and that it is unique? The process is a little marvel of logic, and knowing it even makes you a better solver.
Step 1: a full grid is generated
Every sudoku starts backwards from how you see it: first a completely filled, valid grid is built (81 cells obeying the rules). A computer does it in milliseconds, filling cells at random and backtracking whenever it hits a dead end. There are about 6,670 quintillion valid grids, so we will not run out of sudokus.
Step 2: cells are removed
From that full grid, numbers are removed one by one. And here lies the craft: after each removal something crucial must be checked...
Step 3: the solution must be unique
A proper sudoku has exactly one solution. If removing a cell leaves the puzzle with two or more possible solutions, that removal is undone and another cell is tried. That is why you sometimes find “broken” sudokus online where two numbers end up interchangeable: nobody checked uniqueness. Ours always do.
Step 4: difficulty is measured
Here comes the interesting part: difficulty does not depend on how many cells are removed, but on which techniques are needed to solve it. The generator solves the puzzle the way a person would: if scanning and singles are enough, it is easy; if it needs naked pairs, it is medium; if it forces X-Wing or chains, it is hard or expert. Two sudokus with the same number of empty cells can have opposite difficulties.
Fun facts
- The minimum number of clues for a classic sudoku to have a unique solution is 17 (mathematically proven in 2012).
- Rotating, mirroring or relabelling the digits of a sudoku produces “new” sudokus that are deep down the same one.
- Variants (killer, diagonal, kropki...) use the same process, adding their extra rules to the checks.
Now that you know what happens behind the scenes, every cell you solve tastes a little better. Test yourself with our 30+ sudoku variants.