cube_solver.solver.dummy module
DummySolver solver.
Implementation of a simple one-phase algorithm that does not use pruning tables.
Examples
>>> from cube_solver import Cube, DummySolver
>>> solver = DummySolver()
>>> cube = Cube("L2 U R D'")
>>> solver.solve(cube)
"D R' U' L2"
- class cube_solver.solver.dummy.DummySolver(use_transition_tables=True, use_pruning_tables=True)[source]
Bases:
BaseSolverCreate
BaseSolverobject.- Parameters:
use_transition_tables (bool, optional) – Whether to use transition tables for cube state transitions. If
True, creates or loads the tables from thetables/directory. Default isTrue.use_pruning_tables (bool, optional) – Whether to use pruning tables to reduce the tree search space. If
True, creates or loads the tables from thetables/directory. Default isTrue.
See also
solveSolve a cube position.
- partial_corner_perm: bool = True
Whether the solving algorithm uses the normal or the partial corner permutation.
- partial_edge_perm: bool = True
Whether the solving algorithm uses the normal or the partial edge permutation.
- static phase_coords(coords, phase)[source]
Get the coordinates for the specified phase.
- Parameters:
coords (tuple of int) – Flatten cube coordinates.
phase (int) – Solver phase (0-indexed).
- Returns:
phase_coords – Phase coordinates.
- Return type:
tuple of int
Notes
Depending on the class attributes
partial_corner_permandpartial_edge_perm, thecoordsparameter is the flattened version of the output from theget_coords()method.