Kjetil's Information Center: A Blog About My Projects

Sudoku Solver in Curses

Once again I present a curses-based program. This time, it's a curses front-end for a set of sudoku solving algorithms that I developed.

The program tries to apply two different algorithms that will find unique solutions, and if both fail, it will start guessing. After a guess has been made, the two other algorithms will be applied again, and this may hopefully produce a solution. It is not as advanced as other solvers out there, so there is no guarantee that the sudoku will be solved. But I have been able to use it with success on many sudokus.

The user interface is fairly simple and is explained on the screenshot below. It is possible for the user to enter invalid numbers, and this will not be "detected" by the program. The result is just that the solving algorithms will fail.

Screenshot of sudoku solver in curses.


I have released the code under a MIT License here.

Topic: Open Source, by Kjetil @ 21/01-2012, Article Link