Solves Sudoku.
Y = sudoku_solveai ( X ) Y = sudoku_solveai ( X , verbose ) [Y,iter,C,L] = sudoku_solveai ( ... )
a 9-by-9 matrix, with 0 for unknown entries
a boolean. Set to %t to display the state of the matrix. (default = %f)
a 9-by-9 matrix. If Y contains zeros, they stand for unsolved entries. The test and(Y(:) > 0) allows to see if the puzzle is solved.
the number of steps required by each algorithm
number naked singles steps
number hidden singles steps
number locked candidates steps
number naked pairs steps
number hidden pair steps
number naked triples steps
number hidden triples steps
number naked quad steps
number hidden quad steps
a cell array of candidate vectors for each cell.
the number of candidates for each cell
Uses a method designed by Arto Inkala: 1. put candidate to its' cell 2. check if any of the conflict appear 3. eliminate all candidates, which cause conflict in the new situation 4. repeat 2 and 3 until conflict appear of eliminations are not possible
"AI Escargot - The Most Difficult Sudoku Puzzle", Arto Inkala, 2007