Is guessing allowed in sudoku?
What a computer means by guessing, why it is not the same thing a person does, when a case split is legitimate reasoning, and what it means for a puzzle to require trial and error.
Nothing in the rules of sudoku forbids guessing. The rules say each digit appears once per row, column and box, and that is all. Guessing is not illegal — it is just a much worse tool than it looks, for reasons worth being precise about.
The confusion comes from the fact that computers solve sudoku almost entirely by guessing, and are extremely good at it. What a computer is doing and what a person does when they guess are not the same activity.
How a computer actually solves a grid
The standard algorithm is backtracking search. Find the empty cell with the fewest possibilities, try one of them, propagate the consequences, and continue. If you reach a contradiction, undo that choice and try the next possibility. If all possibilities fail, undo the choice before it as well.
The important properties are that the machine remembers the exact position before every choice, and that it is exhaustive. Nothing is ever lost by a wrong guess, because it can always return to precisely where it was. Given enough tries it will examine every possibility, so it cannot fail to find a solution if one exists.
Counting solutions works the same way with one change: instead of stopping at the first complete grid, the search keeps going. To verify uniqueness you never need the total, only whether it is one or more than one, so the count is capped at two and the search abandons the moment it finds a second solution. This is exactly what Sudoku - Calm Number Puzzle runs after every cell removal during generation.
Why a person guessing is doing something else
When a human guesses, none of those properties hold. You do not have a reliable snapshot of the grid before the guess — you have a page with a digit written on it, and by the time the contradiction appears, twenty more digits have been written on top of it. Unwinding to the exact prior state is difficult and error-prone.
Worse, the contradiction usually does not arrive quickly. A wrong digit can be consistent with everything for a long stretch, and its consequences spread through the grid quietly. When something finally breaks, you cannot tell whether the guess was wrong or whether you made an ordinary error afterwards.
So a person guessing is not running a search. They are gambling that the grid ends before the contradiction does. That gamble is the single most common way a nearly finished sudoku gets destroyed.
The legitimate version: a case split you finish
There is a form of hypothetical reasoning that is entirely sound, and experienced solvers use it constantly. The difference is that you do not commit to a branch — you evaluate all of them.
Take a cell with two candidates. Suppose it is the first. Follow the consequences until you either hit a contradiction or learn something. Then, without writing anything permanent, do the same for the second. Two useful outcomes exist:
- One branch produces a contradiction. Then that candidate is impossible, and you have proved the other one — this is a proof by contradiction, not a guess.
- Both branches force the same fact somewhere else. Then that fact is true regardless, and you can assert it without knowing which branch is real.
The second pattern is exactly what an XY-Wing is: the pivot is X or Y, and either way one of the pincers must be Z, so Z can be eliminated from the cells both pincers see. Every "wing" and chain technique is a packaged case split — a hypothetical that was carried through both branches instead of one.
The practical rule is simple. Reasoning about a hypothesis is fine; writing it into the grid and hoping is not. If you cannot hold both branches, restrict yourself to cells with exactly two candidates and keep the branches short.
Does any real puzzle require guessing?
It depends entirely on where the solver’s technique list stops. Every proper sudoku has a unique solution, and in principle every step can be justified by some chain of reasoning. But those chains can become long enough that a person following them is doing search with extra steps, and no fixed list of named techniques covers all of them.
So "requires guessing" really means "requires something outside the technique set we implemented". For a well-made puzzle graded by technique, that boundary is drawn deliberately. In this app, every level up to Hard is verified solvable inside its own band, so guessing is never required. Expert is the one band permitted to need trial and error, and even then the generator prefers a puzzle that pure logic can crack and only falls back when it cannot find one. The solution is still unique either way.
If you are guessing, something else is wrong
Reaching for a guess on a properly graded puzzle is a signal rather than a strategy. It usually means one of three things: you have not run the cheap techniques again since your last placement, you are missing one specific technique in the band, or there is already a wrong digit on the board and no deduction exists because the grid is broken.
Checking each row, column and box for a duplicate takes a minute and rules out the third. The first two are addressed by an ordered escalation, cheapest technique first, restarted after every placement.
Frequently asked questions
Do computers solve sudoku by logic or by guessing?
Mostly by guessing, in the form of backtracking search — try a candidate, propagate, undo on contradiction. It works because the machine can return to the exact prior state and can exhaust every branch. Some solvers run human techniques first as a speed-up, but the search is what guarantees an answer.
Is a puzzle that needs guessing badly made?
Not necessarily, but it is a poor experience below the top difficulty. It usually means the puzzle needs a technique the grader does not implement rather than that no reasoning exists. A grid genuinely lacking a unique solution is a different and more serious problem.
What is the difference between guessing and a case split?
A guess commits to one branch and continues. A case split evaluates every branch and only draws a conclusion that holds in all of them, or eliminates a branch that produces a contradiction. The first can wreck a grid; the second is ordinary logic.
Can I undo a bad guess?
On a phone, yes — an undo stack restores the board and the pencil marks, including the candidates cleared from peer cells. On paper you are reconstructing from memory, which is why paper guesses are so often fatal.
Try it on a real puzzle
Sudoku - Calm Number Puzzle grades every puzzle by the hardest technique it actually needs, verifies a single solution before you ever see the grid, and its hints name the technique instead of just filling in a digit. Free, offline, no ads and no account.