Pat wrote:Pat wrote:
i had been using gsf's 304,533 ( and got 9.8 )
now went back to his web-site -- and got a different version !! 304,777 -- which gives 9.7
just did an experiment using
lksudoku's new version
rating just the 1 puzzle
2..3....5.....473.....9..1......1.9.....7.4...6.8....34.5......6..5......79.....8
i got
but rating it as first and 3rd in a set of 4 puzzles
2..3....5.....473.....9..1......1.9.....7.4...6.8....34.5......6..5......79.....8
6..4....2.....573.....9..1......1.9.....7.5...4.8....34.5......8..2......63.....8
2..3....5.....473.....9..1......1.9.....7.4...6.8....34.5......6..5......79.....8
2..3....6.....473.....9..1......1.4.....7.9...6.2....55.9......8..5......32.....8
it becomes
9.89.8/9.8/9.3
9.7/9.7/9.3
9.8/9.8/9.3
9.7/9.7/9.3
I have now found and fixed your described bug, the bug is not a floating point problem nor is it an uninitialized memory variable
The bug is caused due to the uncertain ordering of a HashMap, a HashMap in java does not guarantee that the order of the keys will remain the same for every run. For the puzzle above
2..3....5.....473.....9..1......1.9.....7.4...6.8....34.5......6..5......79.....8
When solving, there is a potential which can be removed by two different sets of Dynamic Contradiction Forcing Chains
When SE can remove a potential using Dynamic Contradiction Forcing Chains, it removes it after the first such contradiction is found. However, due to HashMap ordering of the hints used by the chains, sometimes it finds one of the contradiction chains first, and sometimes the other
I have created a fix for the problem by sorting the hints used during the finding of the contradiction chains, after this hints sorting, anytime the above puzzle is rated, it finds the same contradiction chains first, and thus it produces the same rating for every different run
The fixed version can be found at
http://sites.google.com/site/sefixshare/files/FIXED2SudokuExplainer.jarThis version will always give the same result rating for the above puzzle and every puzzle with this hashset ordering contradiction chains rate changing bug
I numbered this version as 1.2.3.0