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

New Solver & Helper for Standard/Killer/Clueless Puzzles

Post by rcbroughton »

Hi all

after a lot of development and some feedback from other members of the forum who've been helping test it, I'm announcing a release of my Helper/Solver program.

It handles standard 3x3 Sudoku, diagonal variants, Killer, zero killer, Jigsaw, Jigsaw Killer, Samurai, Clueless and Clueless explosion puzzles.

The program features:
  • full load & save at any point
    full undo/redo history saved with the puzzle
    bookmarks so you can quickly move back to previous steps
    built-in notepad for manually recording moves
    automatic recording and reporting of all changes made
    extended combination calculator for Killer puzzles
    Killer sum tool for finding 45-rule eliminations
    Jigsaw LOL tool
    batch solver to load/save puzzle libraries
    highlights and describes individual eliminations to act as a training aid
As a solver it has a wide range of automated techniques for all puzzle types - it turned out a 98% success rate on the first 1000 of Ruud's top 10000 and will generally perform as well as, or better than other solvers on killer and jigsaw puzzles.

The program (currently at Version 1.3.5) is available here: http://www.piarina.com/sudoku/SudokuSolver.msi and a comprehensive help file can be downloaded separately here: http://www.piarina.com/sudoku/SudokuSolverHelp.msi

If you want to browse the help file on line, go to: http://www.piarina.com/sudoku/

Hopefully some of you will find it a useful addition to your support tools.

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

Post by rcbroughton »

Updates & fixes:

Just to let people kow I have put up a new version of the program to fix a few issues and incorporate a few minor enhancements.

If you use the program, I recommend updating to the latest version.

Code: Select all

Version 1.3.7

1. Bookmark option on Go To menu to any step number and start/end position
2. Fixed interference between Double click delay and Single click cell selection

Version 1.3.6

1. Fixed issue with incorrect cage selection following combination edit
2. Fixed solver bug where Extended Cage Placement was finding multiple eliminations
3. Fixed Extended cage combinations not recalculating correctly on automatic update
4. Fixed problem with undo history when saving a puzzle with undone steps
5. Fixed crash when selecting a combination to display in combo calculator
6. Modified combination display box to show all combinations
7. Added modified Bowman's Bingo routines to use more sophisticated searches
8. Added Cage Cleanup, Cage Placement and Bowman's Bingo to the Solve Menu
9. Small performance improvements to cell selection logic
Rgds
Richard
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

A glitch in the Hidden Cage function was pointed out to me.

A patched version 1.3.8 is available to fix this problem if you come across it.
nj3h
Gold Member
Gold Member
Posts: 111
Joined: Mon Jul 10, 2006 12:58 pm
Location: Virginia / USA

Post by nj3h »

Hi,

Just curious, are you planning to add a module for puzzle generation, with specific solving techniques being selectable?

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

Post by rcbroughton »

Just put a new version 1.4.0 of the software onto the website http://www.piarina.com/sudoku/SudokuSolver.msi This fixes a few bugs and adds a couple of new features.

Code: Select all

Version 1.4.0
1. Added Recent files list to the File menu for quick access
2. Added Save button to Solver Options window to save personal preference for selected routines
3. Added 2 and 3-cell innie/outie groups as hidden cage type for solver - allows non-unique digits
4. Modified file format to save/load full cage information - retained backward compatibility
5. Fixed bug in Split Cage routines that could cause a crash on innie/outie searches (Unable to place permutation for 45 Rule)
6. Fixed bug in Batch solve when using Bowman's Bingo
7. Modified feedback text for cage blocking cells
8. Reordered default solver routines to put single/dual innies/outies higher in the list
9. Removed redundant "Complex" Bowman routine - renamed "Extreme" Bowman routine
10. Fixed bug in Naked Triangle routine for Diagonal Variants eliminating incorrect candidates
11. Fixed bug in Unique Rectangles routine for Diagonal Variants (corners must be in the same diagonal or not in any diagonal)
Rgds
Richard
mhparker
Grandmaster
Grandmaster
Posts: 345
Joined: Sat Jan 20, 2007 10:47 pm
Location: Germany

Post by mhparker »

Hi Richard,

Thanks for the info. You've certainly been busy recently!
rcbroughton wrote:10. Fixed bug in Naked Triangle routine for Diagonal Variants eliminating incorrect candidates
Isn't this what is usually referred to as a Crossover?
Cheers,
Mike
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

mhparker wrote:Isn't this what is usually referred to as a Crossover?
Not familiar with the term. Equally, I don't expect anybody to recognise the term "Naked Triangle" as that just happens to be what I call it.

The technique is applied to diagonal variants and considers three cells in a triangle pattern - 2 on a diagonal and the third at the common peer (e.g. r2c2, r4c4 and r4c2 or r2c2, r4c4 and r2c4). The process is to find a naked triple in these 3 cells where one of the digits occurs only in 2 cells. That candidate can then be removed from all peers of the two cells. Hence, I called it Naked Triangle because it's a naked triple in a triangle pattern of cells.

An extension of the technique looks for quadruplets using both diagonals and the centre.

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

Post by mhparker »

Hi Richard,

Thanks for the explanation. BTW, it's not the same as a crossover.

A crossover is just a case of Common Peer Elimination applied to a diagonal. That is, any cell that can see all candidate positions for a particular digit on a diagonal cannot have that digit.

I personally never liked the term crossover anyway, partially because a double crossover is something completely different (Turbot fish on both diagonals). There are also triple, quadruple (and so on) crossovers, which were different in concept still. It's all a bit of a mess, so I'm glad it's not AFAIK in Sudopedia.

Your "Naked Triangle" is, on the other hand, an interesting concept that I had not thought about before. I wonder how often it crops up in practice.
Cheers,
Mike
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Post by rcbroughton »

mhparker wrote:A crossover is just a case of Common Peer Elimination applied to a diagonal. That is, any cell that can see all candidate positions for a particular digit on a diagonal cannot have that digit.
In which case, I do know these - and they're already built into the solver as common peer eliminations.
Your "Naked Triangle" is, on the other hand, an interesting concept that I had not thought about before. I wonder how often it crops up in practice.
I think I saw one once . . .
Para
Yokozuna
Yokozuna
Posts: 384
Joined: Wed Nov 08, 2006 7:42 pm
Location: The Netherlands

Post by Para »

Hi Richard
rcbroughton wrote:I think I saw one once . . .
Ed used it once in the jan 12th x-treme - MOAX. You can find it here: http://www.sudocue.net/forum/viewtopic.php?p=1572#1572. It's at the bottom of that particular message(step 25).

greetings

Para
sudokuEd
Grandmaster
Grandmaster
Posts: 257
Joined: Mon Jun 19, 2006 11:06 am
Location: Sydney Australia

Post by sudokuEd »

Para wrote: MOAX.
Great memory Para. I'd forgotten about that one.

Richard, I'm really enjoying using Sudoku Solver. Congratulations - it's fantastic being able to save progress, bookmark, back-track etc.

Seems that the current version (1.4.0) has some bugs with the solver. ](*,) It suddenly can't solve Assassin 53V3 without resorting to Bingo. Others are taking much longer than they used to to solve.

Another example is Assassin 57. It can no longer solve it with basic Assassin techniques. It is missing 1 or more from Locked cages, 45 rule Multiple Houses, Locked Candidates, 45 rule Single innies/outies. With 45 Rule 2 innies/outies, it actually gets further with it unticked!

Now that I can't work any more on developing an accurate Killer rating system, means I can actually do some solving! So, so far behind. :cry:

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

Post by rcbroughton »

sudokuEd wrote:Seems that the current version (1.4.0) has some bugs with the solver.It suddenly can't solve Assassin 53V3 without resorting to Bingo. Others are taking much longer than they used to to solve.
Glad you're there to keep me straight Ed.

Hopefully I've tracked down that little Gremlin for you and there's a patched version available.
Now that I can't work any more on developing an accurate Killer rating system, means I can actually do some solving! So, so far behind.
No excuses now!

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

Post by rcbroughton »

Hi All

A bit jet-lagged from a couple of weeks in the US, I hope that doesn't mean I've introduced any bloopers into this version!

I've put V1.4.2 on the website this afternoon. This fixes a couple of bugs and also puts in the start of a scoring mechanism - on the Solver menu there is now an additional option "Score".

The changelog for this version is given below

Code: Select all

Version 1.4.2
1. Added solver routine for standard Killer LOL
2. Fixed bug in Cage Sum that was missing some simple eliminations
3. Fixed bug in display where Ctrl-A was not selecting all text in the solver log
4. Added initial solver step analysis to aid rating of puzzles
5. Fixed bug in Cage Cleanup where some simple combination eliminations were being missed
6. Fixed bug in 45 Rule searches where hidden cages were not always being saved correctly
Scoring
Clicking the Score option will reset the puzzle to its starting point and then run through a complete solution, using the current solver option settings. (You get no updates while it is doing this). When it has finished, you get a display of the solver routines that have been used, and how many times they have been used. e.g. This is the analysis for Assassin 53

Code: Select all

56	CageSumSimple	
38	Naked1	
31	Rule45DoubleCell	
11	LockedCandidates	
7	Naked2	
7	CageBlockersSimple	
7	CagePlacementSimple	
6	Rule45SingleHouse	6
6	Hidden1	
4	Rule45SingleHouse	4
4	Rule45SingleHouse	3
3	LockedCagesExtended	
3	CageCombinationsSimple	
2	CageSumExtended	
1	Hidden4	
1	LockedCages
For most routines, this is a simple count, but:
i) For 45 Rules routines, you also get an additional figure to indicate how many cells were used in the elimination - in the above example, the 45 Rule Single House was used 6 times with 6 innie/outies, 4 times with 4 innies/outies and 4 times with 3 innies/outies
ii) for x-wing/x-cycle/xy/Empy Rectangle, you also get an addiitonal figure showing the length/size of the chain
iii) for ALS, you get an addiitonal figure showing the set size used
iv) for Bowman's Bingo simple & complex, you get an additional figure showing the depth of T&E steps used.

I'm now trying to work on getting some scores against the different routines so that we get a meaningful overall total.

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

Post by enxio27 »

A little niggle: the window for importing the puzzle definition is always in the foreground and in the way, which is quite annoying when I open the window first and then go to Explorer to find the file that contains the definition. I think that the window should be in the foreground whenever Sudoku Solver is the active program, but otherwise it should hide behind other windows.

Also, is there a reason that "Show marks" doesn't automatically eliminate candidates that should be eliminated by the original clues? Is there a way to make Sudoku Solver eliminate those candidates in one step, rather than having to click each clue and press CTRL-U for each one?
Para
Yokozuna
Yokozuna
Posts: 384
Joined: Wed Nov 08, 2006 7:42 pm
Location: The Netherlands

Post by Para »

Hi

What i always do is have the solver make one step and it updates all the candidates instantly for a grid.

greetings

Para
Post Reply