SudoCue Users Forum Index SudoCue Users
A forum for users of the SudoCue programs and the services of SudoCue.Net
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sumocue file syntax description available anywhere?

 
Post new topic   Reply to topic    SudoCue Users Forum Index -> Support
View previous topic :: View next topic  
Author Message
mhparker
Grandmaster
Grandmaster


Joined: 20 Jan 2007
Posts: 345
Location: Germany

PostPosted: Tue Jan 23, 2007 11:56 am    Post subject: Sumocue file syntax description available anywhere? Reply with quote

Ruud, I guess this one's for you, unless somebody else can point me to some documentation you've already written.

Is the (new?) Sumocue file syntax (see example below) intended to be proprietry to Sumocue, or also for data interchange with other utilities? In the latter case, it would be nice to have some sort of syntax description for it.

For example, for Weekly Assasin 34, the puzzle description begins with:

3x3::k:5888:2817:2817:...

Help!
_________________
Cheers,
Mike
Back to top
View user's profile Send private message
rcbroughton
Expert
Expert


Joined: 15 Nov 2006
Posts: 143
Location: London

PostPosted: Tue Jan 23, 2007 4:00 pm    Post subject: Re: Sumocue file syntax description available anywhere? Reply with quote

mhparker wrote:
3x3::k:5888:2817:2817:...


the 3x3 bit says it's 3x3 "nonets"

if there is a "d" between the first two "::" then it's a diagonal variant, otherwise it's not.

the "k" between the second two "::" always seems to be a "k"

there then follows 81 numbers, 1 for each cell starting at r1c1 and proceeding left to right on each row. The number is made up by taking the total value of a cage, multiplying by 256 and then adding the "cage identifier".

so in your example, r1c1 is part of cage number 0 that has a total 23 (5888=23*256+0), r1c2 and r1c3 are part of cage number 1 that totals 11 (2817=11*256+1), etc.
Back to top
View user's profile Send private message
mhparker
Grandmaster
Grandmaster


Joined: 20 Jan 2007
Posts: 345
Location: Germany

PostPosted: Wed Jan 24, 2007 11:19 am    Post subject: Reply with quote

Thanks for the reply. Just what I needed!
_________________
Cheers,
Mike
Back to top
View user's profile Send private message
Pete
Gold Member
Gold Member


Joined: 13 May 2006
Posts: 113
Location: Cincinnati Ohio, USA

PostPosted: Thu Jan 25, 2007 2:16 pm    Post subject: formats Reply with quote

Ruud sent me this personal email:

here is the PS format description. It is really simple:

a single string is used, no blanks or line breaks alowed (SumoCue doesn't care about that)
a colon is placed after each field.
3 mandatory fields to begin with:

1. Format: "3x3"
(I don't know or use any other formats)
2. Diagonals: "" or "d"
3. Killer: "k"
For normal killers, the string always starts with "3x3::k:"

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


where cageID is the 0-based index of the upper-left cell for that cage (the one that shows the sum)
And the SumoCue format is:
"SumoCueV1"
followed by "D" when diagonals are constraints,
followed by 81 entries, which can be:
"=nn" (the left-top cell of a cage, nn is the sum, can be zero for jigsaws and killers with unspecified areas)
"+nn" (a cell that belongs to a cage. nn is the 0-based cageID)
each entry is followed by "J0" through "J8" for jigsaws and jigsaw killers.
I only use SumoCue format for jigsaw (killers), because PS is recognized by multiple killer programs.

cheers,
Ruud

But the ps had the bytes reversed... i dont remember if i switched it or not in this note... my program goes all 3 ways
my format is a bit different but allows digits within cages in killers or killer jigsaws so an example:

I use notepad to enter puzzles so mines a bit easier to read and enter with notepad.
white space makes no difference
Killer or Jigsaw is necessary to define puzzle type
(Jigsaw requires digits 1..9 9 of each after the clue grid)
the initial grid can have the single cell cage clues or not
but you need 81( . + digits)
cage grids 81 chars (different char for each grid)

commas are necessary in cagesum (char digitdigit,char digit, )
all sp,cr, lf here just helps me see it as I type

My format:
Code:

.........
.........
.2.......
7........
.........
........1
.......4.
.........
.........

abcdddeff
abccgeehi
ajkkggghi
lmnkopqqr
smntopuvr
swwtoxuvy
ABCCCxxDE
ABFFCGGHE
IIFJJJGHE

a20,b4,c18,d16        ,e18,f13   
                g12        ,h4,i12
    j2,k19                       

l7,m17,n7    ,o18,p13,q9    ,r5
s6        ,t3        ,u14,v16   
    w8            ,x13        ,y1

A9,B10,C20                ,D4,E20
        F15        ,G14    ,H10   
I10        ,J18                   

Daily Killer Sudoku Competition for Jul 9
Number 100, Gentle
  by Michael Mepham, www.sudoku.org.uk
All entries must be in by 23:59 EDT
(time now is 04:23 EDT, USA)


same puzzle sumocue:

SumoCueV1=20=4=18=16+3+3=18=13+7+0+1+2+2=12+6
+6=4=12+0=2=19+20+13+13+13+16+17=7=17=7+20=18
=13=9+33=5=6+28+29=3+31+32=14=16+35+36=8+46+39
+31=13+42+43=1=9=10=20+56+56+50+50=4=20+54+55
=15+65+56=14+68=10+62=10+72+65=18
+75+75+68+70+62

same puzzle Perfect sudoku format:
to get this to work with perfect sudoku you must remove all
whitespace cr lf

3x3::k:5169:1074:4659:4148:4148:4148:4661:3382:3382
:5169:1074:4659:4659:3127:4661:4661:1080:3129:5169
:570:4923:4923:3127:3127:3127:1080:3129:1852:4413
:1854:4923:4671:3392:2369:2369:1346:1603:4413:1854
:836:4671:3392:3653:4166:1346:1603:2119:2119:836
:4671:3400:3653:4166:329:2321:2578:5139:5139:5139
:3400:3400:1044:5141:2321:2578:3862:3862:5139:3607:3607
:2584:5141:2585:2585:3862:4634:4634:4634:3607:2584:5141:



This will definatly get you going,
Pete
_________________
"It gets dark at night" - Olbers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SudoCue Users Forum Index -> Support 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


Powered by phpBB © 2001, 2005 phpBB Group