Behind the game

One Puzzle, One Solution: How This Game Builds Fair Sudoku Puzzles

Every puzzle you play is created on the spot. This is how it is built, why it has exactly one solution, and some of the maths behind that.

Published October 27, 20262 min read

Every puzzle in Sudoku — Premium Edition is created when you start it. There is no fixed list of puzzles to run out of. Here is how a puzzle is built, and why each one has exactly one solution.

Step 1: Build a Complete Grid

The game starts with an empty grid and fills it one cell at a time. It tries digits in random order and backtracks when it reaches a dead end: if no digit fits a cell, it steps back and tries a different digit for the previous cell. The result is a complete, valid grid where every row, column and box holds 1–9 once.

To keep the search fast, the game always fills next the empty cell with the fewest possible digits. This is the "most constrained first" idea, and it stops the search from wandering far down bad paths.

Step 2: Remove Clues

Next, the game removes numbers in random order. Removing a number is only kept if the puzzle still has exactly one solution. The target number of clues depends on the difficulty:

  • Easy: 46 clues
  • Medium: 36 clues
  • Hard: 29 clues

Step 3: Check for a Unique Solution

To check uniqueness, the game counts solutions. It stops counting as soon as it finds two, because one solution is enough to show the puzzle is ambiguous. If the count is two or more, the removal is undone and the game tries another cell.

Why Exactly One Solution Matters

A puzzle with two solutions would force you to guess. Making sure each puzzle has exactly one solution means every deduction you make is either correct or a mistake on your part, never a fair alternative.

Some Numbers Behind Sudoku

  • There are 6,670,903,752,021,072,936,960 valid completed Sudoku grids. This count was published by Felgenhauer and Jarvis in 2005.
  • Once you ignore relabeling digits and rotations or reflections of the grid, there are 5,472,730,538 structurally different grids.
  • The fewest clues a Sudoku puzzle can have and still have a unique solution is 17. Gary McGuire showed this in 2012 by checking the 16-clue cases by computer, and none of them had a unique solution.

What We Measured

We generated 3,000 puzzles with this method and ran each through a human-style solver. The results are in What Easy, Medium and Hard Really Mean.