SUDOKU SOLVER
This project implements a Sudoku solver. The solver iterates through several different approaches, such as going by row/column or panel rules. Once all approaches fail, the solver will find a cell with the least number of possible values (for example finding a cell that could only occupy 2 possible numbers), and will guess one of the possibilities. If at some point the solver reaches a dead-end or an invalid grid, it backtracks to the point when it guessed and guesses the next value. This recursive-backtracking approach is rarely called for standard-difficulty Sudoku puzzles, as the other methods are capable of finishing it on their own. The recursive guessing method has a fixed maximum depth to avoid a stack overflow.
The solver typically takes a few milliseconds to solve a Sudoku puzzle, but can take up to a second for really hard ones. It takes the solver around 2.5 seconds to solve the hardest Sudoku puzzle.
CONTROLS:
The solver typically takes a few milliseconds to solve a Sudoku puzzle, but can take up to a second for really hard ones. It takes the solver around 2.5 seconds to solve the hardest Sudoku puzzle.
CONTROLS:
- Left click on a cell to increment its number.
- Right click on a cell to decrement its number.
- Click 'SOLVE' to solve the Sudoku puzzle. The grid must have at least 17 present numbers to be solvable. If you click solve and nothing happens, then it's not solvable.
- Click 'CLEAR' to clear the grid.