Sudoku grid test software

Programs which generate, solve, and analyze Sudoku puzzles

Sudoku grid test software

Postby sudokutester » Sat Dec 29, 2012 4:45 pm

Hi there,

Does anyone know of a freeware Windows application that is able to batch test a bunch of sudoku Grid's validity which I've grabbed from magazines by scanning and then OCR'ed them?
I discovered that I've already made one mistake in say about 35 Sudoku's.
Thanks in advance......
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby enxio27 » Sat Dec 29, 2012 9:54 pm

Several can do it for you:

Richard Broughton's Sudoku Solver

Simon Armstrong's Sadman Sudoku

Jean Christophe's JSudoku

Ruud van der Werf's Sudocue

There are probably others, but those are the ones I am familiar with. Incidentally, the first two of those authors also have OCR software specifically for sudoku that may work better than what you are using. The last two programs are no longer being developed, but they still work.
Last edited by enxio27 on Fri Jan 04, 2013 5:34 pm, edited 2 times in total.
User avatar
enxio27
 
Posts: 351
Joined: 13 November 2007

Re: Sudoku grid test software

Postby sudokutester » Sun Dec 30, 2012 12:31 am

Hi,

First of all thank you for your reply.
However:
Sadman Sudoku isn't freeware
JSudoku: I couldn't find any batch testing options within the program
SudokuCue: 3.1.0.1 Same as JSudoku couldn't find any batch testing options

SudokuSolver couldn't read my Text saved Sudoku's so I couldn't test it but I've noticed you could only load them one by one and that's not practical in my view if you have lots of Sudoku's needed testing.

SudokuSolver has no OCR option as far as I could see.
Sadman Sudoku's OCR is less good as Sudoku Susser's OCR capability which I use at this moment and moreover happens to be freeware.
Last edited by sudokutester on Sun Dec 30, 2012 11:38 pm, edited 3 times in total.
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby champagne » Sun Dec 30, 2012 6:55 am

Hi,

You can use the skfr rating tool that you find here

Just create a xxx.txt file and launch a batch with the command

skfr -ixxx (no blank in the name xxx)
or
skfr -i"xxx" (if there are blanks in the name xxx)

EDIT
non valid puzzles appear in the output file xxx_N_rat.txt with a rating ED= 0.0/0.0/0.1
champagne
2017 Supporter
 
Posts: 5725
Joined: 02 August 2007
Location: France Brittany

Re: Sudoku grid test software

Postby sudokutester » Sun Dec 30, 2012 11:29 pm

Hi

Thank you for your reply.
However I'm not a programmer so the explanation you gave about how to use the skfr rating tool is a riddle to me.
Can you please explain to an average computer user like me how to use the skfr rating tool?
T.i.a.......
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby daj95376 » Mon Dec 31, 2012 12:21 am

You might want to post a listing of 4-5 puzzles from your file after OCR scanning. That way, we'd have an idea of what we're up against for inputting your puzzles.
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Re: Sudoku grid test software

Postby champagne » Mon Dec 31, 2012 6:01 am

sudokutester wrote:Hi

Thank you for your reply.
However I'm not a programmer so the explanation you gave about how to use the skfr rating tool is a riddle to me.
Can you please explain to an average computer user like me how to use the skfr rating tool?
T.i.a.......


Hi

No need to be a programmer here, but I suspect you are also missing the knowledge of a batch file. The process would be the same using Sudoku Explainer as tool (but the command line is more complex)

The first step here is to download the program and to put it in a specific directory (unless you want to put it in c:\window\system32 directory to have it executable everywhere)

I assume here you decided to use a separate directory to keep all things under control, say "D:\myskfrdir"

You have now 2 tasks to achieve.

a) to prepare the batch file to process. It is here a text file having one line of 81 character for each puzzle to test
Each given appears as in the grid, free cells have any digit ont in the range "1_9", but generally a dot is a good sign for a free cell.

I guess you know how to create such a file using for example the right button of the mouse to open a new text file in the "D:\myskfrdir" directory.


b) The second task is to launch a batch with the appropriate command line.

A batch program is run in a specific window open by the program cmd.exe.
The easiest way for me to open the window is the following (to do once)

b1) with the right button of the mouse, in your directory, you open a new short-cut
you enter "cmd " as program name and click on the end button

b2) you have now your entry "cmd" in the directory, you have to change the default directory
click with the right button on the "cmd" entry and in the pop up windows choose "properties", the last item.

In the window erase the content of the "default directory"


you are now ready to run batches

Double click on the "cmd" entry, a window is open and you should be on the command line D:\myskfrdir>
ready to receive the command

enter (or do it through copy&paste) the expected command line

skfr -ixxx


==================================================

I did my best to have here the components of what you need; More or less, the process should be the same for any batch program.

I have to apologize, but I write this translating what i see on my French system. Some translations can use other words that the terms used on your own computer.

happy new year and good luck

champagne
champagne
2017 Supporter
 
Posts: 5725
Joined: 02 August 2007
Location: France Brittany

Re: Sudoku grid test software

Postby sudokutester » Mon Dec 31, 2012 2:20 pm

daj95376 wrote:You might want to post a listing of 4-5 puzzles from your file after OCR scanning. That way, we'd have an idea of what we're up against for inputting your puzzles.


Thank you for your reply.
First I scan them with my flatbed scanner.
Then I crop the scanned image ( it automatically puts the cropped image into the Clipboard) with Screenclipper.
Next I choose "Paste" in Sudoku Susser and it starts OCR'ing the scanned/cropped image.
The output:

+-------+-------+-------+
| . . . | 7 . 9 | . . . |
| . . 2 | 1 . 5 | 6 . 7 |
| . 5 . | . . . | . 9 . |
+-------+-------+-------+
| . . 9 | 6 . 8 | 4 . . |
| 4 8 . | . . . | . . 1 |
| . . 7 | 4 . . | 8 . . |
+-------+-------+-------+
| 2 1 . | . . . | . 6 . |
| . . 5 | . 7 . | 1 . . |
| . . . | 2 8 1 | . . . |
+-------+-------+-------+
Last edited by sudokutester on Mon Dec 31, 2012 2:32 pm, edited 2 times in total.
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby sudokutester » Mon Dec 31, 2012 2:30 pm

champagne wrote:I did my best to have here the components of what you need; More or less, the process should be the same for any batch program.

I have to apologize, but I write this translating what i see on my French system. Some translations can use other words that the terms used on your own computer.

happy new year and good luck

champagne


Thank you kindly for your extensive explanation of the skfr program but this is way off my computer understanding capabilities.
What does for instance -ixxx mean?
How can I test several text files in a batch with this program?

Is it possible to create a GUI for this software (that would help a lot in my opinion)?
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby enxio27 » Mon Dec 31, 2012 2:35 pm

sudokutester wrote:The output:

+-------+-------+-------+
| . . . | 7 . 9 | . . . |
| . . 2 | 1 . 5 | 6 . 7 |
| . 5 . | . . . | . 9 . |
+-------+-------+-------+
| . . 9 | 6 . 8 | 4 . . |
| 4 8 . | . . . | . . 1 |
| . . 7 | 4 . . | 8 . . |
+-------+-------+-------+
| 2 1 . | . . . | . 6 . |
| . . 5 | . 7 . | 1 . . |
| . . . | 2 8 1 | . . . |
+-------+-------+-------+

There's your problem right there. You need to convert each puzzle to a one-line, 81-character string, like this:

...7.9.....21.56.7.5.....9...96.84..48......1..74..8..21.....6...5.7.1.....281...

Put all of the puzzles you want to check into a single file, one line per puzzle. Name it with a file extension of .sdm. Then you can import it into Sudocue and check all of them in one batch.
User avatar
enxio27
 
Posts: 351
Joined: 13 November 2007

Re: Sudoku grid test software

Postby sudokutester » Mon Dec 31, 2012 2:47 pm

enxio27 wrote:There's your problem right there. You need to convert each puzzle to a one-line, 81-character string, like this:

...7.9.....21.56.7.5.....9...96.84..48......1..74..8..21.....6...5.7.1.....281...

Put all of the puzzles you want to check into a single file, one line per puzzle. Name it with a file extension of .sdm. Then you can import it into Sudocue and check all of them in one batch.


How do I batch convert them, is there a freeware program that can do that?
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby enxio27 » Mon Dec 31, 2012 4:22 pm

sudokutester wrote:How do I batch convert them, is there a freeware program that can do that?

There are a number of batch search-and-replace utilities out there to take out the spaces, CRLFs, and vertical bars from each puzzle file. Then you can use a file concatenator to merge them into a single file.

Is there any particular reason you have your heart set on this specific set of puzzles? Who produces those puzzles? Perhaps they have a Web site where you can get those same puzzles in electronic format.

There are many other sources of known-good puzzles of all difficulty levels, as well. I myself have a rather extensive collection.
User avatar
enxio27
 
Posts: 351
Joined: 13 November 2007

Re: Sudoku grid test software

Postby sudokutester » Mon Dec 31, 2012 9:37 pm

enxio27 wrote:There are a number of batch search-and-replace utilities out there to take out the spaces, CRLFs, and vertical bars from each puzzle file. Then you can use a file concatenator to merge them into a single file.

Is there any particular reason you have your heart set on this specific set of puzzles? Who produces those puzzles? Perhaps they have a Web site where you can get those same puzzles in electronic format.

There are many other sources of known-good puzzles of all difficulty levels, as well. I myself have a rather extensive collection.

I have no special reason for wanting these specific Sudoku puzzles, someone gave me her brand new Sudoko Puzzle Book (she didn't like solving Sudoku Puzzles) and I scanned and OCR'ed a bunch of them.

Thank you for your answer once again however I did all you'd specified but SudokuCue didn't do anything with the edited and merged Text File.
I don't think SudokuCue is capable of handling a batch of Sudoku's.
sudokutester
 
Posts: 13
Joined: 29 December 2012

Re: Sudoku grid test software

Postby enxio27 » Mon Dec 31, 2012 10:52 pm

sudokutester wrote:Thank you for your answer once again however I did all you'd specified but SudokuCue didn't do anything with the edited and merged Text File.
I don't think SudokuCue is capable of handling a batch of Sudoku's.

The author of Sudocue INVENTED sudoku batch handling. Read here:

http://sudocue.net/fileformats.php

Use the File/Classify option. Any puzzles that are skipped are invalid.

(Note: It's Sudocue, NOT SudokuCue.)
User avatar
enxio27
 
Posts: 351
Joined: 13 November 2007

Re: Sudoku grid test software

Postby sudokutester » Tue Jan 01, 2013 12:57 am

enxio27 wrote:The author of Sudocue INVENTED sudoku batch handling. Read here:

http://sudocue.net/fileformats.php

I don't know about the author of SudoCue INVENTING Sudoku batch handling but you're definitely right about the fact that SudoCue CAN handle a batch of Sudoku's.
I see my mistake now, you've told me to rename the extension to .sdm which I've overlooked.

enxio27 wrote:Use the File/Classify option. Any puzzles that are skipped are invalid.

No there is no File/Classify option you have to Open the .sdm file and then use the Page Down button to move from one Sudoku to another.
However the batch handling option of SudoCue is useless for my purpose because you cannot see exactly which file it's skipping (there are no file names appearing).

enxio27 wrote:(Note: It's Sudocue, NOT SudokuCue.)

I'm sorry you're right of course SudoCue is the correct name.........
sudokutester
 
Posts: 13
Joined: 29 December 2012

Next

Return to Software