Sudoku Explainer Fixes

Programs which generate, solve, and analyze Sudoku puzzles

Sudoku Explainer Fixes

Postby lksudoku » Sun Oct 24, 2010 9:37 am

I have fixed the following bugs of SE version 1.2.1

a.
UL/UR sometimes not found, see puzzle
1..........34..2...2..5..3..1.3.6.....4.2.7.....5...8..3..6..9...2..78..........4

b.
UR Type 3 Hidden Set sometimes not found, see puzzles
....2......74.69...8.....3.2.......1.3.9.5.4...8...6...5..1..9...2...4......9....
or
..1...2.....3.2...4...1...3.6.7.8.5...4...9...8.6.4.2.9...6...7...8.7.....5...1..

c.
The same puzzle can have different ratings and solve paths (rare) for dynamic contradiction forcing chains, see puzzle
2..3....5.....473.....9..1......1.9.....7.4...6.8....34.5......6..5......79.....8

The version with the fixes is numbered as 1.2.4.0 and can be downloaded here
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby ronk » Fri Oct 29, 2010 12:48 pm

lksudoku wrote:I have fixed the following bugs of SE version 1.2.1

a.
UL/UR sometimes not found, see puzzle
1..........34..2...2..5..3..1.3.6.....4.2.7.....5...8..3..6..9...2..78..........4

b.
UR Type 3 Hidden Set sometimes not found, see puzzles
....2......74.69...8.....3.2.......1.3.9.5.4...8...6...5..1..9...2...4......9....
or
..1...2.....3.2...4...1...3.6.7.8.5...4...9...8.6.4.2.9...6...7...8.7.....5...1..

c.
The same puzzle can have different ratings and solve paths (rare) for dynamic contradiction forcing chains, see puzzle
2..3....5.....473.....9..1......1.9.....7.4...6.8....34.5......6..5......79.....8

The version with the fixes is numbered as 1.2.4.0 and can be downloaded here

lksudoku, thanks for posting the fixes. As a test, I used "FIXED3" to re-rate 12,146 puzzles collected from the Patterns Game. If not complete, this collection is mostly complete through game 0123.

The ratings were reduced on 37 puzzles, as listed below. Since "dynamic chains" aren't used in these 37, all changes are due to the two uniqueness fixes.
Hidden Text: Show
Code: Select all
...........12345...2.6.5.3..14...26..6.....1..72...48..5.7.8.4...61928...........  # ER = 4.7 becomes 4.6
....359.....1.....6.5..82..7.9....2.5...7...3.2....4.8..38..5.9.....9.....461....  # ER = 4.7 becomes 4.5
..........1.2.3.5....456....91...43...2.4.7...87...91....372....2.8.1.6..........  # ER = 4.8 becomes 4.6
....345.....6.....1.8..97..3.9....7.7...8...5.5....1.8..14..2.3.....8.....429....  # ER = 5.0 becomes 4.6
..........5.7.1.8....986....73...65...1.6.2...25...31....439....4.5.2.9..........  # ER = 4.6 becomes 4.6
..1...2.....3.2...4...1...3.6.7.8.5...4...9...8.6.4.2.9...6...7...8.7.....5...1..  # ER = 4.6 becomes 4.5
5.1...7...4.....5.9....12.6...2.78......1......36.5...8.73....2.6.....3...2...9.7  # ER = 4.6 becomes 4.5
...1.......2..3..4.4..5..6.2..3..7....3..2..5.1..6..4....4.......5..1..7.6..8..1.  # ER = 4.6 becomes 4.5
...1.......2..3..4.8..5..7.2..3..8....3..2..9.9..7..6....5.......4..1..8.7..6..9.  # ER = 4.6 becomes 4.5
.6.....3..4.5.7.8.7.8...2.6...4.5.....9...4.....2.8...1.6...3.8.2.1.4.9..3.....2.  # ER = 4.7 becomes 4.6
...9.......1..2..3.4..1..2.7..6..2....3..5..9.6..7..4....5.......5..9..1.7..6..9.  # ER = 4.7 becomes 4.5
....1......23.45...6.....2.5.......3.2.1.6.7...8...4...1..7..9...5...8......2....  # ER = 4.7 becomes 4.5
8.9.3.6.7.........3..1.7..2..5...8..7...2...9..6...3..9..2.4..6.........5.8.9.7.4  # ER = 4.7 becomes 4.5
5.6...7...4.....5.8....92.6...2.78......1......36.5...9.71....2.6.....3...2...9.7  # ER = 4.7 becomes 4.5
.1.....2..3.4.2.5.2.6...3.7...3.7.....5...8.....8.1...9.7...4.3.8.9.4.1..6.....8.  # ER = 4.7 becomes 4.5
1.2.3.4.5.........6..1.2..7..6...2..8...5...1..4...3..7..9.8..3.........2.3.6.5.8  # ER = 4.7 becomes 4.5
..9.87..6.8.5....36...........7...1..2..4..7..1...2...........51....4.2.2..65.8..  # ER = 4.7 becomes 4.5
...1.......2..3..4.5..6..7.5..6..2....3..8..9.6..5..4....7.......8..9..3.4..8..2.  # ER = 4.7 becomes 4.5
9.8...7.......7.5.4.7.2...1...3...8...9...6...3...1...1...3.2.7.9.4.......6...5.4  # ER = 4.7 becomes 4.5
..5.6.3...6..1..2.3..4.5..1..8...7..47.....96..2...1..5..7.8..9.9..4..8...6.9.4..  # ER = 4.7 becomes 4.6
..7.8.1...6...3.2.1.....3.4.......4.5...7.2...2.......9.1.6...7.4.3...9...5...4..  # ER = 4.7 becomes 4.5
....2......74.69...8.....3.2.......1.3.9.5.4...8...6...5..1..9...2...4......9....  # ER = 4.8 becomes 4.5
...3.......8..7..4.3..2..7.8..4..5....7..1..3.1..9..2....2.......1..9..7.6..3..9.  # ER = 4.8 becomes 4.6
...........12.34...356.781..52...76.....7.....67...13..245.167...34.25...........  # ER = 4.8 becomes 4.5
..1.23..4.2.1....56...........7...8..3..9..2..5...4...........82....5.7.5..87.1..  # ER = 4.8 becomes 4.6
9.....1.2.7.8...4...8.......6...1.5.....29......64....4.......5.5.3...6.1.....8..  # ER = 4.8 becomes 4.6
.....12...9..4..8.2.56..7..7.....4...1.....2...4.....9..9..53.6.2..3..5...89.....  # ER = 4.8 becomes 4.5
...........72.45...125.736..63...82...........78...14..564.173...43.26...........  # ER = 4.8 becomes 4.6
..........12...34..4.1.5.6...5.2.7.....8.7.....3.5.1...8.6.9.5..21...98..........  # ER = 4.8 becomes 4.6
....9.42......6..7...7.396..5.2.439...........249.7.1..726.1...4..3......38.7....  # ER = 4.8 becomes 4.6
.7.......5.....6.....1.234...76.85.............63.41...845.3.....2....9.........1  # ER = 5.4 becomes 4.6
1.2...3...4.....5.6....71.2...5.18.............36.2...5.14....3.2.....7...8...9.5  # EP = 5.6/4.7 becomes 5.6/4.5
.....1..2..3....4.45.....6.....175.....5.8.....643.....7.....21.6....7..8..6.....  # ER = 6.5 becomes 4.5
..8..5..2.1..6..4.7..1..5....6..3..9.3..9..2.9..2.63....7..9..5.4..3..8.1..6..4..  # ER = 7.7 becomes 7.1
.9.....8.7.6...5.9.3.5.9.6...1.7.6.....3.5.....9.6.4...1.2.3.7.2.3...1.5.8.....2.  # ER = 8.0 becomes 7.9
..1.2.3...2.4.3.5.3...6...7.8.....7.4.2...5.3.5.....8.2...8...1.3.2.6.4...8.4.7..  # EP = 8.1/7.2 becomes 8.1/7.1
..1...2...23...45.65.....17...4.8......613......9.5...48.....62.35...78...6...9..  # ER = 8.6 becomes 7.6
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Sudoku Explainer Fixes

Postby lksudoku » Sat Oct 30, 2010 3:18 pm

ronk wrote:Since "dynamic chains" aren't used in these 37, all changes are due to the two uniqueness fixes.

The dynamic chains fix makes sure that SE will always return the same rating for the same puzzle by making a random part of the rating process deterministic, the deterministic calculation does not ensure that the rating will improve, only that it will be the same for every run
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby lksudoku » Tue Nov 02, 2010 6:15 pm

Two more fixes to SE:

d. UR/UL type 3 hidden set rating is now increased to match that of UR/UL type 3 naked set of the same size

e. Sometimes SE chose a higher rating BUG type 3 move while there were other BUG type 3 moves with lower ratings, see puzzles
..9..6..3.3.....7.1...5.8.....6.3..2..6...9..3..7.4.....1.8...5.6.....2.8..2..1..
or
.1...2...34.........5.36......7..8.9..2...3..9.6..5......19.7.........43...8...5.

The version with the fixes is numbered as 1.2.5.0 and can be downloaded here
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby ronk » Tue Nov 02, 2010 6:39 pm

lksudoku wrote:Two more fixes to SE:

d. UR/UL type 3 hidden set rating is now increased to match that of UR/UL type 3 naked set of the same size

That seems like a bad decision to me. Nicolas Juillerat's UR/UL ratings may seem somewhat arbitrary to some, but this change is not a BUG fix IMO.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Sudoku Explainer Fixes

Postby lksudoku » Tue Nov 02, 2010 7:00 pm

ronk wrote:
lksudoku wrote:Two more fixes to SE:

d. UR/UL type 3 hidden set rating is now increased to match that of UR/UL type 3 naked set of the same size

That seems like a bad decision to me. Nicolas Juillerat's UR/UL ratings may seem somewhat arbitrary to some, but this change is not a BUG fix IMO.
I think it is a bug for 3 reasons:
  • When there are plain hidden sets and naked sets (without a UR), Nicolas Juillerat always rates the hidden sets higher
  • The code has a comment in it that specifies hidden set rating should be the same as naked set of same size
  • When there is a UR hidden and naked set of the same size where the hidden set contains all candidates that are not in the naked set, SE always chooses the naked set
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby ronk » Tue Nov 02, 2010 7:23 pm

lksudoku wrote:The code has a comment in it that specifies hidden set rating should be the same as naked set of same size

And I can believe that that's the way it started out and then, because of something unknown to us, it was changed. Maybe simply because of legacy ratings, maybe not.

But without having a clue as to the reason for the original change, I think it's unwise to change it back.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Sudoku Explainer Fixes

Postby ronk » Thu Nov 11, 2010 3:36 pm

lksudoku wrote:Two more fixes to SE:

d. UR/UL type 3 hidden set rating is now increased to match that of UR/UL type 3 naked set of the same size

e. Sometimes SE chose a higher rating BUG type 3 move while there were other BUG type 3 moves with lower ratings, see puzzles
..9..6..3.3.....7.1...5.8.....6.3..2..6...9..3..7.4.....1.8...5.6.....2.8..2..1..
or
.1...2...34.........5.36......7..8.9..2...3..9.6..5......19.7.........43...8...5.

The version with the fixes is numbered as 1.2.5.0 and can be downloaded here

Would you please post a version that includes fixes 'a', 'b', 'c' and 'e' ... but excludes fix 'd. I'd like to evaluate the impact of fix 'e' on the historical Patterns Game results ... without weeding out the much higher impact of fix 'd.'

I guess the best compromose for the version number would be 1.2.4.1 ... especially if the GUI includes all four digits of the version number, as it probably should.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Sudoku Explainer Fixes

Postby lksudoku » Sun Nov 14, 2010 11:55 pm

ronk wrote:Would you please post a version that includes fixes 'a', 'b', 'c' and 'e' ... but excludes fix 'd. I'd like to evaluate the impact of fix 'e' on the historical Patterns Game results ... without weeding out the much higher impact of fix 'd.'

I guess the best compromose for the version number would be 1.2.4.1 ... especially if the GUI includes all four digits of the version number, as it probably should.

Here is version 1.2.4.1 without fix 'd'
I knew this fourth version number will someday be of use

For the C++ clone effort with PIsaacson base code, I consider version 1.2.5.0 as the target
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby lksudoku » Sat Dec 04, 2010 9:46 am

Another updated version,
This change is more of an enhancement than a fix

f.
Added a command line option for serate to rate puzzles in batch mode, where all lowest rating hints of same rating are applied concurrently, to use this mode add the argument -b or --batch to serate command line
command line option description:
Code: Select all
  -b, --batch
      Batch mode rating, apply all lowest rating hints of same rating
      concurrently intead of applying one lowest rating hint step only.

This mode show over 13% runtime improvement when running on all pattern games with rating <6.5 on my computer

The mode also gives lower ratings in cases where one UR/UL destroys another UR/UL when applied, see puzzles
..1.36..4.6.8....37...........3...8..2..9..6..7...2...........85....1.9.4..95.1..
6.7.8.9.3.........3..2.4..5..5...4..7...2...1..9...7..9..5.2..7.........1.8.7.5.6
.1.......2.....3.....4.567...38.61.............57.29...826.1.....7....5.........9
9....2.7...58..2...2..9...6.4.....8...3.7...15.....9...8...34..7..9....3..1.8..5.
.1...9...34.........2.45......8..6.5..6...7..8.5..2......17.8.........43...6...2.
....8......23.45...6.....9.4.......6.3.....1...87.53...1..6..4.7...9...2.........
...........43.92...125.736..43...95...........57...18..754.183...97.25...........
9.8...4...6...3...4...7...3...1.2.3...5...1...4.3.9...6...9...1...7...8...2...3.4
.....47...2..9..1.4..2.....5...8.4...6.3.9.8...1.6...9.....1..3.1..7..6...54.....
..1..2..3.2..1.4..3..9...7...6.....4.1..9..3.8.....9...3...4..7..4.5..9.6..7..2..

In addition, batch mode seems to solve the problem of different isomorphs having different rating, see
the following two transposed puzzles:
.1...2...34.........2.57......3..1.7..9...4..1.5..8......69.3.........62...7...9.
.3...1...14.........2.95......3..6.7..5...9..2.7..8......14.3.........69...7...2.

This change only effects serate, and only when the new -b or --batch command argument is used

Numbered this version as 1.2.6.0 (serate only), can be downloaded from here
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby champagne » Sat Dec 04, 2010 10:47 am

One small thing that would help for benchmarks:

could you add in the next version a print of the overall elapsed time on "cout"

champagne
champagne
2017 Supporter
 
Posts: 7334
Joined: 02 August 2007
Location: France Brittany

Re: Sudoku Explainer Fixes

Postby lksudoku » Tue Dec 14, 2010 1:11 pm

Another updated version of serate,

This update is an enhancement for serate that allows for overall time measurement and choosing a set of techniques to be disabled or enabled while rating

The following command line options were added
g.
Code: Select all
  -t, --time
      Time the runtime,
      display total runtime to screen after rating is completed

h.
Code: Select all
  --techs=TECHSTRING
      Specific techniques only, set which techniques to use
      the techniques string TECHSTRING is a string consisting of the letters
      '0' and '1',where '1' means the technique should be used and '0' means
      it should not be used
      To see which technique is in which letter, and how many techniques are
      there, just type --techs= without any string after the = in TECHSTRING.

This change only effects serate, and only when the new -t, --time or --techs command arguments are used

Numbered this version as 1.2.7.0 (serate only), can be downloaded from this page
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Sudoku Explainer Fixes

Postby ronk » Tue Dec 14, 2010 3:14 pm

lksudoku wrote:Here is version 1.2.4.1 without fix 'd'
I knew this fourth version number will someday be of use

In the "beginning" this 4th digit was used for serate changes the didn't affect the GUI. It would be good to return to this method.

Is the 'Tester' entry point even being considered for these changes, particularly when the changes impact the technique set?
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Sudoku Explainer Fixes

Postby champagne » Tue Dec 14, 2010 3:17 pm

lksudoku wrote:Another updated version of serate,

This update is an enhancement for serate that allows for overall time measurement



That's grate.

I suffered a lot in drafting a process still performing well (I hope so) to search the shortest { "chain" ; "cycle"} but I think i got it and i'll start tests and comments writing to publish the second lot of code.

champagne
champagne
2017 Supporter
 
Posts: 7334
Joined: 02 August 2007
Location: France Brittany

Re: Sudoku Explainer Fixes

Postby lksudoku » Tue Dec 14, 2010 3:42 pm

ronk wrote:In the "beginning" this 4th digit was used for serate changes that didn't affect the GUI. It would be good to return to this method.

This can be done, but then maybe another digit/letter will be required to distinguish the fix 'd' existence
Having only one digit for serate changes allows for at most 9 changes in serate before changing a GUI related feature so maybe the fourh digit will become the fourth number
ronk wrote:Is the 'Tester' entry point even being considered for these changes, particularly when the changes impact the technique set?

The serate changes have no effect on the 'Tester' entry point
lksudoku
 
Posts: 90
Joined: 06 October 2010

Next

Return to Software