Twizzle Binary 3x3x3 Format

Orientation and permutation is defined using the Reid-based definition used by kpuzzle. Permutations are encoded using lexicographic order. Orientations are encoded as numbers in base 2 (edges), 3 (corners), or 4 (centers).


Components are encoded in the following order:

Component ID Meaning Valid Range # of bits
EP edge permutation 0 to 12! - 1 29 bits
EO edge orientation 0 to 212-1 12 bits
CP corner permutation 0 to 8! - 1 16 bits
CO corner orientation 0 to 38-1 13 bits
PO_U see below 3 bits
PO_L 2 bits
MO_Q whether center ("middle")
orientation is supported
0 to 1 1 bit
MO center ("middle") orientation 0 to 46-1 12 bit


Note that this encoding includes the full state of each of these components, without relying on parity to save bits. Guidelines:

Byte Layout

EP (continued) EO
EO (continued) CP
CP (continued) CO
CO (continued) PO_U PO_L MO? MO

If puzzle orientation is not encoded:

If center orientation is not encoded:

Puzzle Orientation

The other components are encoded relative to centers. That is, reorienting the puzzle changes PO_U and PO_L, but does not affect any other components.

Puzzle Orientation Example

Apply z y' to a solved cube. Now: