Gwerdy Logo

[ FAQ | Privacy Policy | Links | Search ] Really Simple Syndication

SuDoku Solver <<

 

Gwerdy Details


» News
» About
» Contact Us

Gwerdy Products


» SuDoku Solver
» Moo Java
» Gwerdy Wordy
» Number Cruncher

:: Under Development ::
» Gwerdy Chat

Gwerdy Services


» Web Site Design
» Contract Programming

Archive Material


» MMF Archive
» Jamagic Archive
» Free Download Games



 

:: SuDoku Solver

“Solve SuDoku puzzles in seconds using Gwerdy's SuDoku Solver!”

SuDoku puzzles (sometimes known as Su Doku or Number Place) are a puzzle in which the player must place the numbers 1-9 once in each horizontal and vertical row as well as each block (3x3 grid). A starting 9x9 grid with a limited number of filled squares is the starting point, the player then must use logical reasoning to solve the puzzle.

SuDoku Solver is a freeware Windows 9X/2000/ME/XP program designed to help solve SuDoku puzzles. The solver uses only logical methods that would be employed by a human solving the puzzle and explains how each square of the puzzle was solved. The solvers algorithm can also act as a helper by revealing a single square's value, providing a hint if you want to solve a puzzle yourself but are a little stuck.
(Note : This program does not create new puzzles)

If SuDoku Solver is unsuccessful at solving the entire puzzle it will at produce the partially complete grid along with the possible values for each square that it has yet to solve, allowing you to use other methods not included in our algorithm maybe, or even guess!


Product Information

Title
Version
Price
Released
Author
Platforms
Requirements
Size

SuDoku Solver
1.02
Free
16th August 2005
Gwerdy Software
Windows 95 / 98 / ME / 2000 / XP
200 MHz+ processor, 64 Mb+ memory
635 Kb


Select a download location:

Get it from CNET Download.com!   Download from Gwerdy

(click screenshots to enlarge)

SuDoku Solver Screenshot 1

SuDoku Solver Screenshot 2

(click screenshots to enlarge)

(This software is packaged in a self-installing exe file, save to your computer then run the install program)



:: SuDoku Solver Algorithm Explained

The SuDoku Solver's algorithm only uses logical arguments to solve the puzzles. It does not use 'trial and error' methods. For anybody interested in an explanation of the algorithm it employs to solve your SuDoku then please read on. The Solver stores two grids (as arrays), one is the actual SuDoku grid itself, and the second contains all the 'possible values' for each square. Initially all values (1-9) would be possible for all squares of course. The algorithm then tries a number of steps to solve the puzzle, stopping when it either solves the SuDoku or all the following steps fail to find any new values.

Before moving onto how the SuDoku Solver algorithm finds unknown squares lets first see what happens when the algorithm adds a new value to the grid, either from the initial values entered by the user or from using the solve methods below. When the solver knows the value of a square it will adjust the 'possible values' grid for all other relevant squares.

For example (fig 1), if the value '1' is placed in grid position column 5, row 1 then all other squares in column 5, row 1 and the 3x3 block this square belongs to can no longer possibly contain the value '1'. So the solver updates the 'possible values' grid with this information.

     SuDoku Enter Value
Fig 1. The value '1' is placed at (5,1), all the yellow squares can now not possibly contain '1'



Step 1: Only one valid value for a square

SuDoku Solver checks to see if any of the squares have only one possible value. If any are found then the value is entered for this square as mentioned above and Step 1 is repeated until all remaining unsolved squares contain multiple possible values (or the SuDoku is completely solved!)

     SuDoku Algorithm Step 1
Fig 2. The value '8' is placed at (5,5) as no other value is possible!



Step 2: Only one valid square for a value in a row / column / block

If the above method fails to solve the puzzle then this next method is tested. Each row / line / block is checked to see if any of the values (1-9) that have yet to be found for that row / column / block can only be placed in a single square. If so that value is entered and the algorithm returns to Step 1.

     SuDoku Algorithm Step 2
Fig 3. The column 5 requires a value '1', although each square has a large number of
possible values only a single square (shown in yellow) can possibly store the value '1'.



If we still have not solved the puzzle at this point the solver moves onto the following methods which do not directly try to find the value for a square but rather reduce the possible values for a square in the hope this leads to Step 1 or 2 being able to then solve another square.



Step 3: Value must be here, so can not be there!

This one is a bit more complex to explain, if you look in a 3x3 block and all the places a certain value can be put fall on the same column / row then the value must lie within these squares so can not possibly lie in the other six squares in this column / row. The argument can also be used the opposite way around, looking at lines where all allowed locations are within the same 3x3 block. The following images may make this clearer.

      SuDoku Step Algorithm 3a  SuDoku Step Algorithm 3b
Fig 4. The values '7', '8' and '9' must lie in the three yellow squares. Because these
squares are all part of column / row 5 then the three values can not possibly lie within
the blue coloured squares.




Step 4: Multi-sets stick together

Another more abstract method, if a column / row / block has say two values which both only have two allowed possible squares, and these two squares are the same for both values then this pair of values must be in these two squares. All other values therefore can not be placed in these squares (if any others exist). The above is repeated for sets of three, four and five values too.

     SuDoku Algorithm Step 4
Fig 5. The two yellow squares could possibly be any of the values 5-9. But because
no other squares in this block can be '5' or '6' then the rule above states these two
squares must be '5' and '6'. Therefore the two squares can not possibly be 7,8 or 9.




Currently if the algorithm has failed to solve the puzzle using the above steps then this solver will have taken the puzzle as far as it can. We are working on improvements to this algorithm which will include new methods to improve the algorithm and help solve the SuDoku in the next version.


:: SuDoku Solver Feedback Form

Name:

Email:


Enter your feedback below:



(We will attempt to reply to all enquires within 48 hours, please include a valid email address)

 


Related Internet Links:
- The Times Online Su Doku's
- Pappocom SuDoku's
- Online SuDoku Solver
- Excel SuDoku Solver

 


[ FAQ | Privacy Policy | Links | Search | Top]

© 2005-2007 Gwerdy Software. All Rights Reserved.