Solving the sudoku

I know you were eager to taste some source code, so here you have a first version of the solver.
To try it, just follow the steps described in the post below (PIC Simulator, Assembler, Assemble & Load, Run).

To verify it works, you take a look at the status of the GPRs, and if you remember what was said here, you’ll know if it has properly solved the sudoku or not.

The sudoku it solves is defined by the few hundred lines of code enclosed in the region ’sudoku input’.
If you want to try another sudoku, just do what needs to be done.

This is a first version of the solver, and managed to solve ‘very easy’, ‘easy’, ‘medium’ and some ‘hard’ sudokus of those at this site. It did solve an ‘expert’ one , too. We are currently working on an improved version.

The following flowchart shows the strategy the program uses in order to solve the sudokus:

Leave a Reply