View previous topic :: View next topic |
Author |
Message |
| briturner
| Joined: 14 Oct 2008 | Posts: 75 | : | | Items |
|
Posted: Thu Oct 16, 2008 4:00 pm Post subject: Standard format for puzzle description |
|
|
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 |
|
|
| Lunatic
| Joined: 11 Mar 2007 | Posts: 166 | : | Location: Ghent - Belgium | Items |
|
Posted: Thu Oct 16, 2008 6:06 pm Post subject: Re: Standard format for puzzle description |
|
|
briturner wrote: | Simple 9x9 puzzles are easy, 81 characters, unknown spots are '.' or '-'. |
Or '0' _________________ Marc
~~~<><~~~<><~~~<><~~~<><~~~ |
|
Back to top |
|
|
| daj95376
| Joined: 05 Feb 2006 | Posts: 349 | : | | Items |
|
Posted: Fri Oct 17, 2008 6:27 am Post subject: Re: Standard format for puzzle description |
|
|
Lunatic wrote: | briturner wrote: | Simple 9x9 puzzles are easy, 81 characters, unknown spots are '.' or '-'. |
Or '0' |
Or 'X' |
|
Back to top |
|
|
| briturner
| Joined: 14 Oct 2008 | Posts: 75 | : | | Items |
|
Posted: Fri Oct 17, 2008 12:23 pm Post subject: |
|
|
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 |
|
|
| m_b_metcalf
| Joined: 13 Mar 2006 | Posts: 210 | : | Location: Berlin | Items |
|
Posted: Fri Oct 17, 2008 3:55 pm Post subject: |
|
|
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 |
|
|
| Lunatic
| Joined: 11 Mar 2007 | Posts: 166 | : | Location: Ghent - Belgium | Items |
|
Posted: Fri Oct 17, 2008 4:14 pm Post subject: |
|
|
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 |
|
|
| briturner
| Joined: 14 Oct 2008 | Posts: 75 | : | | Items |
|
Posted: Fri Oct 17, 2008 11:35 pm Post subject: |
|
|
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 |
|
|
|