Sudoku App

This is a little something I cooked up during second year at uni. My mother was complaining that her sudoku puzzles were too hard, and that she needed some help...

No Java Support.

The solver uses a brute force algorithm. For those not familiar with brute force algorithms, it basically goes from square to square and enters in any number which seems to work. When it comes across a square which doesn''t accept any number, it knows that it has gone wrong somewhere, so it backtracks and tries the next valid number, and does this on and on until it manages to find a solution.

The disadvantage of this is, of course, that it takes slightly longer when compared to the deductive methods that humans tend to use, though with computer hardware nowadays being what it is this is hardly noticable!

The advantage of this algorithm, however, is that a solution will be found no matter how hard the puzzle. There are various sudoku puzzles which can''t be solved via deduction and which require an element of ''guesswork'', but fortunately the brute force algorithm works entirely by guessing, so it will always eventually find a solution.

The plan is to ''upgrade'' this in the future. The code is very maintainable so it shouldn''t be too difficult to adapt it for, say, puzzles with more than nine boxes per row/column/box, and I would like to add support for different solving algorithms as well.

The corresponding java application is attached (with source included too).

Tags: