A name for this technique please......

Advanced methods and approaches for solving Sudoku puzzles

Postby gsf » Thu Jan 12, 2006 4:26 pm

ronk wrote:
gsf wrote:you can use the command line solver executable posted at the bottom of http://www.research.att.com/~gsf/sudoku/
to canonicalize any puzzle list

Upon downloading and then running the "windows executable" (I have XP Pro) I'm left looking at a blank "Command Prompt" window ... and that's the way it stays forever. What am I missing?

its a command line solver so you must run it from a windows shell like cmd.exe
if you clicked a shortcut to sudoku.exe its sitting there waiting for puzzle input on the standard input
(I guess that exposes my background, apologies for calling cmd.exe a shell)
from the cmd.exe prompt this should produce the man page
Code: Select all
sudoku --man
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby ronk » Sat Jan 14, 2006 2:20 pm

gsf wrote:sudoku -f%#.c%,%o%,%,%v top1465.dat | sort | uniq -w81 -c
............
its a command line solver so you must run it from [ronk edit: windows command prompt]
if you clicked a shortcut to sudoku.exe its sitting there waiting for puzzle input on the standard input

Thanks for the link to your sudoku.exe and the help. I should have known to not run a command-line program directly from Windows.

While viewing "sudoku --man" output and studying your suggested command line, I was unable to find the "%#.c" formatting explained anywhere. If it's really not there, you may wish to revise the man page. I'm guessing it means to use [1-9] for the given cell values and a dot/period for the solution cell values in the canonicalized output. But figuring that out without your suggested command line would be impossible I think.

gsf wrote:these (canonicalized) minimal puzzles from the top1465 trip up my solver:
Code: Select all
..3....8.4....9.......621..24..............7....8...53.........6...1.9....57.....
.2...76.....1.......9.6..4...1.3..9..7...18..5.......66..8....4..2.4..5..4...32..
12....6..4....9......3....5..78......6...14...................7....92.....5....38 

My solver trips up on those same puzzles in the original form, but not in the canonical form. In the canonical form, three different puzzles (#485, #797, #1410) trip it up:
Code: Select all
12..56.8....7.........1...5.....7..8.6.5..2..9.....3.6.....297.6749.......2......
12..........1.93.7.....34..2.1.........81....59...4....7.....91.......56...56....
..345..........1........64........983..8...1..6...12...7.1..8......27....15.6....

So I'm wondering ... is your solver tripping up on puzzles #2, #77, and #3 in the original form ... or the canonical form?

TIA, Ron
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby gsf » Tue Jan 17, 2006 4:21 am

ronk wrote:Thanks for the link to your sudoku.exe and the help. I should have known to not run a command-line program directly from Windows.

given the windows centric world command-line isn't always a knee jerk reaction
ronk wrote:While viewing "sudoku --man" output and studying your suggested command line, I was unable to find the "%#.c" formatting explained anywhere.

fixed, thanks
I'll post new binaries and source later this week

ronk wrote:So I'm wondering ... is your solver tripping up on puzzles #2, #77, and #3 in the original form ... or the canonical form?

they are the only ones in original and canonical form, although I had to enable both #holes changed and #candidates changed as the forward check iteration check, and there was slightly different backtrack behavior, 4 nodes total in original form and 9 nodes total in canonical form
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Previous

Return to Advanced solving techniques