File formats used by the programs

Most of the formats used by the programs are standard for the games involved, but those for kakuro, bridges and sumpuzzle are unique to pzl programs.

Contents

sudoku

At present the program can read grids stored as files or from the Puzzle entry window in the formats shown schematically below. In these schematics "x" represents a valid cell symbol ("0-9" and "."). In actual files the symbols "0" and "." are used to represent unknown values. All other symbols in the files are ignored, which means that space (" ") cannot be used for unknown symbols.

So "076000000" is equivalent to ".76......", but " 76      " is invalid.
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
Format 1

0000000128000400000000000600902000007000004000005010000150..
Format 2


[Puzzle]
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
Format 3

xxx|xxx|xxx
xxx|xxx|xxx
xxx|xxx|xxx
-----------
xxx|xxx|xxx
xxx|xxx|xxx
xxx|xxx|xxx
-----------
xxx|xxx|xxx
xxx|xxx|xxx
xxx|xxx|xxx
Format 4

 x x x | x x x | x x x
 x x x | x x x | x x x
 x x x | x x x | x x x
-------+-------+------
 x x x | x x x | x x x
 x x x | x x x | x x x
 x x x | x x x | x x x
-------+-------+------
 x x x | x x x | x x x
 x x x | x x x | x x x
 x x x | x x x | x x x
Format 5
 *-----------*
 |xxx|xxx|xxx|
 |xxx|xxx|xxx|
 |xxx|xxx|xxx|
 |---+---+---|
 |xxx|xxx|xxx|
 |xxx|xxx|xxx|
 |xxx|xxx|xxx|
 |---+---+---|
 |xxx|xxx|xxx|
 |xxx|xxx|xxx|
 |xxx|xxx|xxx|
 *-----------*
Format 6

Sudoku Example

Sudoku Example

The puzzle shown in the sudoku format 8.2 example.


3, 3
+------+------+------+
|*6 . 1| . 4 9|*5 2*8|
| 2 .*9| . .*8|*1*6 4|
| 5*4 .|*1 6*2| 7*3 9|
+------+------+------+
| .*1 .|*8 . 3| . 7 .|
| 8 . .| . . .| . . 1|
| . 6 .| 7 .*1| . . .|
+------+------+------+
| 7 . 4| . 1 .| . . 3|
| 1 . .| . . .| . . 5|
| . 9 .| 2 8 .| 4*1*7|
+------+------+------+
Format 7 (example file)

7     3    1569   26 1589 4    269  12589  16
8     1259 1569   7  159  235  4    12359  136
2569  4    1569   26 1589 2358 2679 123589 1367
24569 7    145689 24 58   258  269  1239   1346
2456  125  14568  9  3    2578 267  12     1467
249   29   3      1  6    27   8    29     5
1     8    7      3  2    6    5    4      9
459   59   459    8  7    1    3    6      2
3     6    2      5  4    9    1    7      8
Format 8.1 for clues and candidates (example file)


7 3 1569 26 1589 4 269 12589 16
8 1259 1569 7 159 235 4 12359 136
2569 4 1569 26 1589 2358 2679 123589 1367
24569 7 145689 24 58 258 269 1239 1346
2456 125 14568 9 3 2578 267 12 1467
249 29 3 1 6 27 8 29 5
1 8 7 3 2 6 5 4 9
459 59 459 8 7 1 3 6 2
3 6 2 5 4 9 1 7 8
Format 8.2 for clues and candidates (example file)

 ------------------ -------------- ------------------
|7     3    1569   | 26 1589 4    | 269  12589  16   |
|8     1259 1569   | 7  159  235  | 4    12359  136  |
|2569  4    1569   | 26 1589 2358 | 2679 123589 1367 |
 ------------------ -------------- ------------------
|24569 7    145689 | 24 58   258  | 269  1239   1346 |
|2456  125  14568  | 9  3    2578 | 267  12     1467 |
|249   29   3      | 1  6    27   | 8    29     5    |
 -----------------  -------------- ------------------
|1     8    7      | 3  2    6    | 5    4      9    |
|459   59   459    | 8  7    1    | 3    6      2    |
|3     6    2      | 5  4    9    | 1    7      8    |
 ------------------ -------------- ------------------
Format 8.3 for clues and candidates (example file)

kakuro

The notation used for puzzle entry may look forbidding but is actually simple and requires the smallest possible number of keystrokes.

Kakuro Example

Kakuro Example

The puzzle shown in the kakuro format example.


Cell types    symbol/example
Solve cell         "*"   (a cell to be solved)
Blank cell         "."   (a padding cell)
Separator          ","
Sum across         "19"
Sum down           "23"
Sum both    "23/19" or "23\19"

Note that for cells which contain both a sum down and a sum across, the sum down must be written first i.e. in the left to right order as they appear in the grid. For example 23/19 defines a sum down of 23 and sum across of 19. The separator "," need only be used where it is essential to distinguish between the case of adjacent single digit numbers and the case of a double digit number. For example between two, three "2,3" and twenty three "23".


.21,19,4,3...3,4,30,29
19****26.28/21****
28*****7/27*****
4**.10/7***9,14**
3**8/24*****12/12**
.24,23/41*******24,23
23***....24***
16**17.....17/16**
23***14,26.30,17/23***
.19,21/24***16/24***10,11
3**35*****8**
4**4,3/23***16,4/4**
26*****24*****
19****..13****

Example

Commas are only obligatory where needed, trailing dots are not obligatory, / and \ are equivalent.

sumpuzzle

Sumpuzzle Example

Sumpuzzle Example

The puzzle shown in the sumpuzzle format example.

.+.x.=70
+#x#+
.-9+.=-5
+#x#/
.-.-.=1
14#288#4

Example

Legend
   .   unknown value
   =   separator between sum and total
   #   blank squares to maintain column alignment
+-x/   standard arithmetic symbols

Here the first line of the file is .+.x.=70 and the last is: 14#288#4 No spaces or additional lines are permitted.

sokoban

Sokoban_Example

Sokoban_Example

The first puzzle shown in the sokoban format example.


Level 1
'NABOKOSMOS 01'
 #####
 #   ##
## * .##
# $$*  #
#  * . #
## @ ###
 #####

Level 2
'NABOKOSMOS 02'
  ####
###  ###
#   *$ #
# #  # #
#   ** #
###  #@#
  # ** #
  #  # #
  # *. #
  #  ###
  ####

Example

An example of a map set (the start of Aymeric du Peloux's Nabokosmos set). In this case the program would use 'NABOKOSMOS 01' and 'NABOKOSMOS 02' as the level names.

scrabbler

Below is an example of the format used to save scrabbler games. Please note that no error checking is done when these files are loaded so please do not edit them.


...............
...............
...............
S......Q.......
K...MOFUSSIL...
L......I.HOODY.
EH.....P.......
NA.....O.......
TRENTALS.......
.D.............
.W.............
FAG............
ORA............
NEW............
T.P............
NEBEDOX
UBD.OIE
248
240

Example

bridges

The files should contain only the digits 0-8, 0 representing an empty grid point. At present the code is completely unforgiving and refuses to tolerate any digression.

30204000030020002
03010020003003030
00103003000400203
05000000000000050
30200030200201000
05050002020000003
30000000000405040
00101000200000102
03040010010001000
30201000300300200
03030302002010000
10203040400003020
03000200002000202
Example

Bridges_Example

Bridges_Example

The puzzle shown in the bridges format example.


shikaku

For Shikaku puzzles we need to cater for the possibility of double digit clues and the convention is that they should be preceded by a backslash (\). All unknown cells are coded as 0. At present the code is completely unforgiving and refuses to tolerate any digression.

0040000600000\120000000800000000600006
040000500000400000035000000006000080
4000400000\100000006800000093400000800
0006000000020000000000000000000\100000
000000000600000400000\1260000000600000
080042804000004000000004000040000000
500000000000060000000003000800000008
000000000000400080004000000000000060
000800000080000600060000040000666000
009000040000040000000020000080000000
000000080000090000000040000080000400
000688000090000090009000080000008000
0600000000000004000\120006000000000000
600000006000600000000060000000000004
0000000400006000000008000004046600\100
0000070000000\126000009000003000000000
000040000000000000000000600000004000
006000004640000004400000080000040003
040000600000000660000008000004000040
400006000000008000000060000070000300

Example

Shikaku_Example

Shikaku_Example

The puzzle shown in the shikaku format example.