Difference between revisions of "Sudoku"

From wikikotten
Jump to: navigation, search
(flow)
Line 11: Line 11:
 
If then searches for the square with the least possiblities and spawns X new sudoku puzzles with N-1 unknow squares where N was the nr of unknown squares of the previous Puzzle.
 
If then searches for the square with the least possiblities and spawns X new sudoku puzzles with N-1 unknow squares where N was the nr of unknown squares of the previous Puzzle.
  
These X puzzles are the recursively analysed again
+
These X puzzles are then recursively analysed again
  
  

Revision as of 07:11, 12 February 2006

How does the following program works

Solves all sudoku puzzles for you

Lots have been said and discussed about solving Sudoku puzzles automatically.

The program above works in two modes .

It first creates a list of possible entries for all the empty squares. (1 loop in each dimension of the 3 dimensions , horizontal, vertical and within the block)

If then searches for the square with the least possiblities and spawns X new sudoku puzzles with N-1 unknow squares where N was the nr of unknown squares of the previous Puzzle.

These X puzzles are then recursively analysed again


flow

  1. 3 dimension check of puzzle with N unknown
  2. search for one of the squares with the lowest amount of possibilities
  3. spawn X puzzles with N-1 unknown entries
  4. check if puzzle is solved ==> if yes print out and exit
  5. feed them to this algorithme again