file formats

Programs which generate, solve, and analyze Sudoku puzzles

file formats

Postby angusj » Wed Jun 29, 2005 10:35 am



        note by Moderator --
        this discussion originated in a section on "Library books and puzzles"
          i.e. a section devoted to sudbook files
          (input to the Pappocom software)
        the discussion has now been moved to the software section


    What file formats are valid for posting here?

1. Can text file formats be posted here or are only .sud files allowed?

2. Are .sud files in binary or text format and if the latter could someone post an example?

Thanks:D
angusj
 
Posts: 306
Joined: 12 June 2005

Postby simes » Wed Jun 29, 2005 11:18 am

.sud files are binary and Wayne has avoided giving out the structure when asked.

http://forum.enjoysudoku.com/viewtopic.php?t=80

There was a question, I think on The Times website Q&A (http://www.timesonline.co.uk/article/0,,18209-1406864,00.html), about the file format. Wayne gave a politician's answer. (He answered the question without answering the question!)
Last edited by simes on Sun Dec 11, 2011 2:31 pm, edited 1 time in total.
simes
 
Posts: 324
Joined: 11 March 2005
Location: UK

Postby RFB » Wed Jun 29, 2005 12:48 pm

The text format that Wayne's program support is the XML sudbook format which allows multiple puzzles to be compiled within a file.
It is not used for saving Pencil marks and other intermediate state.
I will send you an example in an email.
Rubylips solver also supports the XML format.

Simes and AngusJ you both use a much simpler text format - it would be quite nice if you recognized each others format. It is possible to copy and paste from Simes program to AngusJ but not vice versa (without pasting into an intermediate file) because Angus includes pencil marks and other state in his clipboard data.
Code: Select all
.ss file format
...|..8|931
98.|13.|...
31.|9..|6.8
-----------
421|567|893
638|419|752
..9|823|146
-----------
2.5|.91|.87
1..|.8.|.69
89.|7..|.1.

E15002

SS clipboard data
...|..8|931
98.|13.|...
31.|9..|6.8
-----------
421|567|893
638|419|752
..9|823|146
-----------
2.5|.91|.87
1..|.8.|.69
89.|7..|.1.


...|..8|931
98.|13.|...
31.|9..|6.8
-----------
421|567|893
638|419|752
..9|823|146
-----------
2.5|.91|.87
1..|.8.|.69
89.|7..|.1.


[57]   [4567] [2467] [26]   [457]  [8]    [9]    [3]    [1]   
[9]    [8]    [2467] [1]    [3]    [2456] [45]   [27]   [45]   
[3]    [1]    [247]  [9]    [457]  [245]  [6]    [27]   [8]   
[4]    [2]    [1]    [5]    [6]    [7]    [8]    [9]    [3]   
[6]    [3]    [8]    [4]    [1]    [9]    [7]    [5]    [2]   
[57]   [57]   [9]    [8]    [2]    [3]    [1]    [4]    [6]   
[2]    [46]   [5]    [36]   [9]    [1]    [34]   [8]    [7]   
[1]    [47]   [347]  [23]   [8]    [245]  [2345] [6]    [9]   
[8]    [9]    [346]  [7]    [45]   [2456] [2345] [1]    [45]   

.sdk file format
[Puzzle]
.....8.31
9........
31.9..6..
4.1.6....
6.84.97.2
....2.1.6
..5..1.87
........9
89.7.....
[State]
.....8931
98.13....
31.9..6.8
421567893
638419752
..9823146
2.5.91.87
1...8..69
89.7...1.
[PencilMarks]
57,4567,247,26,47,,9,,
,8,267,1,37,26,45,27,45
,,247,,457,45,,27,8
,2,,5,,7,8,9,3
,3,,,1,,,5,
57,57,9,8,,3,,4,
2,46,,36,9,,34,,
1,47,347,23,8,45,2345,6,
,,36,,45,26,23,1,45

Simes clipboard
+---+---+---+
|...|..8|931|
|98.|13.|...|
|31.|9..|6.8|
+---+---+---+
|421|567|893|
|638|419|752|
|..9|823|146|
+---+---+---+
|2.5|.91|.87|
|1..|.8.|.69|
|89.|7..|.1.|
+---+---+---+

Bob
RFB
 
Posts: 43
Joined: 03 April 2005

Postby angusj » Wed Jun 29, 2005 12:49 pm

simes wrote:.sud files are binary and Wayne has avoided giving out the structure when asked.

OK. That pretty much answers Q1 too. Thanks.
angusj
 
Posts: 306
Joined: 12 June 2005

Postby simes » Wed Jun 29, 2005 1:51 pm

It is possible to copy and paste from Simes program to AngusJ but not vice versa

Fixed in the next release.
Last edited by simes on Sun Dec 11, 2011 2:31 pm, edited 1 time in total.
simes
 
Posts: 324
Joined: 11 March 2005
Location: UK

Postby psyder » Wed Jun 29, 2005 4:30 pm

I dunno how useful it might be but have knocked out this :

[url=http://www.psyder.com/x/sudoku.php?s=0120192019201820136017301973][img]http://www.psyder.com/x/sudoku/0120192019201820136017301973.png[/img][/url] { broken link }

You "should" be able to click on the picture and edit the sudoku and get a link to cut and paste back into this forum?

It's on pretty pants hosting at the moment but I could stick it somewhere a bit more permanent?

Cheers

psyder

P.S. if anyone else can host it that would be great:) it only needs php and mod rewrite (to get around phpBB not posting dynamic images)
psyder
 
Posts: 6
Joined: 31 May 2005

Postby psyder » Wed Jun 29, 2005 4:43 pm

there is a slight bug atm with a random space will take a look otherwise theory seems ok?
psyder
 
Posts: 6
Joined: 31 May 2005

Postby scrose » Wed Jun 29, 2005 5:00 pm

psyder, that's a very cool little app you've written. Imagine somehow integrating this into phpBB in the following fashion.

Someone clicks on the "new topic" or "post reply" button. In the message body, the person clicks on the (to be created) "Puzzle" button. The [puzzle][/puzzle] BBCode is inserted into the message. The person types in their text grid between the [puzzle] tags. When the message gets posted, the text grid is replaced with the png image.
scrose
 
Posts: 322
Joined: 31 May 2005

Postby Roz » Wed Jun 29, 2005 8:43 pm

scrose wrote:psyder, that's a very cool little app you've written.


I agree it's excellent. Just trying it with the one from the bottom of Bobs reply in this thread.

[url=http://www.psyder.com/x/sudoku.php?s=000008931-980130000-310900608-421567893-638419752-009823146-205091087-100080069-890700010-][img]http://www.psyder.com/x/sudoku/000008931-980130000-310900608-421567893-638419752-009823146-205091087-100080069-890700010-.png[/img][/url] { broken link }
Roz
 
Posts: 34
Joined: 25 May 2005

Postby RFB » Wed Jun 29, 2005 10:52 pm

Whilst I agree that psyder's display format looks good it is not as easy to use as plain text for copy and paste into a program.

Edit: Just realised that clicking on the picture allows you to easily get the plain text format for copy/paste.:D

Bob
RFB
 
Posts: 43
Joined: 03 April 2005

Postby datprogrammer » Thu Jun 30, 2005 7:03 am

psyder wrote:
P.S. if anyone else can host it that would be great:) it only needs php and mod rewrite (to get around phpBB not posting dynamic images)


I run my own webserver here at home, there'snot a massive amount of bandwith but it should be sufficient to support this - send me a pm...
datprogrammer
 
Posts: 18
Joined: 22 June 2005

Postby psyder » Thu Jun 30, 2005 9:03 am

Nice idea scrose:)

Have never done a phpbb mod before but can't imagine it'd be that tricky? maybe have a crack at one and drop "Pappocom" a line and get it on this forum:)

Cheers

psyder

P.S. cheers foor the offer of hosting:) might see if it could be here as a phpbbmod:)
psyder
 
Posts: 6
Joined: 31 May 2005

Postby Animator » Thu Jun 30, 2005 2:04 pm

Intersting though I was thinking about a similar thing...

Which would allow the .sud files aswell (reverse enginering them ofcourse) the library file, and ofcourse several plain text formats...

A thing that really should change is the alt tag of the image (if phpbb allows this). It should show a text variant of the image. For those who find it loading to slow and disable images (me) and for those that use a text based browser (which sometimes is me again).


Hosting definitely should change... it is slowing the load of these pages down... But hosting it on a home connection shouldn't be done either... (Unless it is a decent connection (10mbit+ upload/download), which I doubt)

In theory I could host it on my private server (which is on a 100 mbit connection), but my own police is not to run anything public which I have no written my self. (mainly because most other stuff contains security bugs.)
Animator
 
Posts: 469
Joined: 08 April 2005

Which programs can (and can't) read this text format?

Postby rafowell » Tue Jul 19, 2005 4:36 am

Is this text board format one most Sudoku applications can read without difficulty, or is it too heavy on separators?
Code: Select all
+-------+-------+-------+
| 8 4 . | . 1 5 | . . . |
| 5 . . | . . 3 | 4 6 . |
| . . . | . . . | . . . |
+-------+-------+-------+
| 3 . . | . . . | . 9 . |
| . 6 . | 5 . 2 | . 8 . |
| . . . | . . . | . . 2 |
+-------+-------+-------+
| . . . | . . . | . . . |
| . 5 7 | 8 . . | . . 4 |
| . . . | . 9 . | . 2 5 |
+-------+-------+-------+
rafowell
 
Posts: 5
Joined: 17 July 2005


Return to Software