aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md105
1 files changed, 29 insertions, 76 deletions
diff --git a/README.md b/README.md
index f70c87a..44423a6 100644
--- a/README.md
+++ b/README.md
@@ -129,27 +129,24 @@ Then you can for example get a cube from a sequence of moves:
129 129
130``` 130```
131$ ./run frommoves -moves "R' U' F" 131$ ./run frommoves -moves "R' U' F"
132JLQWSVUH=ZLCUABGIVTKH 132JLQWSVUH=ZLCUABGIVTKH=A
133``` 133```
134 134
135Or you can get a random cube 135The cube format is meant to be easy to copy-paste and read for the
136software, but not necessarily intuitive for the user. See below for a
137detaileed description.
136 138
137``` 139You can also get a random cube
138$ ./run randomcube
139WDSQREVX=VBKYDUCJXWAb
140```
141
142If you don't like this format, you can convert it:
143 140
144``` 141```
145$ ./run convert -fin B32 -fout H48 -cubestr "WDSQREVX=VBKYDUCJXWAb" 142$ ./run randomcube
146UL1 UB0 BL0 FR1 DF0 UR1 DB0 FL0 DR1 DL1 UF0 BR1 DFR2 DBR0 DFL2 UFR2 UBL2 UFL0 UBR2 DBL2 143WDSQREVX=VBKYDUCJXWAb=A
147``` 144```
148 145
149To solve a cube you can use: 146To solve a cube you can use:
150 147
151``` 148```
152$ ./run solve -solver h48h0k4 -n 1 -M 4 -cube "JLQWSVUH=ZLCUABGIVTKH" 149$ ./run solve -solver h48h0k4 -n 1 -M 4 -cube "JLQWSVUH=ZLCUABGIVTKH=A"
153F' U' R 150F' U' R
154``` 151```
155 152
@@ -244,8 +241,8 @@ $ python # In the main folder
244From here you can call the library functions directly, for example: 241From here you can call the library functions directly, for example:
245 242
246``` 243```
247>>> nissy.compose("NEORSQLH=ZFCYUAGLHTKB", "NEORSQLH=ZFCYUAGLHTKB") 244>>> nissy.compose('NEORSQLH=ZFCYUAGLHTKB=A', 'NEORSQLH=ZFCYUAGLHTKB=A')
248'ASTUGFBH=DACXEZGBLIKF' 245'ASTUGFBH=DACXEZGBLIKF=A'
249``` 246```
250 247
251The `python/examples` folder contains some examples, that you 248The `python/examples` folder contains some examples, that you
@@ -261,94 +258,50 @@ with the comments in nissy.h for more details.
261 258
262NOTE: Support for the Python module is still rudimentary. 259NOTE: Support for the Python module is still rudimentary.
263 260
264## Cube formats 261## Cube format
265
266The cube is represented as a string in one of the following formats,
267all explained below:
268
269* H48
270* LST
271* B32 (the default)
272
273In all of the formats, the permutation of the center pieces is not
274stored. This means that the cube is assumed to be in a fixed orientation.
275
276More formats will become available in the future.
277
278### Cube format: H48
279 262
280In the H48 format, each edge is represented by two letters denoting the 263This format is a "base 32" encoding of the cube. It is not meant to be
281sides it belongs to and one number denoting its orientation (0 oriented, 1 264human-readable, but it is compact while still being plain text. Each
282mis-oriented). Similarly, each corner is represented by three letters and 265piece, including the orientation value, is encoded as a number from 0
283a number (0 oriented, 1 twisted clockwise, 2 twisted counter-clockwise). 266to 31, and this number is then converted to an uppercase letter (0-26)
284 267or to a lowercase letter (27-31).
285The solved cube looks like this:
286
287```
288UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0
289```
290 268
291The cube after the move F looks like this: 269The format looks like this:
292 270
293``` 271```
294FL1 UB0 DB0 FR1 UR0 UL0 DL0 DR0 UF1 DF1 BL0 BR0 UFL1 UBL0 DFR1 DBR0 DFL2 UBR0 UFR2 DBL0 272cccccccc=eeeeeeeeeeee=r
295``` 273```
296 274
297Whitespace (including newlines) between pieces is ignored when reading the 275Where the first 8 characters represent the corner, the 12 characters
298cube. A single whitespace character is added between pieces when writing. 276after the first 12 represent the edges and the last character represents
299 277the orientation of the cube with respect to the base orientation.
300You can find more examples of this format in the utils/cubes folder.
301
302## Cube format: LST
303
304In the LST format, a cube is represented by a comma-separated list of
305integers. Each piece is represented by an (unsigned) 8-bit integer. The 4
306least-significant bits determine which piece it is, the other 4 determine
307the orientation.
308 278
309Edges are numbered as follows (see also constants.h): 279Edges are numbered as follows (see also constants.h):
310 280
311UF=0 UB=1 DB=2 DF=3 UR=4 UL=5 DL=6 DR=7 FR=8 FL=9 BL=10 BR=11
312
313Corners are numbered as follows:
314
315UFR=0 UBL=1 DFL=2 DBR=3 UFL=4 UBR=5 DFR=6 DBL=7
316
317The orientation of the edges is with respect to F/B, the orientation of
318corners is with respect to U/D.
319
320In this format, the solved cube looks like this:
321
322``` 281```
3230, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 282UF=0 UB=1 DB=2 DF=3 UR=4 UL=5 DL=6 DR=7 FR=8 FL=9 BL=10 BR=11
324``` 283```
325 284
326The cube after the move F looks like this: 285Corners are numbered as follows:
327 286
328``` 287```
32936, 1, 38, 3, 66, 5, 64, 7, 25, 1, 2, 24, 4, 5, 6, 7, 16, 19, 10, 11 288UFR=0 UBL=1 DFL=2 DBR=3 UFL=4 UBR=5 DFR=6 DBL=7
330``` 289```
331 290
332### Cube format: B32 291At the moment, the only orientation supported is the standard one, as wide
333 292moves, rotations and slice moves are not supported.
334This format is a "base 32" encoding of the cube. It is not meant to be
335human-readable, but it is compact while still being plain text. Each
336piece, including the orientation value, is encoded as a number from 0
337to 31, and this number is then converted to an uppercase letter (0-26)
338or to a lowercase letter (27-31). Edges and corners are separated by a
339single = character.
340 293
341In this format, the solved cube looks like this: 294In this format, the solved cube looks like this:
342 295
343``` 296```
344ABCDEFGH=ABCDEFGHIJKL 297ABCDEFGH=ABCDEFGHIJKL=A
345``` 298```
346 299
347The cube after the move F looks like this: 300The cube after the move F looks like this:
348 301
349``` 302```
350MBODSFQH=ZBCYEFGHQTKL 303MBODSFQH=ZBCYEFGHQTKL=A
351``` 304```
352 305
353A cube in B32 format is always 21 characters long (22 if the terminating 306A cube in B32 format is always 23 characters long (24 if the terminating
354null character is included). 307null character is included).

Generated with cgit - Back to sebastiano.tronto.net