Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Standard format for puzzle description

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku
View previous topic :: View next topic  
Author Message
briturner

Joined: 14 Oct 2008
Posts: 75
:

Items
PostPosted: Thu Oct 16, 2008 4:00 pm    Post subject: Standard format for puzzle description Reply with quote

Greetings again,

Is there a standard format for representing Sudoku puzzles in Text?

Simple 9x9 puzzles are easy, 81 characters, unknown spots are '.' or '-'.
16x16 are the same method, 256 characters
25x25 can be a 625 char line, or 25 lines of 25 chars each.

What about jigsaw puzzles, or Samuri sudoku, or general overlapping, etc.? Is there a standard method for representing these in text files?

Thanks
brit
Back to top
View user's profile Send private message
Lunatic

Joined: 11 Mar 2007
Posts: 166
:
Location: Ghent - Belgium

Items
PostPosted: Thu Oct 16, 2008 6:06 pm    Post subject: Re: Standard format for puzzle description Reply with quote

briturner wrote:
Simple 9x9 puzzles are easy, 81 characters, unknown spots are '.' or '-'.


Or '0'
_________________
Marc
~~~<><~~~<><~~~<><~~~<><~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
daj95376

Joined: 05 Feb 2006
Posts: 349
:

Items
PostPosted: Fri Oct 17, 2008 6:27 am    Post subject: Re: Standard format for puzzle description Reply with quote

Lunatic wrote:
briturner wrote:
Simple 9x9 puzzles are easy, 81 characters, unknown spots are '.' or '-'.


Or '0'

Or 'X'
Back to top
View user's profile Send private message
briturner

Joined: 14 Oct 2008
Posts: 75
:

Items
PostPosted: Fri Oct 17, 2008 12:23 pm    Post subject: Reply with quote

Greetings,

I found another web site (I believe related to this one) that had items like JigSaw puzzles that you could cut and paste a text string to define the puzzle.

For example it starts like this (full text not posted since it is sooo long):
SumoCueV1=21J0+0J0=20J0+2J1=29J1=13J1+5J1+5J1=10J2

in the puzzle section, there ia an old not about not being able to encode Samurai puzzles, but not they are. Just wondering how to decode these.

Thanks
Brian
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Fri Oct 17, 2008 3:55 pm    Post subject: Reply with quote

The two ways that Samurais are typically encoded in this Forum can be seen here and at the links given there.

Regards,

Mike Metcalf
Back to top
View user's profile Send private message
Lunatic

Joined: 11 Mar 2007
Posts: 166
:
Location: Ghent - Belgium

Items
PostPosted: Fri Oct 17, 2008 4:14 pm    Post subject: Reply with quote

Here is the Perfect Sudoku format description for killer sudokus:

a single string is used, no blanks or line breaks allowed
a colon is placed after each field.
3 mandatory fields to begin with:

1. Format: "3x3"
2. Diagonals: "" or "d"
3. Killer: "k"

For normal killers, the string always starts with "3x3::k:"

Next are 81 fields, containing a Number: (cageSum * 256) + cageID

where cageID is a unique number identifying the cage. Considering the cells numbered top left to bottom right from 0 to 80, the first cell from each new cage encountered is the cageID. The first cage starts allways with cell 0, so the fisrt CageID=0

Reverse calculating:
Int ( Number / 256 ) = CageSum
Number MOD 256 = CageID (reminder)
_________________
Marc
~~~<><~~~<><~~~<><~~~<><~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
briturner

Joined: 14 Oct 2008
Posts: 75
:

Items
PostPosted: Fri Oct 17, 2008 11:35 pm    Post subject: Reply with quote

Thank you, I will try decoding this, see if it all works out.

I am anxious to try these different puzzles. Adding diagonals should be easy (guess I can have locked candidates in a diagonal, so I will need to fix that). A bit more work for the other part of a killer sudoku.

Something to work on for my flight back home (off interviewing at the moment).

Thanks
Brit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron