This solver uses belief propagation (BP) — which is actually very close to how most people solve Sudoku in their head.
You look at a row, column, or 3×3 box (a constraint) and ask: given what I already know, which numbers are still possible in each empty cell? Every time you narrow down the possibilities in one cell, that information ripples into the other constraints that cell belongs to, which may narrow down further cells, and so on.
The algorithm does this systematically, cycling through all 27 constraints (9 rows + 9 columns + 9 boxes) until nothing more can be deduced. Humans do the same thing, just less methodically — jumping to whichever constraint catches their eye.
The difficulty indicator reflects the largest set of cells the algorithm had to consider together within a single constraint to make progress. Easy puzzles only need you to look at one cell at a time (“this is the only place a 7 can go”). Harder ones require reasoning about pairs or triples (“these two cells must contain 3 and 5 in some order, so no other cell in this row can be 3 or 5”).
Some Sudoku — typically labelled “fiendish” or “extreme” — cannot be solved by BP alone. The reason is that BP considers each constraint independently. In reality, constraints overlap and interact. By combining information from two or more constraints simultaneously, you can sometimes deduce things that no single constraint reveals on its own. BP cannot do this, so it gets stuck.
When this happens, solvers (human or machine) must resort to trial and error: hypothesise a value, follow the consequences, and backtrack if a contradiction appears. This is what makes fiendish puzzles feel qualitatively harder — it’s not just “more of the same” reasoning, but a fundamentally different kind of reasoning.
The exact same algorithm is used in telecommunications to decode LDPC codes (the codes used in 5G, Wi-Fi, and satellite TV). The constraints are different — parity checks instead of Sudoku rules — but the message-passing structure is identical. And the same limitation applies: some patterns of errors have a unique valid decoding, yet BP fails to find it because it would require combining constraints. This parallel between puzzles and engineering is one of the beautiful things about belief propagation.