How nanborg/rubik works
Rubik is a Python 3×3×3 solver using CFOP: a scramble enters the command-line solver, which applies the scramble to the cube model, solves the cross, F2L, OLL and PLL, then returns a move sequence. A separate optional renderer animates a supplied scramble and moves read from stdin; the README says it does not participate in solving. The graph also preserves the documented benchmark tool and algorithm-table capability. Edges reflect the excerpts, source index and README; unsampled command-line and benchmark internals are described only at the documented level.
Main entry points: cfop.py CFOP orchestration · cube.py Cube state · render.py Renderer entry · f2l.py F2L solver
Components 20
User interfaces
- Solver CLI
rubik - Solution output
- Benchmark tool
rubik_perf
Cube model
- Cube colors
common/colors.py - Cube state
common/cube.py - Moves and tables
common/moves.py
CFOP solving
- CFOP orchestration
solving/cfop.py - Cross solver
solving/cross.py - F2L solver
solving/f2l.py - OLL solver
solving/oll.py - PLL solver
solving/pll.py - Bidirectional search
solving/search.py - F2L algorithms
data/cfop/f2l.txt - OLL algorithms
data/cfop/oll.txt - PLL algorithms
data/cfop/pll.txt
3D visualization
- Renderer entry
render.py - Polygon mapping
rendering/mapping.py - Animated cube
Other components
- User
- Pygame
Connections 28
- User → Solver CLI: provides scramble
README.md - Solver CLI → CFOP orchestration: requests solution
README.md - CFOP orchestration → Cube state: applies scramble
solving/cfop.py - CFOP orchestration → Cross solver: solves cross
solving/cfop.py - CFOP orchestration → F2L solver: solves F2L
solving/cfop.py - CFOP orchestration → OLL solver: solves OLL
solving/cfop.py - CFOP orchestration → PLL solver: solves PLL
solving/cfop.py - CFOP orchestration → Solution output: returns moves
solving/cfop.py - Solver CLI → Solution output: prints solution
README.md - Cross solver → Bidirectional search: uses search
solving/cross.py - F2L solver → Bidirectional search: uses search
solving/f2l.py - F2L solver → Cross solver: checks cross
solving/f2l.py - F2L solver → F2L algorithms: loads algorithms
solving/f2l.py - OLL solver → F2L solver: checks F2L
solving/oll.py - OLL solver → OLL algorithms: loads algorithms
solving/oll.py - PLL solver → OLL solver: checks OLL
solving/pll.py - PLL solver → PLL algorithms: loads algorithms
solving/pll.py - Cube state → Cube colors: uses colors
common/cube.py - Cube state → Moves and tables: uses move turns
common/cube.py - Moves and tables → Cube state: uses cube model
common/moves.py - Solver CLI → Benchmark tool: runs separately
README.md - User → Renderer entry: starts renderer
README.md - Renderer entry → Cube state: applies scramble
render.py - Renderer entry → Polygon mapping: draws polygons
render.py - Renderer entry → Animated cube: animates moves
render.py - Renderer entry → Pygame: uses optional library
README.md - Polygon mapping → Cube state: maps positions
rendering/mapping.py - Polygon mapping → Cube colors: maps colors
rendering/mapping.py