Low-stepper Puzzles.

Everything about Sudoku that doesn't fit in one of the other sections

Postby gsf » Wed Jun 07, 2006 6:58 pm

tso wrote:What software is available for the non-programmer to use to identify (not create) low and high-steppers, either one at a time or in bulk? It's much too tedious and to do it manually.

for one, my solver with these options, will produce one line per puzzle, suitable for sorting
Code: Select all
sudoku -B -q{FN}-G -e'valid&&(steps<=8||steps>20)' \
-f'%tq,%(steps)x,%(clues)x,%(minimal)[-][M][SM]x,%#0v,AUTHOR,SEQUENCE'\
 files.dat ...

change the -e steps terms to refine the search
-B batches solver moves (required for step counting)
-q{FN}-G limits the solver to singles and no guessing
because guessing is disabled some puzzles may be unsolvable (invalid)
so a 'valid' term is added to the -e filtering expression
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby tso » Wed Jun 07, 2006 8:05 pm

You're kidding, right? Look around the room your in for a "non-programmer" and ask her or him to read your post and follow the instructions. Ok, after the laughter stops, maybe you want to explain that the teensiest bit? If I were a programmer, I wouldn't have had to ask. Copying and pasting this string doesn't work and I haven't a clue from context which parts I'm supposed to change. Maybe you could give an exact example -- this way, us non-programmers could deduce from context what items in the string are variables and what's not.

I've tried to read your manual but again, as a non-programmer, it is of no help.

Also, the last two times I downloaded the windows executable from your website (first time 180kilobytes, this time, 184), it crashes on my both my windows xp machines. One of the previous versions (172kb) works.
tso
 
Posts: 798
Joined: 22 June 2005

Postby ab » Wed Jun 07, 2006 8:12 pm

tso wrote:What software is available for the non-programmer to use to identify (not create) low and high-steppers, either one at a time or in bulk? It's much too tedious and to do it manually.

If you get my software:
http://uk.geocities.com/aidan_001/software.html
it contains a program called visual which steps through the solution to a puzzle. If you don't turn any of the extra solving techniques, you'll have the number of steps for your puzzle. It only does one puzzle at a time and you'd have to create a file of the puzzle using another part of the package, my programs weren't written to read strings, but it's not a big hassle!
ab
 
Posts: 451
Joined: 06 September 2005

Postby gsf » Wed Jun 07, 2006 9:02 pm

tso wrote:You're kidding, right?

most of the non-programmer sw will be gui point and click one puzle at a time
(I don't do gui programming
I have code from the mid 80's that still compiles and runs
how much gui code does that)
batch mode moves to the command line and I'm afraid in the 21st
century that leaves 90% of the mouse clickers behind

the command line was too wide for the screen so I added the standard
man page trailing \ to denote "line continuation"
I don't know what you named your puzzle file so its listed as "files.dat" with
and elipses to denote "you can process more than one file at a time"

report core dumps via pm with the command line and data causing the problem
the posted sudoku.exe runs on mine and other's xp's -- so much for windows portability

man page is not the best expository form but all the info is there
and as with all open source sw the worst case scenario is that
"you get what you paid for"
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby tso » Wed Jun 07, 2006 10:08 pm

gsf wrote:most of the non-programmer sw will be gui ...


I'm not looking for graphic user interface or point and click -- non-programmer's are not always novices. I use plenty of command line software. More of what I don't understand is your copious use of undefined abriviations and symbols used in unfamiliar ways followed by examples that cannot be parsed without quite a bit of guesswork. What is "standard" to you isn't to non-programmers familiar with the command line.

For example,
"report core dumps via pm"

Maybe it would be clearer if you made it more concise?

"rprt cr dmps v pm"

From the man[ual]:

"-m List the family of puzzles with minimum number of clues w.r.t. -s."

w.r.t. -s you say? Z t bvs wht tht mnz?

I'll give it another whack, but see if you can help me -- I've got a file filled with 100 puzzles, one puzzle per line of 81 charactors, using '.' for blank cells. All are solvable using singles only. The file is called input.txt. Assuming I want any output to be written to a file called output.txt, *exactly* what would I type into the command line in order to distinguish low from high steppers?

The first example from the man[ual]:
sudoku -g -sg -m -AT2W2 -QXYG -e 'valid&&minimal==1' -n10 -f%v -o g.dat

I've cut and pasted and edited a dozen ways -- no luck. Can't find 'valid&&minimal==1' in the man[ual]. (Using "-o g.dat" doesn't output to g.dat no matter what I do, though "> g.dat" does.)

The next example:
sudoku -f'%#tq,%(steps)x,%(clues)x,%(minimal)[-][M][SM]x,%#0v,gsf,%n' \ -e'V&&(I<=8||I>20)' -g -qFN -QG -m -sg -B2

This example needs an example.
tso
 
Posts: 798
Joined: 22 June 2005

Postby gsf » Wed Jun 07, 2006 11:37 pm

to me sudoku is a mathematic and algorithmic learning experience
the program I posted reflects that experience
its not a product, its a tool
tso wrote:"report core dumps via pm"

if the program crashes let me know by private message or it may continue to crash for you and others
tso wrote:From the man[ual]:

"-m List the family of puzzles with minimum number of clues w.r.t. -s."

you've got to peruse the man man
-m is an option
it interacts with another option -s
what does -s do?
if its not in --man output my bad
tso wrote:I'll give it another whack, but see if you can help me -- I've got a file filled with 100 puzzles, one puzzle per line of 81 charactors, using '.' for blank cells. All are solvable using singles only. The file is called input.txt. Assuming I want any output to be written to a file called output.txt, *exactly* what would I type into the command line in order to distinguish low from high steppers?

command already posted
there may be a quoting problem with the command shell you are using
all of these should produce the same results
Code: Select all
sudoku -f%#gg input.txt > output.txt
sudoku -f%#gg -o output.txt input.txt
sudoku -f'%#gg' input.txt > output.txt
sudoku -f%#gg -o output.txt input.txt


tso wrote:The first example from the man[ual]:
sudoku -g -sg -m -AT2W2 -QXYG -e 'valid&&minimal==1' -n10 -f%v -o g.dat

I've cut and pasted and edited a dozen ways -- no luck. Can't find 'valid&&minimal==1' in the man[ual]. (Using "-o g.dat" doesn't output to g.dat no matter what I do, though "> g.dat" does.)

-o is a recent addition
make sure you have the latest executable
-e is an option that takes an argument
you'll have to read the -e description and then the EXPRESSIONS details
tso wrote:The next example:
sudoku -f'%#tq,%(steps)x,%(clues)x,%(minimal)[-][M][SM]x,%#0v,gsf,%n' \ -e'V&&(I<=8||I>20)' -g -qFN -QG -m -sg -B2

This example needs an example.

the examples assume that the command can be entered, executed and observed
at that point the user can play with the options and observe the effects
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby Ocean » Thu Jun 08, 2006 1:10 am

tso wrote:What software is available for the non-programmer to use to identify (not create) low-steppers, either one at a time or in bulk? It's much too tedious and to do it manually.

If an example is needed: gsf's program is used to transform the puzzles in post #2 in this thread into the form they have in post #1.

All the format variations shown in post #2 are eaten. The program can be a bit sensitive for extra text in the input file (which may cause the program to halt, or act strangely). Works fine as long as the input is clean (or cleaned up, as is done with the submissions). So, simply copy-and-paste the text (all or some part) from post #2 into the input file - but remove the text before and between the "code-blocks".

Output is as displayed in post #1 (except for 'name of author', which is put in manually afterwords - that's why everything is not updated yet. Also the sorting is done elsewhere.)

The command string used is (for program version May 27th 2006):
sudoku.exe -f%#tq,%(steps)x,%(clues)x,%(minimal)[-][M][SM]x,%#0v,#,%n -qFN -QG -B2 -o low_outfile1.txt low_testfile.txt

This command string is put into a 'shortcut icon' on the windows desktop, which points to the file sudoku.exe. The program is run by doubleclicking on that icon (after a suitable input file has been prepared). The visual effect of running the program is a black window appearing. When the black window has disappeared, the output file is ready for inspection.

I admit I had to fight a bit with the option string. The -f option is put first, so it should be simpler to follow what kind of output it produces:

Output example:
III,2,36,SM,070000010006409200018305960360904085000000000490807021057206140003701800020000030,#,102

Here the puzzle has type III symmetry, and the stepcount is 2 (steps as defined in the inferior thread), # clues is 36, SM means symmetrically minimal, etc).

###

PS - when searching my own puzzles (for lowsteppers, say), I prefer a different environment (not ms windows), and use my own programs, which are not suitable for publishing. It's a lot easier to write a program that "works for me" than to make something "working for everybody".
Ocean
 
Posts: 442
Joined: 29 August 2005

Postby tso » Thu Jun 08, 2006 1:23 pm

gsf wrote:if the program crashes let me know by private message or it may continue to crash for you and others


Will do.
tso
 
Posts: 798
Joined: 22 June 2005

re: gsf's software

Postby Pat » Thu Jun 08, 2006 2:08 pm

gsf wrote:
tso wrote:What software is available to identify (not create) low- and high-steppers, either one at a time or in bulk?


my solver, with these options,
will produce one line per puzzle,
suitable for sorting:
Code: Select all
sudoku -B -q{FN}-G -e'valid&&(steps<=8||steps>20)' \
-f'%tq,%(steps)x,%(clues)x,%(minimal)[-][M][SM]x,%#0v,AUTHOR,SEQUENCE'\
 files.dat ...
change the -e steps terms to refine the search.

-B batches solver-moves (is required for step-counting)

-q{FN}-G limits the solver to "singles" and no guessing;
because guessing is disabled,
some puzzles may be unsolvable (invalid),
so a 'valid' term is added to the -e filtering expression


hi tso

i downloaded gsf's software today,
and it ran fine on Microsoft Windows XP

the -e quoting wouldn't work,
so i removed it
i.e. ran without filtering:
sudoku -B -q{FN}-G -f'%#0v,%(clues)x,%(steps)x' input.TXT > output.TXT

    without filtering, you are responsible for ensuring that each puzzle can in fact be solved by "singles" (a puzzle which fails will incorrectly show the number of steps last found in a successfully-solved puzzle - i hope gsf reads this comment and fixes this)
the output (one line per puzzle) shows the puzzle, number of clues, and number of steps -
'086000730000000000200708006005904103030000020007305809900806004000000000064000910,28,15'

this still required some work
  • remove the quotes
  • replace all commas by TABs
now Excel will take it,
and you can sort by number of steps---
User avatar
Pat
 
Posts: 3423
Joined: 18 July 2005

Postby JPF » Thu Jun 08, 2006 6:02 pm

2 steps ; 31 clues ; no symmetry

Code: Select all
 . . 2 | 6 . . | . . 9
 4 9 . | . 7 . | 2 . 6
 5 . 3 | . 4 . | . 1 .
-------+-------+-------
 . . . | . . . | 1 . .
 . 2 1 | 8 . 9 | . . 4
 . 5 . | . . 7 | . 9 .
-------+-------+-------
 7 . . | . . 3 | . 5 8
 . . . | 5 . 1 | 7 . .
 3 . . | . 9 6 | . . .


JPF
JPF
2017 Supporter
 
Posts: 3752
Joined: 06 December 2005
Location: Paris, France

Postby JPF » Thu Jun 08, 2006 8:36 pm

2 steps ; 30 clues ; no symmetry

Code: Select all
 4 . . | . . . | 5 6 .
 . . 3 | 4 . . | . 8 .
 5 2 . | . 7 3 | . . .
-------+-------+-------
 1 . . | . 2 6 | . . .
 . . 5 | . . . | 1 . .
 . . . | . . 8 | 9 7 5
-------+-------+-------
 . 6 . | 9 . 7 | . 3 .
 . . 8 | 1 . . | . . .
 3 9 1 | . . 4 | . . 2


JPF
JPF
2017 Supporter
 
Posts: 3752
Joined: 06 December 2005
Location: Paris, France

Postby Ocean » Thu Jun 08, 2006 9:12 pm

JPF wrote:2 steps ; 31 clues ; no symmetry
JPF wrote: 2 steps ; 30 clues ; no symmetry
Nice ones! Also break the record for absolute lowest number of clues for a 3-stepper!

Here are two of mine, type II symmetry (absolute minimal):
Code: Select all
# Type II, 8 steps, 24 clues, minimal.
 *-----------*
 |84.|...|..5|
 |...|.6.|..3|
 |...|3.7|...|
 |---+---+---|
 |..5|4.8|3..|
 |.1.|...|.8.|
 |..6|1.3|7..|
 |---+---+---|
 |...|6.4|...|
 |9..|.2.|...|
 |5..|...|.24|
 *-----------*

Code: Select all
# Type II, 6 steps, 24 clues, minimal.
 *-----------*
 |..1|.84|9..|
 |...|...|5..|
 |37.|...|..6|
 |---+---+---|
 |4..|6.1|...|
 |5..|...|..1|
 |...|4.2|..9|
 |---+---+---|
 |6..|...|.75|
 |..7|...|...|
 |..3|12.|8..|
 *-----------*
Ocean
 
Posts: 442
Joined: 29 August 2005

Postby JPF » Thu Jun 08, 2006 11:53 pm

1 step ; 37 clues ; no symmetry

Code: Select all
 4 . . | 9 . . | 8 . .
 9 . . | 8 1 3 | . . 2
 6 . . | . . . | . 1 7
-------+-------+-------
 . . 7 | 4 . . | 6 8 .
 . 1 4 | . 2 . | 5 . 3
 5 3 . | . . 9 | . 7 .
-------+-------+-------
 . . . | . 4 1 | 3 . 8
 . 5 2 | . . . | 7 . 6
 . . 8 | 7 6 2 | . . 9


JPF
JPF
2017 Supporter
 
Posts: 3752
Joined: 06 December 2005
Location: Paris, France

Postby Ocean » Fri Jun 09, 2006 1:01 am

JPF wrote:1 step ; 37 clues ; no symmetry
Another broken record!

Which gave inspiration to these ...
Code: Select all
#Type II. 5 steps, 24 clues, M.
 *-----------*
 |...|...|.1.|
 |1.2|..3|...|
 |..4|.2.|35.|
 |---+---+---|
 |.8.|.5.|...|
 |..5|7.2|6..|
 |...|.6.|.3.|
 |---+---+---|
 |.53|.7.|2..|
 |...|1..|9.8|
 |.6.|...|...|
 *-----------*
#
 
Code: Select all
#Type II. 4 steps, 24 clues, SM.  - [23-19-27-28]
 *-----------*
 |...|...|.1.|
 |123|...|.4.|
 |...|.56|.7.|
 |---+---+---|
 |..2|6.8|...|
 |..7|...|3..|
 |...|3.7|8..|
 |---+---+---|
 |.8.|21.|...|
 |.3.|...|756|
 |.4.|...|...|
 *-----------*
#
Code: Select all
#Type II. 3 steps, 24 clues, SM. 
 *-----------*
 |...|..1|23.|
 |1..|..4|5..|
 |67.|..8|...|
 |---+---+---|
 |268|...|...|
 |...|...|...|
 |...|...|497|
 |---+---+---|
 |...|5..|.81|
 |..4|7..|..3|
 |.93|6..|...|
 *-----------*
#

(creeping down...)
Ocean
 
Posts: 442
Joined: 29 August 2005

Re: re: gsf's software

Postby gsf » Fri Jun 09, 2006 2:10 am

Pat wrote:
    without filtering, you are responsible for ensuring that each puzzle can in fact be solved by "singles" (a puzzle which fails will incorrectly show the number of steps last found in a successfully-solved puzzle - i hope gsf reads this comment and fixes this)
the output (one line per puzzle) shows the puzzle, number of clues, and number of steps -
'086000730000000000200708006005904103030000020007305809900806004000000000064000910,28,15'

this still required some work
  • remove the quotes
  • replace all commas by TABs
now Excel will take it,
and you can sort by number of steps---

listing invalid (or unsolvable via disabled constraint methods) puzzles is tricky
many times they are the puzzles of interest
the fix, which I'll update tomorrow, will list the puzzle info up to the point
it was determined to be invalid/unsolvable
thanks

now, space and special character quoting on the command lines is the root
of tso's problems and the excel reformat above

I posted command lines suitable for unix shell
the other two windows methods, batch via cmd.exe and lnk shortcuts,
parse the command lines differently
3 different parses -- no wonder we had trouble communicating problems

could someone point me to docs describing windows batch vs. shortcut command lines
especially what happens to % and space

you can format excel ready records if you can get this literal -f option
past the command line parse
Code: Select all
-f%#0v\t%(clues)x\t%(steps)x
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

PreviousNext

Return to General