In a previous thread (Killing with Flowers) we discussed the problem of finding computationally difficult Killer Sudoku's (with, of course, a unique solution). One obstacle to expanding the list of known cases was the lack of a solver that could test a puzzle for uniqueness of solution in a timely fashion.
Now we have just such a tool in sigh's ISS (Interactive Sudoku Solver).
ISS is web-browser based, so it can't be invoked by a conventional API. sigh kindly provided me with a basic template that can be used to invoke the solver locally, and from this I have extended it into a batch mode facility - given a list of puzzles, it checks each for uniqueness of solution, and tags each valid puzzle with NG, the total number of T&E guesses used by the solver (we will use NG hereafter as a standard metric for comparison purposes).
For example, with given puzzles (from the previous thread):
- Code: Select all
S<J<<O<<KJ^<<^<^>^^<N<<<J^Q^S^O>>^^^>^W^<<^>^^O^<<^T^J^^^>>>^>^>^ML<S<<^^>^<^<<^< # Tarek #41
O<P<<Q<<<^>^KJ<<Q^^K<^<<^^<^^KD9<K<^O^^^6<^K^^>^H<^^^Q^<LK<<>^^O^^<<^P<^^<<<>>^>^ # Wecoc #1A
the script produces:
- Code: Select all
S<J<<O<<KJ^<<^<^>^^<N<<<J^Q^S^O>>^^^>^W^<<^>^^O^<<^T^J^^^>>>^>^>^ML<S<<^^>^<^<<^< # 2654
O<P<<Q<<<^>^KJ<<Q^^K<^<<^^<^^KD9<K<^O^^^6<^K^^>^H<^^^Q^<LK<<>^^O^^<<^P<^^<<<>>^>^ # 39500
We also need a minimality test. For our purposes, a puzzle is non-minimal if any two cage sums can be omitted (given as 0) and the resulting puzzle still has a unique solution.
I have not attempted a script-based minimality tester (yet!) but I do have a function that can use a SAT solver to explore cage-sum redundancy. That function can produce a list of minimal puzzles from a base puzzle, and that list can then be fed into the batch script solver.
Both examples above are non-minimal, as it happens. The hardest (maximum NG) cases found for each puzzle were:
- Code: Select all
S<J<<O<<KJ^<<^<^>^^<N<<<J^Q^S^O>>^^^>^W^<<^>^^O^<<^T^J^^^>>>^>^>^ML<S<<^^>^<^<<^< # tarek #41
0<J<<O<<KJ^<<^<^>^^<N<<<J^Q^S^O>>^^^>^W^<<^>^^O^<<^T^J^^^>>>^>^>^M0<S<<^^>^<^<<^< # 306918
S<J<<O<<K0^<<^<^>^^<N<<<J^Q^S^0>>^^^>^W^<<^>^^O^<<^T^0^^^>>>^>^>^ML<S<<^^>^<^<<^< # 326311
0<J<<O<<KJ^<<^<^>^^<N<<<J^Q^S^O>>^^^>^W^<<^>^^O^<<^0^J^^^>>>^>^>^ML<S<<^^>^<^<<^< # 358528
- Code: Select all
O<P<<Q<<<^>^KJ<<Q^^K<^<<^^<^^KD9<K<^O^^^6<^K^^>^H<^^^Q^<LK<<>^^O^^<<^P<^^<<<>>^>^ # Wecoc #1A
0<P<<Q<<<^>^KJ<<Q^^K<^<<^^<^^KD9<0<^O^^^0<^K^^>^H<^^^Q^<LK<<>^^O^^<<^P<^^<<<>>^>^ # 409550
0<P<<Q<<<^>^KJ<<Q^^K<^<<^^<^^KD9<K<^O^^^6<^K^^>^0<^^^Q^<LK<<>^^O^^<<^0<^^<<<>>^>^ # 444494
0<P<<Q<<<^>^KJ<<Q^^K<^<<^^<^^KD0<0<^O^^^6<^K^^>^H<^^^Q^<LK<<>^^O^^<<^P<^^<<<>>^>^ # 529217
In the next post I will outline the process by which I searched for cases of even "harder" killers ...