cayleypy.Puzzles
- class cayleypy.Puzzles[source]
Definitions of graphs describing various puzzles.
- __init__()
Methods
__init__
()globe_puzzle
(a, b)Cayley graph for Globe puzzle group, a + 1 cycle and 2b order 2 generators.
hungarian_rings
(left_size, left_index, ...)Cayley graph for Hungarian rings puzzle group, generated by rotating two rings in both directions.
megaminx
()Cayley graph for the Megaminx puzzle.
Cayley graph for a subgroup of S_24, acting on 24 titles.
pyraminx
()Cayley graph for a subgroup of S_36 acting on 36 tiles.
rubik_cube
(cube_size, metric)Cayley graph for NxNxN Rubik's cube.
starminx
()Cayley graph generated by 20 moves of Starminx puzzle.
Cayley graph associated with the Starminx 2 puzzle.
- static globe_puzzle(a: int, b: int) CayleyGraphDef [source]
Cayley graph for Globe puzzle group, a + 1 cycle and 2b order 2 generators.
- static hungarian_rings(left_size: int, left_index: int, right_size: int, right_index: int) CayleyGraphDef [source]
Cayley graph for Hungarian rings puzzle group, generated by rotating two rings in both directions.
- Parameters:
left_size –
Left ring size.
left_index –
Distance between intersections on the left ring. left_index <= left_size/2
right_size –
Right ring size.
right_index –
Distance between intersections on the right ring. right_index <= right_size/2
- static mini_pyramorphix() CayleyGraphDef [source]
Cayley graph for a subgroup of S_24, acting on 24 titles.
It is generated by 17 moves inspired by a simplified version of the Pyramorphix puzzle. Moves are based on overlapping 2- and 3-cycles and result in a symmetric, undirected graph. Order of the graph 24, degree 17, order of the group 288.
- static pyraminx() CayleyGraphDef [source]
Cayley graph for a subgroup of S_36 acting on 36 tiles.
It is generated by 8 elements inspired by Pyraminx puzzle. 4 elements represent rotations of the tetrahedron tips, while 4 others – rotations of its base layers.
- static rubik_cube(cube_size: int, metric: str) CayleyGraphDef [source]
Cayley graph for NxNxN Rubik’s cube.
- Parameters:
cube_size –
Size of the cube (N).
metric –
metric defining what counts as one move, one of:
”QSTM” - Quarter Slice Turn Metric.
”QTM” - Quarter Turn Metric.
”HTM” - Half Turn Metric.
”ATM” - Axial Turn Metric.
”fixed_QTM” - fixed left corner with quarter turn moves (support only 2x2x2).
”fixed_HTM” - fixed left corner with half turn moves (support only 2x2x2).
- static starminx() CayleyGraphDef [source]
Cayley graph generated by 20 moves of Starminx puzzle.
Each move is a rotation of a corner, centered around one of the dodecahedron’s pentagonal faces (face centres never move). A single turn corresponds to a set of disjoint 3-cycles, each on one triangular sticker.
- static starminx_2() CayleyGraphDef [source]
Cayley graph associated with the Starminx 2 puzzle.
Generated by 12 moves, corresponding to rotations of the whole dodecahedron’s faces (analogous to face turns in the Megaminx). Unlike the Starminx puzzle, where the generators are vertex-centered, the generators in Starminx 2 are face-centered and affect larger regions of the puzzle.