Please wait
Loading technology simulations
The requested content is still loading.
Finished experimenting?
Save one completion to this browser's signed guest ledger, or directly to your account when signed in.
Please wait
Loading technology simulations
The requested content is still loading.
Save one completion to this browser's signed guest ledger, or directly to your account when signed in.
1solve(board):2 if no empty cell: solved3 pick empty cell with the FEWEST legal digits4 for each legal digit v there:5 board[cell] = v; if solve(): return true6 board[cell] = 0 // backtrack7 return false
This Sudoku simulator turns the familiar puzzle into a backtracking-search visualizer. Press Solve and watch the algorithm pick the most-constrained empty cell (the minimum-remaining-values heuristic), place a legal digit, recurse, and undo choices at dead ends — the same constraint-satisfaction backtracking behind N-Queens, on a grid everyone knows. A search-space card contrasts the astronomical brute-force count (9 to the power of the empty cells) with the few hundred cells the pruned search actually visits. Switch to Solve-It-Yourself and the puzzle becomes playable: click an empty cell, tap a digit, and any clash within the same row, column, or 3x3 box lights up red instantly, with a celebration when every unit holds 1-9. Three difficulties show how sparser clues force more backtracking.
sudoku solver · backtracking · constraint satisfaction · minimum remaining values · search tree pruning · recursion · exact cover
Browse all Technology simulations →
Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.