/algorithms_

Long-form guides to the cube-solving algorithms running inside CubeRoot. One algorithm per page — math, data structures, implementation, performance.

4 deep dives·state-space search / admissible heuristics
A*
/code/algorithms/ida-star
IDA* + prune tables
Iterative Deepening A*

The engine every cube solver shares: iterative deepening + admissible heuristic; reverse BFS encodes state distance into a 4-bit lookup table — memory for time

Foundation · 4-bit LUT · reverse BFS
/code/algorithms/kociemba
Kociemba two-phase
Two-Phase Algorithm

The 1992 classic by Herbert Kociemba: descend to subgroup G1, then solve within it. Three coordinates (CO/EO/UD-slice) and three prune tables

Classic D&C · subgroup G1 · 3 coords
/code/algorithms/min2phase
min2phase
Shuang Chen’s refined build

cs0x7f pushes two-phase to its practical limit: symmetry compression, huge prune tables, phase-1 early cutoff — instant solves on any laptop

Java impl · symmetry · huge prune
/code/algorithms/cfop-std-solver
CFOP multi-stage solver
Optimal Cross / XCross / F2L

Self-built: optimal move counts for all 5 CFOP stages. Lehmer encoding + conjugation lets four F2L slots share one prune table; 2.4M samples quantify color-neutrality

5 stages · conjugation · 2.4M samples