Wrote an algorithm in Python that can quickly solve any sudoku puzzle. The program views the sudoku board as a Constrait Satisfaction Problem, and uses the AC3 algorithm to find a solution in an efficient manner. The algorithm also takes into account complications encountered on higher difficulty puzzles, such as the possible necessity of making a guess. The program has been run on some of the hardest sudoku puzzles on the internet, and it has always found the correct solution!
The user interface for solving sudoku puzzles was developed using WxPython. The user inputs into each text box the correct numbers for the start of the puzzle, and then clicks the “Solve Puzzle” button. The puzzle is generally solved almost instantaneously, and all filled in numbers are displayed in blue. If the puzzle is entered incorrectly, or is generally deemed unsolvable by the program, a message displays indicating that a solution can not be found. In order to solve more than one puzzle, a “Clear Grid” button will erase the board, allowing for new input.