Simple Sudoku - solver for Win9x, Win2000 & WinXP

Programs which generate, solve, and analyze Sudoku puzzles

Simple Sudoku - solver for Win9x, Win2000 & WinXP

Postby angusj » Sun Jun 12, 2005 12:02 pm

Simple Sudoku

28 Jun 05 - Updated to version 3.0

Image

Main Features:
    'Candidates' automatically update when new values are entered
    Multi-cell selection to aid excluding candidates
    Filtering of candidates (almost essential to visualize advanced methods)
    Color highlighting of filtered candidates to trace "reciprocal pairs"
    Multi-level undo (ie all the way back to the start)
    Save and load games (even partially completed ones)
    Paste games from the clipboard
    Extensive hints from logical methods (no guessing)
    Application resizes relative to screen resolution
    It's free, but for private use only.
http://www.angusj.com/sudoku/

.
Last edited by angusj on Sun Aug 07, 2005 1:59 am, edited 6 times in total.
angusj
 
Posts: 306
Joined: 12 June 2005

Postby scrose » Thu Jun 16, 2005 7:20 pm

Wow! I really like your program. The "Hide all Possibles except" feature is very handy when trying to spot those elusive x-wings and swordfishies. I like how your hints aren't too straight-forward; they just point you in the right direction. I also like that you can make multiple undo's. Your puzzle pasting feature works very well. And, of course, the freeware is extremely attractive. Is the source-code available? My feedback and suggestions follow.

My numeric keypad (with NumLock on) won't let me enter numbers. Is this a problem only I am encountering? Note that, for me, when I turn NumLock off, the numeric keypad works fine as navigation. Please make it possible to enter numbers via the numeric keypad.

Please make it easier to remove pencilmarks via the keyboard. Perhaps by holding down Alt while typing the number, the pencilmark will be removed.

Hitting F7 a second time could give you a more precise hint. For example: Press F7 once and you see "Only one possibility". Hit F7 a second time and you see "8 is the only possibility".

Could you add a feature that takes you through the puzzle a step at a time, perhaps by hitting F8?

The automatic resize on open is nice feature, but there are times it might be nice to make the window a little smaller. Can you re-enable the ability to shrink the size of the window?

The save feature works nicely. Could you add a feature that lets you also save your pencilmarks?

Overall, two thumbs up, five stars, a job well done. Keep up the fine work!
scrose
 
Posts: 322
Joined: 31 May 2005

Postby angusj » Thu Jun 16, 2005 11:28 pm

scrose,

Firstly, thank you for your very encouraging feedback and your really excellent suggestions.

No, I'm afraid the source code is not available.

Thanks for spotting the numeric keypad bug (a bit of a show stopper!) - Simple Sudoku was developed on my laptop so I missed that one.

Removing pencilmarks (candidates) as you suggest by holding down the Alt is a great idea as is your double hint idea.

I'll consider your Step Through option, I guess when combined with hints it could be a kind of tutorial.

Not sure about the shrink option - why would that be helpful to you?

Yes, pencilmark (candidate) state should already be preserved when saving. Are you not finding that the case?

angusj
angusj
 
Posts: 306
Joined: 12 June 2005

Postby scrose » Fri Jun 17, 2005 1:18 am

angusj wrote:No, I'm afraid the source code is not available.

What about only the code that handles the part where puzzles are pasted into the program. I'm really intrigued to see what sort of pattern recognition you employ. Do you use regular expressions to manipulate the pasted puzzle?

angusj wrote:I'll consider your Step Through option, I guess when combined with hints it could be a kind of tutorial.

A tutorial is a good idea. My thought was to be able to quickly step forward to a point that is a few dozen steps into the solution without having to manually complete each step. However, I can see a Step-Through option making it very easy for people to quickly burn through a solution without having to think very hard. Perhaps by only implementing the Second-Hint option and still requiring manual input for each step, the user will be forced to work towards the solution at a slower pace, forcing them to consider the implications of each step. I will leave this up to you to decide.

angusj wrote:Not sure about the shrink option - why would that be helpful to you?

When I'm using your program and, at the same time, trying to type something in a web browser, I have to keep Alt-Tabbing back and forth between the two windows because your program window is so large. It would be nice to resize your program window so I can have it and my web browser side-by-side.

angusj wrote:Yes, pencilmark (candidate) state should already be preserved when saving. Are you not finding that the case?

Yes, the candidate state is being properly recorded when I save. It took me a couple minutes and a few moves to understand the format. Very cleverly done. I suspect this is how your undo history works so well? (I just noticed that you can open a saved file and then perform undo's. Very slick!)

What I was suggesting is something like the following. Suppose you paste the following (ridiculously simple) puzzle into your program.

Code: Select all
 . . . | 7 1 9 | 8 4 6
 1 6 8 | . 3 . | 7 9 .
 9 4 7 | . 8 2 | . . .
-------+-------+-------
 8 7 5 | 9 . 1 | . . 4
 2 1 6 | 3 . 4 | 9 8 7
 4 . . | 8 . 6 | 5 2 1
-------+-------+-------
 . . . | 1 9 . | 2 7 3
 . 9 1 | . 4 . | 6 5 8
 3 8 2 | 5 6 7 | . . .

Then your program does its fantastic job of quickly displaying the candidates. At this point, it would be nice if I could export a snapshot of the candidates. Perhaps your program could produce a text output similar to the following. It could either output it to a file or to the clipboard.

Code: Select all
{5}  {235} {3}  |  7   1   9  |  8    4    6
 1    6     8   | {4}  3  {5} |  7    9   {25}
 9    4     7   | {6}  8   2  | {13} {13} {5}
----------------+-------------+---------------
 8    7     5   |  9  {2}  1  | {3}  {36}  4
 2    1     6   |  3  {5}  4  |  9    8    7
 4   {3}   {39} |  8  {7}  6  |  5    2    1
----------------+-------------+---------------
{56} {5}   {4}  |  1   9  {8} |  2    7    3
{7}   9     1   | {2}  4  {3} |  6    5    8
 3    8     2   |  5   6   7  | {14} {1}  {9}

I have thought of one more feature request. Under the File menu, could you please add a recently saved/opened file history list, similar to what you see in Word or Notepad.

And a couple more kudos. Bravo to you for providing all of your menu options with shortcut keys; being someone who usually lets the mouse sit idle, I appreciate being able to use a program solely via the keyboard. And I really like the order and positioning in which your candidates are displayed.

Code: Select all
123
456
789

When I solve a sudoku on paper, I write my pencilmarks in the exact locations you have placed yours.
scrose
 
Posts: 322
Joined: 31 May 2005

great job, one small fix

Postby houzi » Fri Jun 17, 2005 2:32 am

angusj, your hint page is the most clearly-written I've seen yet; great job! I haven't tried your software (I run Linux).

One small thing to fix on the hints page (I think it's just a typo), under the first big paragraph about swordfish, you say "Any other occurences of this specific candidate in these columns rows can be excluded safely." I believe you should delete the word "rows" there.
houzi
 
Posts: 3
Joined: 15 June 2005

Postby angusj » Fri Jun 17, 2005 4:10 am

OK. Version 1.8c is now out!

Changes:
Alt+1 ... Alt+9 to exclude candidates in selected cells
Most Recently Opened Files menu option
Numeric keypad should now work
3 layout options: small, medium & large
Other things I've forgotten:)

Still to come:
Super hints as suggested by scrose.

scrose wrote:Do you use regular expressions to manipulate the pasted puzzle?


No. I'll see if I can knock up some pseudo code for you when I'm not distracted by other things:)

scrose wrote:What I was suggesting is something like the following. Suppose you paste the following...


I'll give it some thought, but unlikely at this stage.

scrose wrote:And a couple more kudos...


Thanks again.
Last edited by angusj on Fri Jun 17, 2005 12:16 am, edited 2 times in total.
angusj
 
Posts: 306
Joined: 12 June 2005

Re: great job, one small fix

Postby angusj » Fri Jun 17, 2005 4:13 am

houzi wrote:angusj, your hint page is the most clearly-written I've seen yet; great job!


Thanks!
I've fixed the typo - thanks for pointing it out.
angusj
 
Posts: 306
Joined: 12 June 2005

Postby scrose » Fri Jun 17, 2005 1:08 pm

angusj wrote:OK. Version 1.8c is now out!

Wow, that was fast! All the new features look great. Thanks very much!

angusj wrote:No. I'll see if I can knock up some pseudo code for you when I'm not distracted by other things

Thank you, even pseduo-code would be greatly appreciated. The day before I discovered your program, I was contemplating how to write code to recognize a variety of text-based sudokus. And as with most ideas, I discovered someone had already done it!

Thanks again for adding those features!
scrose
 
Posts: 322
Joined: 31 May 2005

Postby Animator » Fri Jun 17, 2005 2:35 pm

scrose wrote:Thank you, even pseduo-code would be greatly appreciated. The day before I discovered your program, I was contemplating how to write code to recognize a variety of text-based sudokus. And as with most ideas, I discovered someone had already done it!


A bit an off-topic reply, but here is it anyway: regular expressions are definitely an option... When a grid is pasted on this forum I usually use 2, 3 or 4 regexes to convert them to the format I'm used to...

The only bad thing about it at the moment is that I rewrite the regexes for each puzzle... But that's mainly due to the fact that they are easy and that the language I use allows them to be used really easily...

A small example of the command I run (assuming input: 123 456 ..., and output: 1 2 3 | 4 5 6 | * * * ):
perl -pi -e 's/ /|/g;s/\./*/g;s/./$& /g;' filename
Animator
 
Posts: 469
Joined: 08 April 2005

Postby smh » Fri Jun 17, 2005 2:51 pm

I've found a small bug.

When you enter a wrong number in a cell and then change it, other cells aren't updated.
smh
 
Posts: 4
Joined: 13 June 2005

Postby scrose » Fri Jun 17, 2005 3:08 pm

smh wrote:I've found a small bug. When you enter a wrong number in a cell and then change it, other cells aren't updated.

I'm not speaking on behalf of the program author, angusj; I'm just offering my own opinion when I say that I don't think this is a bug. At no point does the program automatically add candidates/pencilmarks: it only removes them automatically. So if an incorrect number is put in a cell, the candidates/pencilmarks are automatically removed from the corresponding row/column/block. To correct that mistake and restore the candidates/pencilmarks, you should use the undo feature, then enter the correct number. But I'll let angusj decide the matter.
scrose
 
Posts: 322
Joined: 31 May 2005

Postby scrose » Fri Jun 17, 2005 3:22 pm

Animator wrote:regular expressions are definitely an option... When a grid is pasted on this forum I usually use 2, 3 or 4 regexes to convert them to the format I'm used to...

I've started a topic on the programmers' forum where we can discuss this further.

P.S. I'm happy to learn that you're a Perl user, too.
scrose
 
Posts: 322
Joined: 31 May 2005

Postby smh » Fri Jun 17, 2005 3:34 pm

scrose wrote:
smh wrote:I've found a small bug. When you enter a wrong number in a cell and then change it, other cells aren't updated.

I'm not speaking on behalf of the program author, angusj; I'm just offering my own opinion when I say that I don't think this is a bug. At no point does the program automatically add candidates/pencilmarks: it only removes them automatically. So if an incorrect number is put in a cell, the candidates/pencilmarks are automatically removed from the corresponding row/column/block. To correct that mistake and restore the candidates/pencilmarks, you should use the undo feature, then enter the correct number. But I'll let angusj decide the matter.


Thanks, i didn't look at it this way. It probably makes sence.
smh
 
Posts: 4
Joined: 13 June 2005

Postby angusj » Fri Jun 17, 2005 10:47 pm

smh wrote:I've found a small bug.

Yes, I agree it's a bug. Although scrose is right in the sense that the way I had intended corrections to be made is with the undo feature, SS should prevent you from making corrections any other way.
Thanks for the feedback.

Edit: Updated and fixed in version 1.8e
angusj
 
Posts: 306
Joined: 12 June 2005

Postby scrose » Sat Jun 18, 2005 8:06 pm

The new Solve Next Step feature is quite nice. Thank you.

I am having a problem with using the Alt key with (what else) the numeric keypad. The Alt key works as expected when using the numerals above the alphabet, but the cell is being filled with a big number when I use the numeric keypad while holding down the Alt key. It is as if the numeric pad doesn't recognize the Alt key is being pressed.

Another feature suggestion. Sometimes I find myself hitting undo a few times too many and then I have to manually re-enter some steps. A redo action (Ctrl + Y) would be nice to have. Similar to the forward button in a web browser, the redo action would only repeat steps that have been undone.
scrose
 
Posts: 322
Joined: 31 May 2005

Next

Return to Software