New Solver & Helper for Standard/Killer/Clueless Puzzles

If you have written the best solver, generator, or helper, we should know about it
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Christmas Present

Post by rcbroughton »

Hi All

I've been putting off releasing an update of SudokuSolver while sudokuEd and I have been working on the rating system. However, I finally decided that:
a) the list of modifications was just getting too big :D and
b) it's Christmas!!

Anyway, I've just updated the website www.piarina.com/sudoku with the latest version 2.2.0 of the software.

The changelog is shown at the end of the post. Most significantly there's been a major change to the solver options window and a whole host of new solving techniques including:
Type 2, Type 4 and "Killer" Unique Rectangles
Hidden Killer Mutuals
Overlapping Cages
Generalised Common Peer eliminations
More generalised chains
Almost Locked Cages

plus some simplification/splitting of some of the more powerful techniques into bite-sized chunks.

The other major change is that the program now has its own file format which allows puzzles to be launched from Windows by double clicking on the file. The program also now supports SudoCue/SumoCue file formats for import and it will attempt to read plain text files with puzzle definitions. All these file types can be dragged and dropped onto the main window as well.

All in all, some new goodies for people to play with, together with a raft of bug-fixes and other modifications.

Enjoy!

Rgds
Richard

Code: Select all

Version 2.2.0

   1. Added support for loading SudoCue and SumoCue file formats
   2. Added General Common Peer Elimination solving technique
   3. Removed Jigsaw Locked Candidate - replaced by General CPE
   4. Added Hidden Killer Mutual solving technique
   5. Added Almost Locked Cages solving technique
   6. Fixed problem in Samurai/Clueless print 1 per page showing incorrect candidates
   7. Fixed intermittent failures pasting definitions in Killer puzzles
   8. Modified double hidden cage detection to process all cage changes
   9. Fixed bug in cage cleanup not correctly regenerating pairs
  10. Modified Bookmark GoTo dialog to focus correctly
  11. Further modified order of complexity in 45 Rule checks - removed most complex checks from "Extreme" into "Insane"
  12. Split Cage Blocker checks into Simple/Extended/Complex to better emulate human solving approaches
  13. Added options to control complexity of Combined Cage elimination
  14. Added options to control complexity of Cage Placements compared
  15. Fixed problem when trying to split cages with placed candidates
  16. Changed default save file extension to ".ssv" to avoid potential errors caused by inadvertent editing of text files
  17. Added windows explorer file association to type ".ssv" to launch SudokuSolver
  18. Added functionality to allow ".sdk/.sdx/.ss/.ssv/.txt" files to be imported directly into the program using windows explorer drag and drop
  19. Split Naked/Hidden Tuple techniques into separate solver options
  20. Added Overlapping Cage elimination technique for killer puzzles
  21. Fixed problem in Undo/Redo causing history to be incorrectly recorded
  22. Improved double hidden cage detection
  23. Modified houses used in 45 Single House Routine to include more obvious house groupings
  24. Modified UI to improve responsiveness of cell and cage selection
  25. Modified default and scoring options to use new routines and amended scoring routine accordingly
  26. Fixed bug in UI that could cause lock-up when using the batch solver
  27. Extensive modification to Solver Options window to provide greater control over solving options
  28. Split Cage Placement Routines into Simple, Extended, Complex and Insane to provide greater control over complexity of eliminations
  29. Fixed minor bug in Cage Cleanup routine that was performing cleanup on unmodified cages
  30. Fixed minor bug in Batch Solve window where puzzle was copied to main window when double clicking header row
  31. Simplified Cage Sum routine to limit eliminations to 2 unsolved cells
  32. Fixed problem in manual Cage Placement routine preventing it working in certain circumstances 

Version 2.1.3 (unreleased)

   1. Fixed problem in Unique Rectangle solving technique that was causing it to miss eliminations
   2. Implemented Unique Pairs (Type 4) and Unique Side (Type 2) Unique Rectangle variants
   3. Implemented "Killer" Unique Rectangle variant
   4. Further modified order of complexity in 45 Rule checks - routines now first check all innies, then all outies and finally innie/outie combinations
   5. Split scoring routine output for 45 Rule eliminations to identify I/O versus I or O only
   6. Fixed problem in Samurai selection window that could cause an unhandled error when clicking outside the navigation image
   7. Fixed problem in manual Bowman's Bingo routine that failed to identify eliminations
   8. Fixed problem with Undo not correctly describing the undo step in certain circumstances
   9. Addressed a number of memory allocation problems in extended puzzle navigation that could lead to excessive memory usage
  10. Fixed text selection/copy problem in Cage Information - pairs
  11. Added simplified cage cleanup routine as part of initial sweep and to manual cage modifications to fix problem with must use candidate identification
  12. Added further error handling in user interface to avoid lock-up caused by unexpected errors
  13. Fixed minor bug when pasting text into the puzzle description - previous behaviour would replace all text 
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

Hi All

Time for another update as the list of fixes and changes is getting quite lengthy again.

I've just updated the website www.piarina.com/sudoku with the latest version 2.2.1 of the software.

A full change log is included below, but some big changes in this version are:
Colour - the program now lets you play around with the colours in the grid, including multi-coloured Cages in Killer puzzles and multi-coloured Nonets in Jigsaw puzzles
New routines to provide some simplified Trial & Error steps
Menu options to rotate, flip and mirror puzzle definitions in Setup mode
Fixes to puzzle grid navigation and storage in Samurai/Clueless puzzles
Extension to Kiler Pairs
Reworked order of 45 Rule tests to provide more consistent identification of simpler eliminations.

Enjoy

Rgds
Richard

Code: Select all

   1. Added confirmation box when scoring a puzzle with non-standard options
   2. Added Rotate/Flip/Mirror functions to transform puzzle definitions in Setup Mode
   3. Modified order of 45 Rule tests to find simpler eliminations more consistently
   4. Reworked Cage Cleanup routine to be slightly less powerful and more consistent
   5. Fixed bug in Edit Cell that would incorrectly show candidate values following a cage cleanup
   6. Minor change in File Open/File Save dialog to be more consistent on file names remembered during a session
   7. Fixed bug with Ctrl-Tab, Shift-Tab to ensure cage selection only carried out in Solving mode
   8. Added short-cut Key F7 for Puzzle Scoring
   9. Modified scoring output for unsolved puzzles
  10. Added facility in Solving mode to manually create I/O cages
  11. Fixed bug in Cage Blocker/Extreme 45 Rule/Insane Cage Placement where potential eliminations were being missed
  12. Fixed bug in Almost Locked Sets where potential eliminations were being missed
  13. Various changes to solver path ordering to minimise differences between rotated puzzles.
  14. Added colour selection facility to allow modification of grid colours and multi-coloured cages and jigsaw nonets
  15. Fixed problem in manual 45-Rule selection that was allowing unrelated cages and cells to be selected
  16. Fixed a bug opening puzzles with more than one cage of value 45
  17. Fixed display bug with 8 or 9 cell cages enclosing a non-caged cell where the non-caged cell was incorrectly coloured
  18. Fixed misreporting of eliminations in the log for Almost Locked Cages
  19. Modified Undo history for Samurai/Clueless to provide full puzzle history
  20. Modified extended puzzle navigation to avoid problems of changes not being stored
  21. Fixed display issue where selected cells did not match selected cages
  22. Fixed bug in Almost Locked Cages where certain eliminations were only being found following a save/load operation
  23. Added warning message to scoring routine when a Trial & Error step was used in the solving path
  24. Added two simplified Bowman's Bingo routines to provide short-length contradiction chains
  25. Fixed problem getting an additional "Interrupted" message when trying to take a single solver step following a solver interruption
  26. Improved reporting of Conjugate Pair eliminations to identify why the digits are conjugate
  27. Improved reporting of Bowman Bingo moves to identify trial & error steps
  28. Added "Hidden" Killer Pairs to provide a more generalised Killer Pair elimination
  29. Fixed intermittent problem when using Undo where undo history was being lost
  30. Modified file load/save default file name prompt
  31. Fixed problem opening standard SumoCue files 
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

HI All

bit of an Oops! moment - there was a small bug in the new Bowman's Bingo Lite that was causing a few problems.

Apologies for that - a new version v2.2.2 is available to fix that problem.

As a bonus, though, this new version has a Copy option on the edit menu (or Ctrl-C from the keyboard). This will put both a textual representation of the current grid and a bitmap of the current grid onto the clipboard for you to paste into another application.

If you paste into a text editor, you will see a character drawing of the grid - if you paste into a graphics package (or use paste special -> bitmap in MSWord) you will get the full colour image.

Rgds
Richard
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

Time for another update - sudokuEd and I are still trying to get a version that is more relable on scoring - consequently we've split up a few of the more complex routines to provide simple versions.

Also introduced Killer Triples in this version and a modified version of Hidden Killer Pairs - makes better progress through Assassin 89 with the new routines enabled.

Plus a number of other tweaks and fixes. :wink:

The new version 2.2.3 is in the usual place on www.piarina.com/sudoku.

Full change log is given below:

Code: Select all

   1. Modified drawing order to allow current cage to be seen in front of a highlighted 45 region
   2. Improved performance of batch solver and scoring routine
   3. Fixed bug in identification of cage "pairs" producing unnecessary tuples
   4. Fixed problem loading Jigsaw and Jigsaw Killer puzzles
   5. Fixed copy/paste from puzzle description
   6. Amended Locked Candidate routines include Hidden Cages for Killer puzzles
   7. Added keyboard short-cut (H) to show Hidden Cage menu for a cell
   8. Added keyboard short-cut (Ctrl-X) for Cage Cleanup
   9. Provided greater control over complexity of Locked Candidates, Locked Cages and Cage Blockers for Killer puzzles
  10. Fixed potential unhandled exception in zero killer puzzles highlighting
  11. Fixed bug in zero killer puzzles where solved zero cells were omitted from manual 45 Regions
  12. Modified behaviour so that selected cell retains focus when selecting hidden cages from the context menu
  13. Modified behaviour of Colour Swatch:
          * When colouring, cages are de-selected to show highlighted digits
          * When colouring, Right Click in Colour Swatch exits colouring mode but leaves digits highlighted
          * When colouting, Right Click in a cell highlights it in the current colour instead of showing pop-up menu
          * When not colouring, Right clicking in the Colour Swatch highlights any selected cells in that colour 
  14. Modified Hidden Killer Pairs to find partial cage eliminations
  15. Added Killer Triples
  16. Added Simple Single House and Multiple House 45 Rule routines and simplified Single House
  17. Modified printing so that current grid print includes highlighting
  18. Fixed bug in printing where long Puzzle Descriptions were being omitted
  19. Modified Locked Candidates (House/Cage) to recognise double locked candidates 
Rgds
Richard[/code]
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

Teaser . . .


Image

Image

Image
mhparker
Grandmaster
Grandmaster
Posts: 345
Joined: Sat Jan 20, 2007 10:47 pm
Location: Germany

Post by mhparker »

rcbroughton wrote:Teaser . . .
I couldn't work out what the teaser was until I tried downloading the new version, only to find out it's not there yet!

Great work, Richard 8-), but please don't keep us waiting too long!
Cheers,
Mike
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

mhparker wrote:but please don't keep us waiting too long!
Coming very soon.

Main features:
  • Extended colour and font selection in the colour options - including (as above) ability to use picture backgrounds.
    Ability to export/import colour options to exchange with other users
    Additional solving options around Killer Pairs
    Lots of fixes/tweaks to other solving techniques
    Tidy up of a few bugs in the solver log
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

Hi All

hope I didn't keep you waiting too long after the teaser :wink:

Version 3 of SudokuSolver is now avaialble on the website at http://www.piarina.com/sudoku.

As you will have seen from the teaser, the main feature in v3 is a much greater ability to customise the user interface. Just about every element of the grid display - fonts, colours, line styles - can be customised. Together with the ability to use any image as a backdrop to the grid means that you can achieve some really nice visuals.

I've also added in the ability to save your personal settings to file, so you can have a collection of diffrent looks to suit your mood. You can also promote a sense of community by exchanging these preferences files so you can share your own set up with others.

As usual, there are a raft of bug-fixes and tweaks, as well as an extended solving technique for Killers and some splitting up of other routines to better approximate human solving paths. The full list of changes is shown at the end of the post.

sudokuEd and I have also spent a lot of time trying to optimse the scoring engine and the routine order to better correlate with the perceived difficulty ratings on the forum for Assassins. One thing we've noticed is that the score of a puzzle can sometimes be sensitive to the orientation of the grid, as the solver can pick up slightly diffferent paths. Most times this is a trivial difference, but can make a big difference on the more complex puzzles. I've included a hidden feature to allow people to score all rotations of a puzzle and then display the lowest score out of the four orientations - contact me and I'll let you in on the secret!

Rgds
Richard

Code: Select all

Change Log for V3.0.0
   1. Added manual highlighting colours to the colour preferences dialog so that they can be edited and saved with other colours
   2. Fixed problem where simple 45 Rule eliminations were being missed on initial pass, but found following an Undo
   3. Fixed sorting of 45 Rule checks to make simple eliminations more consistent
   4. Fixed problem where Cage Blockers routines were not reporting combination eliminations in the log
   5. Changed Bowman's Bingo to fix problem where unnecessary additional steps were being used
   6. Fixed problem in Locked Candidates (House/Cage) and Forced Cage Candidates where eliminations were being missed
   7. Fixed problem on rotated puzzles where cell order in cages was not being correctly reset
   8. Fixed problem where cage combination elimination were not being reported in Forced Cage Candidates
   9. Improved speed of 45 Region checks - performance for complex puzzles using more sophisticated 45 Rule checks is gratly improved
  10. Added font selection options to the colour preferences dialog
  11. Added background image selection and display options option to the colour preferences dialog
  12. Extended Bowman's Bingo log description and fixed bug in repoting row/col/nonet numbers
  13. Added Forced Killer Pair routine
  14. Added ability to Import and Export solver routine options to file
  15. Added ability to Import and Export colour options to file
  16. Modified warning in puzzle scoring mode when Trial & Error steps are used
  17. Fixed problem in 45 Rule test where simple eliminations were being missed in favour of more complex house combinations used
  18. Fixed bug in scoring where some 45 Rule eliminations were being double counted
  19. Fixed bug in Cage Sum routine where repeated candidates were not being correctly eliminated
  20. Fixed bug in Locked Cages where some eliminations were being made but not reported
  21. Simplified logging of Cage Cleanup steps when scoring a puzzle
  22. Modified complexity rule for 45 Rule Single House to consider a maximum of 4 cell combinations and Multiple Houses to consider a maximum of 6
  23. Fixed problem in log file where external cage influencers were being incorrectly reported
  24. Fixed problem in combined cages where some valid combined cages were not being created
  25. Modified window behaviour to remove automatic highlighting when navigating the grid
  26. Modified program and associated file icons 
Last edited by rcbroughton on Fri Mar 14, 2008 3:57 pm, edited 1 time in total.
Børge
Master
Master
Posts: 157
Joined: Sat Aug 11, 2007 7:22 pm

Post by Børge »

Richard, thanks a lot. Excellent stuff. =D>

Without it I would not be able to make Clueless Explosions.
Just ran it on my upcoming second Clueless Explosion. Version 3 solved it in 766 steps compared to 727 steps for version 2

One question: How do I get the scoring/rating of a Clueless Explosion?

Thanks
Børge

P.S.: Faster solving would be great!
Jean-Christophe
Addict
Addict
Posts: 92
Joined: Mon Apr 23, 2007 12:50 pm
Location: Belgium

Post by Jean-Christophe »

rcbroughton wrote: As Mike guessed on another post, I'm extending support in SudokuSolver for these type of puzzles - including a revamp of the navigation and a full puzzle viewer.
While playing with your soft for Clueless explosion, here is what I found annoying:
- Confirm Transfer dialog when switching sub puzzle. IMHO it should be always Yes.
- After switching sub puzzle, one step to cleanup all candidates at once instead of several "false" naked singles. Something like initial cleanup.
- When solving all steps, it should switch to other sub puzzles before moving to another more complex technique. In other words: solve all singles in all sub puzzles, before checking for locked candidates in all sub puzzles, before checking for X Wing...
- Support for Paste using the variant currently used to decide the expected format (unless the paste data is another format like killer or jigsaw)
- Import could be prefilled with clipboard's content
- Import Clueless is sometimes disabled. It seems it cannot import a clueless a second time.

Since, I'm not familiar with your soft, I may have missed something.
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

Jean-Christophe wrote:- Confirm Transfer dialog when switching sub puzzle. IMHO it should be always Yes.
That will be in the next version
- After switching sub puzzle, one step to cleanup all candidates at once instead of several "false" naked singles. Something like initial cleanup.
So will that
- When solving all steps, it should switch to other sub puzzles before moving to another more complex technique. In other words: solve all singles in all sub puzzles, before checking for locked candidates in all sub puzzles, before checking for X Wing...
Nice idea - have to think about that one!
- Support for Paste using the variant currently used to decide the expected format (unless the paste data is another format like killer or jigsaw)
I'll need to look at what other infos are available in puzzle definitions - a block of 9x81 digits doesn't tell me if it's a Special or an Explosion
- Import could be prefilled with clipboard's content
Nice idea
- Import Clueless is sometimes disabled. It seems it cannot import a clueless a second time.
Sounds like a bug - I'll need to investigate that one.

Rgds
Richard
mhparker
Grandmaster
Grandmaster
Posts: 345
Joined: Sat Jan 20, 2007 10:47 pm
Location: Germany

Post by mhparker »

rcbroughton wrote:
Jean-Christophe wrote:- Support for Paste using the variant currently used to decide the expected format (unless the paste data is another format like killer or jigsaw)
I'll need to look at what other infos are available in puzzle definitions - a block of 9x81 digits doesn't tell me if it's a Special or an Explosion
I think what J-C means is that, if the currently selected puzzle type is compatible with the input format, the current puzzle type should be retained.

Example: If the puzzle type is switched to "Explosion", and a block of 9x81 digits is pasted, the puzzle type should remain "Explosion", and not be switched to "Clueless" (Special), as is currently the case. This is particularly important, because SS doesn't allow the user to subsequently explicitly switch to "Explosion" (the menu option is disabled!).

BTW, one thing I noticed that J-C didn't mention is that a Copy and Paste of the block of 9x81 digits directly from a forum page usually results in a "bad candidate import string" error, because each line usually contains a trailing blank in this case. Maybe the Paste functionality can be modified slightly to tolerate the trailing blanks, as the Import functionality appears to already be doing.
Jean-Christophe wrote:- When solving all steps, it should switch to other sub puzzles before moving to another more complex technique. In other words: solve all singles in all sub puzzles, before checking for locked candidates in all sub puzzles, before checking for X Wing...
I'm not sure that either the current approach or the one suggested by J-C would be ideal in all circumstances. For example, for rating a puzzle, or for seeing what techniques are required to solve it, J-C's approach would be the way to go. But there are probably other cases where a user would want to see how far one can go just using one of the subgrids. Possible reasons for this could be to determine how "balanced" the puzzle is, or simply just out of interest. Therefore, whilst having the capability proposed by J-C would be highly desirable, it would also be important to be able to manually "lock down" the current subgrid in order to prevent these automatic subgrid switches from occuring.

Look forward to trying out all the goodies in the next version! =P~
Cheers,
Mike
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

mhparker wrote:I think what J-C means is that, if the currently selected puzzle type is compatible with the input format, the current puzzle type should be retained.
That makes sense - it's going on the list . . .
BTW, one thing I noticed that J-C didn't mention is that a Copy and Paste of the block of 9x81 digits directly from a forum page usually results in a "bad candidate import string" error, because each line usually contains a trailing blank in this case. Maybe the Paste functionality can be modified slightly to tolerate the trailing blanks, as the Import functionality appears to already be doing.
That there is a bug and will be fixed.
I'm not sure that either the current approach or the one suggested by J-C would be ideal in all circumstances. For example, for rating a puzzle, or for seeing what techniques are required to solve it, J-C's approach would be the way to go. But there are probably other cases where a user would want to see how far one can go just using one of the subgrids. Possible reasons for this could be to determine how "balanced" the puzzle is, or simply just out of interest. Therefore, whilst having the capability proposed by J-C would be highly desirable, it would also be important to be able to manually "lock down" the current subgrid in order to prevent these automatic subgrid switches from occuring.
I'm thinking along the same lines - to have a separate "Solve Current Grid" and "Solve Puzzle" option.

Great stuff!! Keep the suggestions coming!!

Rgds
Richard
Glyn
Major Major Major
Major Major Major
Posts: 92
Joined: Tue Jan 16, 2007 1:00 pm
Location: London

Post by Glyn »

Richard. As we are discussing Clueless here, the Generalized Fish mentioned in my PM actually contain centre dots as one of the constraint sets.

I'll check out the latest solver to see if some of my comments are now out of date.

From experience in solving these I always visit the Clueless grid first for one quick pass looking for locked candidates. This usually gives quite a few places in the outer grid where centre dot candidates are locked in a row or column and eliminations can be made. This allows the outer grids to move quite a bit more on their first pass, and with simpler moves.

All the best

Glyn
I have 81 brain cells left, I think.
Jean-Christophe
Addict
Addict
Posts: 92
Joined: Mon Apr 23, 2007 12:50 pm
Location: Belgium

Post by Jean-Christophe »

mhparker wrote: I think what J-C means is that, if the currently selected puzzle type is compatible with the input format, the current puzzle type should be retained.
Yes, that's it. I Appologize for my poor english...
mhparker wrote:
Jean-Christophe wrote:- When solving all steps, it should switch to other sub puzzles before moving to another more complex technique. In other words: solve all singles in all sub puzzles, before checking for locked candidates in all sub puzzles, before checking for X Wing...
I'm not sure that either the current approach or the one suggested by J-C would be ideal in all circumstances. For example, for rating a puzzle, or for seeing what techniques are required to solve it, J-C's approach would be the way to go. But there are probably other cases where a user would want to see how far one can go just using one of the subgrids. Possible reasons for this could be to determine how "balanced" the puzzle is, or simply just out of interest. Therefore, whilst having the capability proposed by J-C would be highly desirable, it would also be important to be able to manually "lock down" the current subgrid in order to prevent these automatic subgrid switches from occuring.
I suggested this when solving all steps, the button with '>>'. I was surpized to see SS trying every technique on the first sub-grid, including very complex ones like bowman bingo, before switching to the second sub-grid. The puzzle looks like it's a real insane, whereas the same puzzle can be solved using singles only.
Post Reply