This is information on a free program to help solve Sudoku puzzles.
I have written a Java version of my Sudoku Code9 program.
I translated the C# statements into Java statements.
The Java version is in a jar file Code9.jar .
The current version is 2009.09.30.
First you download Code9.jar and save it.
Right click on this link above and do a
"Save Link As..." or "Save Target As...".
Then to run it you use the command:
java -jar Code9.jar
This will start it up.
something like this to start with an existing puzzle:
java -jar Code9.jar ..86.94..9.1.4...3..........4.78...9.73...61.1...63.7..........2...3.7.6..59.68..
There is also a C# version of the program.
I have written a program in C# (C Sharp) using
Microsoft Visual Studio 2008.
You can download the program code9.exe by right clicking on this link
then "Save Link As..." or "Save Target As..."
and then save it to your PC.
The current version is 2008.06.01.
This program is free, but it is copyrighted.
I'm not going to provide the source code.
Why did I name the program code9.exe? This is so that people can do Google searches and it would pop out. If I named it sudoku.exe, people would never find it.
To run code9.exe it requires Microsoft Framework 2.0 to be installed on your PC.
To see if you have Framework installed or not you can just run code9.exe. If Framework 2.0 is not there you get an error message.
To install Framework 2.0 you can download it from Microsoft .
Click on this previous link to read about the download.
It takes about 30 minutes to install Framework.
You have to be very patient with the install.
The program code9.exe is a "work in progress." It might have bugs in it. It is just a hobby of mine to see if I can write a useful program for Sudoku. In the past I used a few Sudoku programs and Sudoku web sites on the Internet to help solve puzzles, but they did not do everything that I wanted to do. I didn't want the program to give me the answer. What fun is that? I want it to help me figure out the answer. I want to use my brain to help solve the puzzle. I add new functionality to the program as I get time. I use it to solve the Sudoku puzzles in my local newspaper. It is a very useful program in its current state. I'm also interested in the Number Theory behind Sudoku. I learn more each day. Pairs of numbers are very interesting. I just added searches for triplets of numbers. That was very neat!
You can save and restore your Sudoku puzzles using this program.
This way you can send emails to people of very interesting puzzles.
I save interesting puzzles in a notepad text document on my PC.
To start the program initially with a certain pattern of numbers you can run it on the command line. For example enter the command:
This is 81 characters corresponding to the 81 squares on the puzzle. The "." is an empty square at that point. It is in order row 1 through row 9 left to right. The puzzle in this example contains the pair 25/25 with 2's and 5's in column 8.
+++Added on 3/24/2007:
I have been doing sudoku puzzles since around May 27, 2006. I do them everyday in the newspaper. Here are some puzzles from the newspaper with my comments on if I can do them or not. This is a text file. Edit it with Wordpad. It has the starting puzzle and the solution. Sometimes there are no "keys" for the puzzle. A key is a guess in a square that will cascade to solve the whole puzzle. The button "Guess All Numbers Left" gives you any keys at that point in solving the puzzle. The puzzles from the newspaper are copyrighted. The "*" are the ratings in the newspaper. "*" is easy. "*****" are very hard. Lately I can sometimes "guess" the right answer without using the computer's help. If two numbers are possible in two squares, I have a 50/50 chance of getting it right. Sometimes I guess right and sometimes not. On March 21, 2007 you can see I made a mistake somewhere and "destroyed" the puzzle. I had to start all over again. There are comments from when I was writing code9.exe and testing it. I needed "test cases" which I got from places on the Internet.
Future plans for me to add to the program are...
+ button to find triplets or higher (task completed)
(this is 3 numbers in only 3 squares) in a RCB (row, column or block)
+ add printing of puzzles (added on 9/1/2006)
+ add menus (task completed)
+ save/restore puzzles on the hard drive (task completed 8/25/2006)
This writes out 81-character text files to the hard drive.
+ searches for quads were added on 8/31/2006
(this is 4 numbers in only 4 squares) in a RCB (row, column or block)
+ add print preview on menu (added on 9/2/2006 with Page Setup also)
+ add search for X-Wings (Added on 9/8/2006)
+ fixed problems with triplets and quads on 9/4/2006
there can be 2 or 3 numbers in 3 squares with only those 3 numbers or
there can be 2 or 3 or 4 numbers in 4 squares with only those 4 numbers
+ added search for Swordfish 9/10/2006 but it is not working correctly
fixed Swordfish 9/15/2006 it is working now
+ changed the block numbers to be 1,2,3 4,5,6 7,8,9 (9/10/2006)
+ 10/13/2006 added button to guess every number that is left,
this is working, it takes a lot of CPU time,
it tells you the numbers that are correct and
those numbers that can't be that value,
the numbers found solve the puzzle, but some are correct and some are not,
that is really cool
+ 10/14/2006 I added Generalized X-Wings. This might be working.
I think it looks good from what I see.
It is close.
+ add search for chains -
9/21/2006 trying to do reseach on this
9/22/2006 I think it is working, it was very interesting to study this
+ add printing of all possible numbers on the puzzle left in the squares -
+ create a daily Sudoku puzzle on this web site
+ generate new unique puzzles with a certain rating
+ to rate puzzles on how easy or hard they are
+ update help page as changes are made
+ 10/27/2006 added Single Chains search, it is not working yet
+ 10/28/2006 fixed bug in Guess All Numbers Left, but now
it uses more CPU time, it takes longer to be accurate, sorry
+ 11/04/2006 working on Single Chains, it does find chains
that are a length of 3 segments, A to B to C to D,
it must be an odd number of segments
+ 11/05/2006 working on fixing Single Chains, the first and last
nodes can't be in the same Row, Column or Block
+ 11/10/2006 trying to fix Single Chains, it finds some of
segment length 3 and segment length 5, it is getting closer
+ 11/17/2006 added colors to various searches,
changed "Done" to "Clear Colors" button
+ 11/18/2006 added more colors to searches, added clearing colors in places
+ 11/24/2006 fixed the information in the Help page
+ 11/29/2006 fixed a bug in Single Chains numbers that were displayed
+ 12/16/2006 added new line characters on the displays of the information found
+ 06/02/2007 added new buttons to display just pairs or single numbers
+ 06/02/2007 the manual mode button is not reset any more automatically
+ 09/09/2007 added a counter for how many keys are found with the Guess All Numbers Left button. I was counting them manually before.
+ 06/01/2008 added button to solve the puzzle with backtrack and
+ 09/03/2009 Translated the program to Java.
Here is a picture of the Sudoku game that I bought.
It was not that useful.
It is very colorful.
Any questions or comments you have about this program, you can write to
Here is a Sudoku Puzzle Generator .
It is way at the bottom on the page and titled "executables".