This is a Sudoku puzzle solver. Populate the puzzle grid below with a Sudoku puzzle and press the 'Solve' button. The solver only currently works with 'valid' Sudoku puzzles (see here), which are puzzles with only a single, unique solution.

If you're looking for valid puzzzles, you can also load a generated puzzle with the buttons below.

This started as a frontend for a solver. I'm currently working on updating it to allow you to play a puzzle online.

How does this work?

The Solver

This is a React web client to a Java based AWS Lambda that solves Sudoku puzzles. The content of the grid is sent to the Lambda, and if there is a single, unique solution, it is returned and displayed in the grid.

The Solver uses my implementation of Donald Knuth's Algorithm X and Dancing Links implemented in Java, which you can find here.

The Puzzle Generator and Human Ranker

The puzzles are generated by a scheduled Lambda that runs a couple of times of day. The solver (above) is used to check that a puzzle is valid, only valid puzzles are kept. In order to rate the difficulty of the generated puzzles, another Lambda attempts to solve the puzzles using human approaches (not using the Algorithm X approach above), looking for naked and hidden singles (easy), pairs (medium), or if a puzzle can't be solved with either of those approaches then I'm currently defaulting those to hard.

The source for the generator is here, and the source for the human grader is here.