Sumocue file syntax description available anywhere?

Ask your support questions for SudoCue here
Post Reply
mhparker
Grandmaster
Grandmaster
Posts: 345
Joined: Sat Jan 20, 2007 10:47 pm
Location: Germany

Sumocue file syntax description available anywhere?

Post by mhparker »

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
rcbroughton
Expert
Expert
Posts: 143
Joined: Wed Nov 15, 2006 1:45 pm
Location: London

Re: Sumocue file syntax description available anywhere?

Post by rcbroughton »

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.
mhparker
Grandmaster
Grandmaster
Posts: 345
Joined: Sat Jan 20, 2007 10:47 pm
Location: Germany

Post by mhparker »

Thanks for the reply. Just what I needed!
Cheers,
Mike
Pete
Gold Member
Gold Member
Posts: 113
Joined: Sat May 13, 2006 6:12 pm
Location: Cincinnati Ohio, USA

formats

Post by Pete »

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: Select all

.........
.........
.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
Post Reply