Sudoku Solver

Back to Java Applets

I wrote this program as an exercise in recursion, but became much more interested in the prospect of making a nice interface that you can actually use to cheat effectively at Sudoku.


The program starts with a preset sudoku board. You can watch it solve by clicking the "solve" button. You can also create your own setup in two ways.

First, you can click directly on the board and type in new numbers. This will immediately undo any progress that the solver has made in updating the board.

Second, you can paste a complete Sudoku puzzle directly into the text box on the top right. Simply enter a combination of numbers, spaces or dots, and line breaks, then click the "update" button. The text box corrects itself automatically, so you can't enter an invalid combination of characters.

The best use of the text box is to save puzzles that you found interesting, so later you can copy in the text version of a puzzle you have already tried.

If you find that a solution is proceeding too slowly, click the drop box and change the speed. The values are not precisely accurate at high speeds; 1000 frames per second simply means "do one step and then sleep for one millisecond." The maximum speed runs 1000 frames before updating the screen.

Updated 6/14/2008

Back to Java Applets