Sudoku Solver
----------------

What is this?
--------------
This program will solve a puzzle following the rules of 
Sudoku. A description of the rules used can be found at 
http://en.wikipedia.org/wiki/Sudoku.

The application implements a N x N puzzle. There is a 
constant in block3x3.h which defines the size of the puzzle.
The name of the constant is BLOCKSIZE.

How does it work?
--------------------
It is a command line application that can take one 
parameter. The parameter can be a text file with initial 
values for the puzzle. The format of the file is as follows:

x y value

Where x and y is in the range 0 to ( N*N ) - 1 and value is 
in the range 1 to N*N.

Very little verification is done on this file, so I expect many 
bugs related to this function. It will not detect if an 
impossible starting condition has been set.

The application will load the initial state ( if specified ), 
initialize the rest of the puzzle to random values and then 
do a search to find a solution where the conditions of the 
game has been met.

Performance
--------------
With version 0.0.3 I had the following experimental results
for solving puzzles.

   N        	time
   2			< 1 second
   3			< 1 second
   4			< 1 second
   5			< 3 seconds
   6			15, 26, 31 seconds
   7			81, 644, 679 seconds
   8
   
Something to remember is that due to the nature of the
search algorithm the time to solve a puzzle can vary widely.

These times were on an AMD64 3700+ running 64-bit Linux.

With version 0.0.4 a new technique was introduced: Simulated Annealing. It
seems to perform better for large N. Further improvements may be possible by
mixing the search algorithm by using the old style for large error values
and switching to the new style for small error values. A slight redesign of
the code would be needed for this and may be done later.

Compiling
-----------
This code has been tested on Mac OS X, Solaris Sparc and
Linux.

Just run ./configure. If you want optimization enabled set 
CXXFLAGS=-O3 before running configure.

Then type make.

The binary is in the src folder.

License
--------
GPL license as can be found at 
http://www.gnu.org/licenses/licenses.html#GPL

The GPL license is also included in the COPYING file in the
distribution.

Disclaimer
-----------
This software is as is. I do not guarantee that it will do 
anything at all. I have tested it, and it works for me. The 
source is available, you are welcome to look at it and fix 
any bugs you find.
