Today : Mon, 22 Jan 18 .

Robert Sandilands





edit SideBar


Page: Projects.SudokuSolver - Last Modified : Thu, 26 Nov 09


This program will solve a puzzle following the rules of Sudoku. A description of the rules used can be found at the Sudoku entry on Wikipedia .

The application impliments a N x N puzzle.

This was originally started as a challenge between friends. There are more efficient solutions for small puzzles but they tend to get impossibly slow at puzzles larger then 4 x 4.

I have even heard somebody mention that this has some unknown artificial intelligence algorithm behind it. It is just a basic error minimization search.


It is a command line application that can take several parameters.

-h/-?: Shows help
-s old|simann|mixed: Uses old style, mixed or Simulated Annealing to search for a solution.
-i filename : This loads 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.

Known Bugs

None thus far.

Source Code

It is normal C++ and should compile on most Unix systems.



Operating Systems

Currently there is support for the following operating systems:

  • Linux
  • Mac OS X
  • Sun Solaris Sparc


0.5tgz31 May 2006Cleaned up the code and added a mixed search algorithm
0.4tgz23 May 2006Added simulated annealing as searching algorithm
0.3tgz12 Aug 2005Improved searching speed
0.2tgz6 Aug 2005Initial Release

Powered by PmWiki
Skin by CarlosAB

looks borrowed from
More skins here