Here is some info about three of my favorite sites with free sudoku programs that also provide ratings: Sudoku Explainer, gsf and dukusos programs.
Sudoku Explainer is the only program i know so far, that can solve the hardest puzzles in human readable (and graphical) form. It is also great for "normal" puzzles to look what techniques it uses to solve them.
Howto get the rating:
Copy and paste a puzzle and press F9. For the hardest it can take some minutes.
[Edit:] With version 1.2 now also the current hardest puzzles can be solved.
It is also possible to rate one-per-line puzzles from a file (e.g.) called sudoku.txt (ratings in result.txt):
- Code: Select all
java -cp SudokuExplainer.jar diuf.sudoku.test.Tester sudoku.txt result.txt
Under Windows with batch file: Download SudokuExplainer.jar. Copy the above command to notepad and save as a batch file (e.g.) ER.bat in the same directory. Then copy your puzzles to sudoku.txt (same directory) and doubleclick on ER.bat in the explorer.
[Edit 070219:] m_b_metcalf has found a puzzle, where the program runs out of memory. In this case you can reserve more memory (here 500MB), when you start the Explainer with
- Code: Select all
java -Xmx500m -jar SudokuExplainer.jar
If you have installed the full Java JDK (not only the JRE), addding "-server" will fasten the calculation.
gsf's program is really multifunctional. Phenomenal is the speed in all it does like solving, rating, canonicalizing, minimalizing, generating (for an arbitrary pattern) and more.
Howto get the rating:
[Edit:] With the newer version (2006-12-04) the use of special options when (multi)coloring is needed (ratings above 99800) is obsolete.
Linux:
To get the ratings for (one per line) puzzles in puzzles.dat to a file gsf_ratings.dat, call
- Code: Select all
./sudoku -B -f'%5r %f:%j %16@%(V)x %2(P)x %v' -q hardest < puzzles.txt > gsf_ratings.txt
[Edit 070426:]Since version 2007-04-25 there is an improved quick rating, you can get with the -q1 option:
- Code: Select all
./sudoku -q1 < puzzles.txt > gsf_newratings.txt
Windows:
Open notepad, copy
- Code: Select all
sudoku -B -f%%5r%%7@%%(V)x%%,%%2(P)x%%,%%v -q hardest puzzles.txt > gsf_ratings.txt
to it and save it as gsfr.bat in the directory with the sudoku.exe.
Copy the (one per line) puzzles to puzzles.txt (same directory)
Doubleclick on gsfr.bat in the explorer to get the ratings written to gsf_ratings.txt in this format
- Code: Select all
99955 9 4 9....4....8..2..3...57.......1.....4.6..8..7.3.....5.......5..1.7..3..9....6..2..
99995 9 8 4....9....3..1..2...67.......1.....4.5.2...7.8.....6.......4..8.7..3..1....5..9..
If you want the rating without use of backdoors, write "sudoku -X -B -f...".
Note that in the batch file you have to replace a '%' given in the manual by '%%', also replace a blank in the format (-f) by '%%,' and leave out the apostrophs (') in the format specification.
[Edit 070426:]Since version 2007-04-25 there is an improved quick rating, you can get with the -q1 option:
- Code: Select all
sudoku -q1 puzzles.txt > gsf_newratings.txt
As usual, you can control the output with the -f option.
[Edit 070219:] Here are some other very useful commands in this context:
To see, if puzzles are isomorphic, you can canonicalize them with
- Code: Select all
sudoku -qFN -f%#0c puzzles.txt > puzzles.can
Isomorphic puzzles are transformed to identical canonicalized sudokus. (You can use the unix commands sort and uniq then to filter out a set of non isomorphic canonicalized sudokus.)
To get all minimal puzzles to a sudoku:
- Code: Select all
sudoku -qFN -m puzzle.txt > minimals.txt
This can take a while, if there are many redundant givens.
To get all singles backdoor cells or pairs:
- Code: Select all
sudoku -qFN -f%#Am puzzle.txt > backdoors.txt
dukusos programs are classics. Under many others there is a fast solver and a generator, C-code is attached to the programs.
Howto get the rating:
Linux:
Copy the C-code at the end of suexrat9.exe to suexrat9.c and compile with gcc (replaced rawclock() by time(0)):
gcc suexrat9.c -o suexrat9
Then
- Code: Select all
./suexrat9 puzzles.dat > suex_ratings.dat
writes ratings for one per line puzzles in puzzles.dat to suex_ratings.dat.
Windows:
Open notepad, copy
- Code: Select all
suexrat9 puzzles.dat > suex_ratings.dat
to it and save it as suexr.bat in the directory with the suexrat9.exe.
Copy the (one per line) puzzles to puzzles.dat (same directory)
Doubleclick on suexr.bat in the explorer to get the ratings to suex_ratings.dat in this format:
- Code: Select all
rating: 284 , ...7..9.85....8..4.6......1....2..1....3.....7.1.....5..5..7..9.4..1....2.94...6.
You can sort them in excel.
The ratings will differ more or less slightly, when you redo it.
You can also give the number of solvings (default 100) to get faster or more stable ratings, e.g.
suexrat9 puzzles.dat 1000 > ratings.dat (10 times slower, the ratings still vary up to about 7%)