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

Post by rcbroughton »

Hi All

I've just posted an updated version in the usual place to fix a couple of issues and enhance some of the solving routines.

The major fix is to the 45 Rule which was missing some simple eliminations.

The major enhancement is to extend the Empty Rectangle routine to also consider cages as well as Nonets - providing a much more powerful generalised version of X-Cycles and X-Chains for killer puzzles.

Change Log:

Version 2.0.8
1. Fixed problem with import/export window always staying in front of all other windows
2. Fixed problem in innie/outie routines where simple i/o cells were being missed
3. Modified X-Cycle, X-Chain and XY-Chain routines to find simplest chains first
4. Fixed potential error in x-cycle, x-chain, xy-chain routines where eliminations could be missed
5. Introduced killer variant into "Empty Rectangle" searches to implement "Generalised X-Wing" - also applies to X-Chain and XY-Chain searches

Version 2.0.7
1. Fixed problem with manual highlighting of cell digits
2. Fixed intermittent problem of combined cages not being created

Rgds
Richard
enxio27
Master
Master
Posts: 165
Joined: Sat Mar 17, 2007 1:20 am

Post by enxio27 »

rcbroughton wrote: 1. Fixed problem with import/export window always staying in front of all other windows
Thanks! (I also got your PM on this, by the way.)

Any updates on my question about "Show marks"?
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

enxio27 wrote:Any updates on my question about "Show marks"?
As per Para's comment, once a puzzle has been imported or created and you have switched to solver mode you can do an initial clean-up (for killer puzzles, this removes candidates based on initial cage combinations and for other puzzles it removes candidates based on naked singles).
This can be achieved by pressing F10, selecting "Step" from the "Solver" menu or clicking on the [>] button in the right hand panel.

It is designed this way so that it doesn't give too much away at the start - for some of the very simple puzzles that my kids like to do, updating from initial singles often produces several additional naked singles and spoils the fun for them.

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

Post by mhparker »

Hi Richard,
sudokuEd (on Assassin 74 thread) wrote:BTW - Richard has Sukoku Solver V2 released.
I must admit, I hadn't realized this. But Ed's right: I've just downloaded and installed SudokuSolver using your link above, and - sure enough - the version number is suddenly 2.0.8 rather than 1.4.3!

Unfortunately, the only indication that something had changed (apart from Ed's hint above) was the file size, which requires archiving the installation (.msi) files.

Hence my request, as follows:

Would it not be possible to include the version number in the initial splash screen? Then I/we would be able to simply exit the installation (without modifying any files on the computer) if I/we see that the version number matches the currently installed version.

On a similar note, it's confusing that the initial splash screen displayed when installing the help files (SudokuSolverHelp.msi) doesn't give any indication that it's only the help files that are being installed. Instead, the caption reads "Welcome to the Sudoku Solver Setup", which suggests that the program itself is being installed. Indeed, because the installation dialog and splash screens for the program itself and the help files are apparently identical, I aborted the help file installation originally, under the mistaken impression that you'd maybe made a mistake and posted the same install program twice!

Hopefully these issues are quick to fix in comparison to all that complex scoring-related stuff you're immersed in at the moment!

Thanks once again for a great piece of software. :D
Cheers,
Mike
enxio27
Master
Master
Posts: 165
Joined: Sat Mar 17, 2007 1:20 am

Post by enxio27 »

SudokuSolver can't find its help files. It insists that the help files aren't installed (they are). They're not installed in the default location, but they are in a subdirectory under the SudokuSolver directory (which is also not installed in the default location). Is SudokuSolver hard-coded to look only in the default location?
enxio27
Master
Master
Posts: 165
Joined: Sat Mar 17, 2007 1:20 am

Post by enxio27 »

Wish list for SudokuSolver

1. Print puzzles larger (perhaps size could be user-selectable)

2. Print puzzle title or file name

3. Batch print all grids of a multi-grid puzzle

4. Import directly from a file (WITHOUT cut'n'paste).

5. Read from standard Sudoku files (such as .SDC, .SDM, etc.) I keep getting errors when I try to open a standard Sudoku text file (Clueless, Samurai, etc.), even if I choose the correct puzzle type first.

6. Make Clueless "Store" a button rather than a pull-down menu option (or enable a hotkey)
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

enxio27 wrote:SudokuSolver can't find its help files. It insists that the help files aren't installed (they are). They're not installed in the default location, but they are in a subdirectory under the SudokuSolver directory (which is also not installed in the default location). Is SudokuSolver hard-coded to look only in the default location?
This is a bug - it should be reading a path from the registry and if it's not there it will look in the same directory as the main program. I've just checked the installers and noticed that the registry key is not getting set.
I'll have to fix that in the next version.
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

enxio27 wrote:Wish list for SudokuSolver

1. Print puzzles larger (perhaps size could be user-selectable)

2. Print puzzle title or file name

3. Batch print all grids of a multi-grid puzzle

4. Import directly from a file (WITHOUT cut'n'paste).

5. Read from standard Sudoku files (such as .SDC, .SDM, etc.) I keep getting errors when I try to open a standard Sudoku text file (Clueless, Samurai, etc.), even if I choose the correct puzzle type first.

6. Make Clueless "Store" a button rather than a pull-down menu option (or enable a hotkey)
1. I try to scale them to fit the page - I could make standard puzzles bigger on the page, but multi-grid will always be a bit small unless I went for a separate grid on each page. I'll take a look into print scaling options.

2. This is in the next release, together with an option to print the text in the Solver Log box

3. You can print all grids from a Samurai or Clueless in the current version - on the print dialog choose between "All Pages", "Current Page" and "Selection". In the next release, this print dialog has been clarified and simplified.

4. Should be relatively straightforward and something I have considered. Maybe in a couple of versions time.

5. SS doesn't know about these other fil formats (mainly because neither do I :) ). If somebody could enlighten me as to how these files are laid out, I could always provide some support for them.

6. I'll add this to the list of things to think about how I could lay it out.

Thanks for your feedback.

Rgds
Richard
stingingscorp
New kid on the Grid
New kid on the Grid
Posts: 3
Joined: Fri Nov 09, 2007 10:02 pm
Location: Canada

Post by stingingscorp »

Can you load an empty grid? (To manually type in the numbers of a puzzle?) Or save an empty grid?
Glyn
Major Major Major
Major Major Major
Posts: 92
Joined: Tue Jan 16, 2007 1:00 pm
Location: London

Post by Glyn »

I'm sure Richard can answer this in more detail, but if you select the appropriate type of puzzle and move directly to Solve mode from the drop down File menu it should work nicely, for all forms you requested.

By the way you can set up a blank Samurai from Clueless Helper, just a text file with 81 zeros, I'm using that to work on DOAG at present. Unfortunately there are some values in the .clu format that I don't understand so I've no idea how to set up Clueless or Clueless Explosions that way.
I have 81 brain cells left, I think.
enxio27
Master
Master
Posts: 165
Joined: Sat Mar 17, 2007 1:20 am

Post by enxio27 »

rcbroughton wrote: 1. I try to scale them to fit the page - I could make standard puzzles bigger on the page, but multi-grid will always be a bit small unless I went for a separate grid on each page. I'll take a look into print scaling options.
My primary reason for using Sudoku Solver is to print each grid (with candidates) of a multi-grid puzzle on a separate page. Under the current arrangement, the grid ends up being awfully small, especially candidates.
5. SS doesn't know about these other file formats (mainly because neither do I :) ). If somebody could enlighten me as to how these files are laid out, I could always provide some support for them.
An .SDK file is simply a text file containing a single line of 81 characters comprising a single 9x9 puzzle. Empty cells are represented by zeros.

An .SDM file is a text file containing a set of 2 or more 81-character lines, representing either a multi-grid puzzle (Samurai, Clueless, etc.) or multiple 9x9 individual puzzles. See one of Ruud's multi-grid puzzles posted to these forums for an example.

Sadman Sudoku's .SDC file is similar to the .SDM file but can have additional info (user-defined) on each line AFTER the 81-digit puzzle info, which is handy for storing information such as the Sudocue difficulty rating, puzzle source, etc.

An .SDX file is a puzzle progress file (text) containing candidates (delimited by braces) and solved cells (preceded by "u") as well as original clues. These are arranged in one line per puzzle row, with cells separated by spaces.

Hope this helps some!
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

Hi All

I've had some more feedback and have incorporated some more features and bug fixes into the latest update. The program is now at version 2.1.2. The help file has also been updated to address an installation problem and to reflect changes to the user interface.

There is a major overhaul to the printing, which makes it clearer what the print options are, allows multi-grid puzzles to be printed one per page, includes the puzzle description in the printout and optioanlly allows all the solver notes to be included in the printout.

In the Solver for killer puzzles, the 45 Rules have been simplified so that really complex 45 Rule combinations are now restricted to the "Extended", "Complex" and "Insane" categories. The 45 Rules also now take account of any fully included hidden cages when analysing innies and outies.

The full change log is shown below.

Rgds
Richard

Code: Select all

Version 2.1.2
1.	Fixed problem in formatting of cages when printing killer puzzles

Version 2.1.1
1.	Fixed error where bookmarks dialog sometimes had drop-down list incorrectly disabled 
2.	Fixed problem with bookmark GoTo function positioning incorrectly in the solver text 
3.	Extended embedded hidden cage check on 45 Rules to correctly handle outies as well as innies
 
Version 2.1.0
1.	Added a routine for Killer puzzles to find hidden cages as an initial step 
2.	Cleaned up Solver Log output for step 0 
3.	Added routine to identify "double" hidden cages, created when one hidden cage is a subset of another hidden cage 
4.	Modified default order of routines for Scoring 
5.	Fixed problem in Locked Candidate routine that was failing to lock candidates in cages 
6.	Modified 45 Rule innie/outie calculations to take account of embedded hidden cages 
7.	Fixed bug in installation routine that was incorrectly recording the Help file installation path 
8.	Fixed bug in save routine that caused incomplete details to be saved from setup mode 
9.	Fixed intermittent problem in Batch Solve dialog that could freeze the display 
10.	Added "Load" button to Solver Options window 
11.	Simplified 45 Rule checks Double Cell, Single House and Multi Houses - more complex eliminations now limited to Extended, Complex, Extreme and Insane 

Version 2.0.9 (unreleased)
1.	Fixed import problem for V1 save files 
2.	Improved error handling around undo/redo which could cause program instability 
3.	Modified printing to include puzzle description and (optionally) to print solver log output 
4.	Modified print dialog to allow clearer selection of Samurai/Clueless grid printing and to select solver log output 
5.	Fixed problem with solver options dialog Move Up/Move Down processing 
6.	Modified installation files to show version number on the installation dialog 
7.	Changed Empty Rectangle routines to further cater for General/Grouped chain nodes 
8.	Fixed bug in Jigsaw Law of Leftovers routine that was causing a general error 
9.	Fixed a bug in X-Chain eliminations that could cause the solver to loop 
10.	Fixed problem in hidden triple/quads where incorrect candidates could be left in a cell 
11.	Fixed problem where solver options were not being saved correctly from the Batch Solve window
stingingscorp
New kid on the Grid
New kid on the Grid
Posts: 3
Joined: Fri Nov 09, 2007 10:02 pm
Location: Canada

Post by stingingscorp »

Glyn wrote:By the way you can set up a blank Samurai from Clueless Helper, just a text file with 81 zeros, I'm using that to work on DOAG at present. Unfortunately there are some values in the .clu format that I don't understand so I've no idea how to set up Clueless or Clueless Explosions that way.
I tried this, but could not save it. I even loaded one of the puzzles from here, saved it as a 'blank' and then deleted everything from it. When I opened it up again, it was the same as the puzzle I had loaded!?! instead of blank!?!

I don't get it.

I also wanted to try the moag using the samiura helper in the clueless helper, oh well, I'll just keep trying.
Nasenbaer
Master
Master
Posts: 167
Joined: Thu Jul 20, 2006 7:19 am
Location: Fellbach (Deutschland)

Post by Nasenbaer »

stingingscorp wrote:I also wanted to try the moag using the samiura helper in the clueless helper, oh well, I'll just keep trying.
I used it to solve moag and moag2 (from the other forum). I created the 9 samurais by setting them up with File->Import->Samurai. (No overlapping, the connecting sudokus were solved with the help of SudoCue, so "only" 9 samurais)

My biggest problem with this great helper is that it eats my resources like nothing. After about 2 hours I have to restart my computer because the menues are blank. And the only other program running is Firefox. Granted, my computer comes from the stone age (666MHz, 256 MB, Win98), but I think the problem is garbage collection. There are programming languages which do an automatic garbage collection (mostly only for basic variable types), but usually you have to do it on your own. Remember: Every object you created has to be destroyed.

The other problem I have is definitly to blame on .NET Framework and my computer: speed and reaction time. Sometimes I end up with 2 marked cells instead of one because my mouseclick came too fast after the previous action. But I learned to live with it. :wink:

Keep up the good work with this great program! :D
enxio27
Master
Master
Posts: 165
Joined: Sat Mar 17, 2007 1:20 am

Post by enxio27 »

rcbroughton wrote:There is a major overhaul to the printing, which makes it clearer what the print options are, allows multi-grid puzzles to be printed one per page,
I'm having trouble with this. Whenever I try to print a multi-grid puzzle (one per page), it prints the numbers from the active grid on ALL the grids (the shading is correct, but the numbers are wrong for all but the active grid). Also, the puzzle title is omitted, and the grid numbers are incorrect (all odd numbers). This is using the version of the program that I downloaded yesterday.

On the subject of puzzle file formats, I neglected to direct you here. I think you'll find this page quite useful.
Post Reply