|
Sudoku v2.2
My nephew Ryan got me hooked on Sudoku when he showed me his book that he was bringing on
a
cruise in March 2006. It seems to be the "Rubik's Cube of the 21st century." The Sudoku puzzle consists of a 9x9 grid of squares with some of the
digits 1 through 9 dispersed throughout parts of the grid. The object is to place the
digits 1 through 9 in all the other empty squares so that each row,
column, and 3x3 sub-grid has the digits used exactly once. Since
people use logic to systematically solve this puzzle, I figured that
this puzzle would be a good project to program into the computer. I
had been learning Visual Basic .NET 2003 during the previous month
and needed a good project to put into practice the principles I had
been learning. After 24 hours, I was able to put together a
functional version of the Sudoku game. For the next two weeks, I
had enhanced it to be a fully functional game with a
graphical user interface. It also serves as a tool to solve the puzzle
and was able to solve all but the hardest puzzles. As of 4/19/06, I have upgraded the program to use Visual Basic
.NET 2005, thus the program became version 2.0 with some additional
enhancements. As of version 2.1, released on 4/27/06, the program is
now able to solve all puzzles and deliver a step-by-step solution with
strategies for the user! For most puzzles, the program will solve it within
a second. For the hardest puzzles in the world, the program will take a few
minutes, but it will also warn the user ahead of time if it will take a few
moments to solve the puzzle. Version 2.2 was released on 6/29/06, and it
performs an additional strategy of "guessing" between two possible digits
for a cell, after all logical means have been exhausted. If the puzzle is
still not solved, the program uses the author's original Brute Force method
of permuting all possible digits in all cells. With the additional guess
strategy, a vast majority of really tough puzzles can be solved in only one
second. An image of the program's
interface with a sample puzzle is shown below:

To install the program and run it on your machine, click this
link to install Sudoku v2.2 (180 KB).
Note: You will need to have .NET Framework 2.0 on the machine.
You can
install 2.0 from Microsoft
(22 MB) (Microsoft .NET Framework Version 2.0 Redistributable
Package (x86))
The Sudoku program will come with only 6 sample puzzles (two that are easy and
two that are quite tricky and two that are really tough).
A seventh puzzle can be selected that allows the user to enter your own
puzzle to play or solve.
Further puzzles can be loaded using the File menu option, if the puzzle text
files have been provided.
Further updates will be made to the program. It is interesting
and challenging to improve the program.
Favorite Sudoku Links:
Wikipedia Sudoku:
http://en.wikipedia.org/wiki/Sudoku
Wikipedia Mathematics of Sudoku :
http://en.wikipedia.org/wiki/Mathematics_of_Sudoku
Sudoku Forum of programmers:
http://www.setbb.com/phpbb/viewforum.php?f=3&mforum=sudoku
Sudoku Forum (General):
http://www.setbb.com/phpbb/index.php?mforum=sudoku
Sudoku Champions (contests):
http://www.sudokuchampions.com/
Mathematical proof of total number of valid Sudoku grids:
http://www.afjarvis.staff.shef.ac.uk/sudoku/
(Total number of valid Sudoku grids is approximately
6.7 x 10^21, or 6.7 sextillion -- plenty of puzzles to solve)
Sudoku web site (of Wayne Gould who popularized the game):
http://www.sudoku.com
Return to Doug & Marsha's Home Page
Page was last updated on
June 29, 2006
|