You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sudokus can be transformed in ways that do not affect the number of solutions or the applicability of solution strategies and thus their difficulty. One example is relabeling by switching 1 and 2 everywhere. The crate already contains a shuffle function that performs such transformations in a random manner. It should also contain a function to map all equivalent sudokus to the same sudoku, the canonical form.
Todo:
Canonicalizations for
solved sudokus
unsolved sudokus based on their (unique) solution
unsolved sudokus, preserving the pattern of clues
The text was updated successfully, but these errors were encountered:
I must admit I had trouble trying to understand the approach you're taking there (and it seems the link is dead now). I think the algorithm was for fully solved sudokus?
For both solved and uniquely solvable sudokus I already have a canonicalization implementation that is apparently decently fast, >20,000 sudokus/s on my laptop (I thought it was only ~1k/s).
I don't have a good idea of what to do for unsolved sudokus that have zero or more than one solution. Neither do I have a good approach for a pattern preserving canonicalization.
My current algorithm uses the lexicographically minimum sudoku as canonical form and uses the minlex property to cut down the search space substantially.
Sudokus can be transformed in ways that do not affect the number of solutions or the applicability of solution strategies and thus their difficulty. One example is relabeling by switching
1
and2
everywhere. The crate already contains ashuffle
function that performs such transformations in a random manner. It should also contain a function to map all equivalent sudokus to the same sudoku, the canonical form.Todo:
Canonicalizations for
The text was updated successfully, but these errors were encountered: