(no title)
pieceofpeace | 15 years ago
I shared the link because I found his sudoku generator and the constraint methods interesting.
> That would be backtracking.
Let me quote the first para in full:
The solver uses depth first and/or breadth first tree search
with constraint propagation to prune the search for the next
best move (forms of forward checking.) There are space/time
tradeoffs between depth/breadth first search and the constraints
used; sudoku(1) has options to control the combinations.
The common characteristic for all constraints, here and elsewhere,
is that they avoid trial and error. Its fine for a computer
to guess and backtrack but a definite breach of puzzle manners
to require a human to do so.
I could be wrong but, yes, it does use backtracking to find the constraint that can give a number for an empty cell but it never has to change a number it has put in a cell. That differs from the trial and error approach that moves forward by guessing values and checking if it leads to a valid solution.
crux_|15 years ago