TTHsieh wrote:ravel wrote:
... due to the strong symmetries - only 1284 of the puzzles are non isomorphic ...
How to calculate the
1284 ?
since ravel's post I added a filter expression function that uses the canonical puzzle as a key
in a splay tree to filter out dups -- its only suitable for ~millions of puzzles
for larger input you'll need to use -f%c to an external file and sort -u
for your data
- Code: Select all
sudoku -c1, -qFN -f'%v' -e 'uniq()' tthsieh.txt > tthsieh.out
-c1, cuts the ','-separated field #1 from the input file
the solver by default solves; -qFN uses the quickest method when solving details aren't needed
-f'%v' is the output format, %v means the grid in 81 char single line form with '. for empty cells
-e 'uniq()' is the filtering expression; only the first of equivalent (up to isomorphism) puzzles is selected
as ravel noted its >>>> quicker to filter out dups before doing anything with SE
the example took 40s @ 2GHz