chrisboyle / sgtpuzzles

Android port of Simon Tatham's Puzzles
https://chris.boyle.name/puzzles
Other
607 stars 168 forks source link

Document game description / game ID formats #510

Open goyalyashpal opened 3 years ago

goyalyashpal commented 3 years ago

Summary

Some documentation to enable manually writing the game id for a given game

Details

Use case

example of game ids:

### (Mostly) Confirmed:
game sample-id (min size) breakdown id complexity
(worst case)
comments
Solo solo#
2x2: a3 e3 _1 e2 a
size
(inter- columns x rows of sub-blocks)
(not intra sub-blocks)

3 - digit on grid
_ - continuous digits (no blanks)
a , e - blank spaces
size 2
Towers towers#
3:
2/1/2/
2/3/1/
2/1/2/
2/3/1
grid size:
Edge clues ordered as:
Top, Bottom, Left, Right
4 x size
Loopy loopy#
3x3 t0: a3 a203 c


loopy# 3x3 t1: 0_ a1 a1 a1 22c1a1a2202
width x height t grid_type :
Grid numbered squares

Similar to solo
without underscores, and
CAPS for grid numbers > 9
?? see below
ADD_NEW_HERE
Loopy:
regular grid types like `t0` squares, `t2` honeycomb hexagons are simple
`t1` triangles: numbers layer wise: row major, triangle layer minor, column most minor (aka patch in semantic versioning lol)
for other grid types - not worth it imo 😅

Confirmed Trivials:

grid numbers in row major order - optionally with some separator
game sample-id breakdown id complexity
(worst case)
Dominosa dominosa#
1:
001
110
order:
Grid numbers
(n + 2) (n + 1)
Fifteen fifteen#
2x2:
0,2,
1,3
width x height:
Tiles: 1, ... , 9, ... , 13, ...
Hole: 0
size
Singles singles#
2x2:
22
12
width x height:
Grid squares
size
ADD_NEW_HERE
### Non-confirmed
game sample-id breakdown id complexity
(worst case)
comments/ guesses
Blackbox blackbox# w2h3m1M1: 39727ad7 w width h height m ?? M ?? :
??
?? number of balls
ADD_NEW_HERE
chrisboyle commented 2 years ago

@yashpalgoyal1304 Can you add some more detail of what you mean? Thanks

goyalyashpal commented 2 years ago

Hi chrisboyle, yes, i would add more detail. But i have got some work at hand at this moment. So, I cant say till when i will do that.

goyalyashpal commented 2 years ago

so, i meant that the game-id is generated by following some parameters of the game. So, some documentation regarding that shall be there somewhere. maybe at least for the games for which it is reasonably simple

example:

Edit: Moved in description, kept here just for archival
| game | sample id | breakdown | | -------- | ---------------------------------------------- | ------------------------------------------------------------ | | Blackbox | w8h8m5M5:
674439b4a0ff341956e72d23 | w8h8 - width 8, height 8
*5 - 5 balls
rest - ??? | | Fifteen | 3x3:
8,5,3,
4,6,2,
1,0,7 | 4x4 - size
9, 13, ... - tile numbering
0 - the blank tile | | Dominosa | 3:
33203
02121
03201
31210 | 3 - order
rest - digits on the grid | | Loopy | 3x3t0:
a3a
203
c | 3x3 - size
a3a - digits on grid
a, a, c - ?? | | Solo | 2x2:
a3
e3
_
1e
2a | 2x2 - size
3 - digit on grid
_ - the solid dividing line
a, e - ?? |
goyalyashpal commented 2 years ago

i hope it makes sense 😅

goyalyashpal commented 1 year ago

| Solo | 2x2:
a3
e3

1e
2a | 2x2 - size
3 - digit on grid
- the solid dividing line
a, e - ?? |

per the explorations today, the format for solo (sudoku) is simple:

game sample id breakdown
Solo 2x2:
a
3e
3_
1e
2a
2x2 - size
a/e (alphabet) - 1/5 blank space
3 - digit on grid
_ - 2 consecutive digits (i.e. no blank space)

(Copying over from the other issue:)

ANDDD.... i deciphered the game description id for solo game:

2x2: a 3e 3_ 1e 2a spaces added by me are just for clarity only

In BNF, it would be:

STATEMENTS
<game_description> := <size>:<terminal_blank><other_cell_description>
<size> := <digit>x<digit>
<other_cell_description> := <cell_description> [ no. of given digits times ]
<cell_description> := <digit><blanks_with_next_digit>
<blanks_with_next_digit> := if not last cell then <digit_blank> else <terminal_blank>

LITERALS
<digit_blank> := <lower_alphabet> | <underscore>
<terminal_blank> := <lower_alphabet> | <nothing>

OBVIOUS LITERALS
digit
lower_alphabet
underscore
nothing
goyalyashpal commented 1 year ago

hi @chrisboyle

so, with recent success in decoding the game description / game ID for solo/sudoku, i am feeling fairly confident.

i was thinking of doing it on a - part-wise fashion, rather than all-or-nothing. the above tabular format : game | sample-id | breakdown feels good enough.

so, do you have any preference on at which file should i document these in? somewhere accessible by web as well would be good.

thanks

chrisboyle commented 1 year ago

As the description/ID formats are not Android-specific, I think this should appear as part of the upstream documentation. Places it could live include:

goyalyashpal commented 1 year ago

had already figured out singles, figured out towers too today (added in description)