Besides the well known PS code from djape, Ruud has also designed a very presentable text format. Here is an example puzzle from
tarek at
sudoku.com:
Code:
.-----.-----.--.-----.-----.
|17 |16 |20|7 |6 |
| .--'-----: :-----'--. |
| |22 | |26 | |
:--: .-----: :-----. :--:
|10| |6 | |21 | |13|
| | | .--'--'--. | | |
| | | |42 | | | |
:--'--'--: .--. :--'--'--:
|11 | |3 | |18 |
:--.--.--: '--' :--.--.--:
|10|31|12| |16|23|9 |
| | | '--.--.--' | | |
| | | |19| | | |
:--: '-----: :-----' :--:
|17| | | |14|
| '--.-----: :-----.--' |
| |9 | |7 | |
'-----'-----'--'-----'-----'
tarek gave a very thoughtful arrow-based text representation himself as well:
Code:
v < 16| <20 7 | < 6 <
17 > > |22 ^ 26| < < ^
10 ^ > | 6 ^ 21| < ^13
-------+-------+------
^ ^ ^ |42 > v | ^ ^ ^
11 < < | ^ 3 v | > >18
10 v v | ^ < < |16 v 9
-------+-------+------
^ v > |12 19> | ^ v ^
17 > > |31 ^ 23| < <14
^ < 9 | < ^ 7 | < > ^
You just need to follow the arrows to know a cell belongs to which cage.
I've made some changes myself, and came up with this 162-char representation:
Code:
17 <16 <20 7 < 6 <
^22 < < ^26 < < ^
10 ^ 6 < ^21 < ^13
^ ^ ^42 < < ^ ^ ^
11 < < ^ 3 ^18 < <
103112 ^ < ^1623 9
^ ^ ^ <19 > ^ ^ ^
17 ^ < < ^ > > ^14
^ < 9 < ^ 7 < > ^
These 2 rules are added:
- All cage sums must appear in the leftmost cell of the topmost row of that cage.
- When choosing arrows we always uses the order of preference: ^ < > v.
When there are "diagonal cages". I suggest we use the 4 symbols:
` ' , . to represent UL,UR,DL,DR arrows respectively, in that order of preference.
And if we use A..Z to represent 10..35, a..j to represent 36..45, we can have an 81-char representation:
Code:
H<G<K7<6<
^M<<^Q<<^
A^6<^L<^D
^^^g<<^^^
B<<^3^I<<
AVC^<^GN9
^^^<J>^^^
H^<<^>>^E
^<9<^7<>^
Of course it's not as attractive as Ruud's code but wouldn't it be cool if we can always use an 81-char string to represent all killer puzzles?