udosuk wrote:olimpia wrote:Why so sparse with the information? You just did a 36 hour experiment and then didn't even tell us how many positions they solve.

So I checked the first and it solves to fill 65 cells total. Impressive!

olimpia, perhaps you should have been more observant.

gsf already specified the number of solved cells at the end of his 2 lines ("# 16 49 8" and "# 16 51 8"). So in the 1st puzzle 16+49=65 cells are filled, leaving 16 cells unsolved. In the 2nd one 16+51=67 cells are filled, leaving 14 cells unsolved. (The "8" should refer to the number of different symbols appearing among the given clues, I guess.)

Also, knowing

gsf's programming prowess, 36h isn't such an surprising time for such a task.

thanks and thanks

the solver evolves with the best ideas posted on the player's and programmer's forums

I'm not pleased with the 36 hours because it makes the search over derived 15's and 14's etc untenable

here's a breakdown of all the options used to show the work being done

- Code: Select all
`-go-1 -q- -e "max(determined()+9-(%#vX))" -f"%v # %G %2(determined())x %#vX"`

-go-1 for each input puzzle generate all subpuzzles with one (

-1) clue deleted

since the input puzzles were 17's in this experiment, all 16's are generated

for all 15's use

-go-2-q- don't solve the generated puzzles (because they are subpuzzles)

-e "max(determined()+9-(%#vX))" -e is a filter expression

this expression contains two functions:

determined() for each pencilmark candidate assert the candidate,

run a singles only backtrack solver, and eliminate the candidate if it produces a contradiction

for this experiment

determined() will run on 16's, so the absence of a contradiction doesn't necessarily imply valid solution

the return value of

determined() is the number of determined clues, e.g., 49 in the first puzzle above

max(

expr) if the arithmethic expression

expr is greater than

the previous

expr evaluated then

max(

expr) returns true, otherwise false

the effect in this experiment is to only list puzzles that improve on the metric

the metric in this case is to maximize

determined()+9-(%#vX)(%...) is a term that expands the value of the

-f format %...

in this case its

%#vX, which is the number of clue values used by the puzzle, not counting dups

so

9-(%#vX) minimizes the number of clue values

and the entire expression maximizes the number of determined clues and minimizes the number of clue values

finally

-f"%v # %G %2(determined())x %#vX" is the output format for each puzzle meeting the filter criteria

each %... represents a puzzle property

%v the 81 char grid

%G the number of clues in the original grid

%2(determined())x the number of determined clues, print field width 2

%#vX the number of clue values

the

determined() results are cached for each puzzle, so multiple calls

for a single puzzle only do the computations once

so the hot spot for this example is

determined()on the hobby todo list is to plug in

briturner's original backtrack solver to see if it improves runtime

the

--man option should describe all of this (tersely)

if it doesn't let me know