# aknlite48/parallel-cube-solver architecture

> Architecture diagram of the GitHub repository aknlite48/parallel-cube-solver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aknlite48/parallel-cube-solver
- Repository: https://github.com/aknlite48/parallel-cube-solver

## Overview

This repository provides command-line Rubik’s-cube solvers: two C++ 3×3 implementations with different state representations, plus a standalone Python 2×2 solver. The documented workflow accepts a random-move count or custom shuffle, searches for a solution with configurable solver options and depth, and prints the configuration and solution. The README documents C++ capabilities; the Python excerpt shows its shuffle and breadth-first search directly. Some C++ input-to-search dispatch details are unsampled, so the graph keeps those links at the documented CLI level.

Main entry points: [`20_state/3cube_solver.cpp`](https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp) (C++ CLI), [`48_state/3cube_solver.cpp`](https://github.com/aknlite48/parallel-cube-solver/blob/main/48_state/3cube_solver.cpp) (48-state search), [`2cube_solver.py`](https://github.com/aknlite48/parallel-cube-solver/blob/main/2cube_solver.py) (Python 2×2 solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and CLI"]
  node_cpp_cli["C++ CLI<br/>[3cube_solver.cpp]"]
  node_shuffle_input["Shuffle input<br/>[3cube_solver.cpp]"]
end

subgraph group_engines["Cube models and search"]
  node_model20["20-state model<br/>[3cube_solver.cpp]"]
  node_search20["20-state search<br/>[3cube_solver.cpp]"]
  node_model48["48-state model<br/>[3cube_solver.cpp]"]
  node_search48["48-state search<br/>[3cube_solver.cpp]"]
  node_py2["Python 2×2 solver<br/>[2cube_solver.py]"]
end

subgraph group_results["Solution output"]
  node_solution["Solution and status<br/>[3cube_solver.cpp]"]
end

node_user(("CLI user"))

node_user -->|"provides options"| node_cpp_cli
node_cpp_cli -->|"accepts shuffle"| node_shuffle_input
node_shuffle_input -.->|"sets cube state"| node_model20
node_cpp_cli -->|"selects solver"| node_search20
node_cpp_cli -->|"selects solver"| node_search48
node_search20 -->|"applies moves"| node_model20
node_search48 -->|"applies sequences"| node_model48
node_search20 -->|"prints result"| node_solution
node_user -->|"sets move count"| node_py2
node_py2 -->|"prints solution"| node_solution

click node_cpp_cli "https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp"
click node_shuffle_input "https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp"
click node_model20 "https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp"
click node_search20 "https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp"
click node_model48 "https://github.com/aknlite48/parallel-cube-solver/blob/main/48_state/3cube_solver.cpp"
click node_search48 "https://github.com/aknlite48/parallel-cube-solver/blob/main/48_state/3cube_solver.cpp"
click node_py2 "https://github.com/aknlite48/parallel-cube-solver/blob/main/2cube_solver.py"
click node_solution "https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cpp_cli,node_shuffle_input,node_user toneBlue
class node_model20,node_search20,node_model48,node_search48,node_py2 toneAmber
class node_solution toneMint
```

## Components

### Inputs and CLI

- [C++ CLI](https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp): `20_state/3cube_solver.cpp`
- [Shuffle input](https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp): `20_state/3cube_solver.cpp`

### Cube models and search

- [20-state model](https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp): `20_state/3cube_solver.cpp`
- [20-state search](https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp): `20_state/3cube_solver.cpp`
- [48-state model](https://github.com/aknlite48/parallel-cube-solver/blob/main/48_state/3cube_solver.cpp): `48_state/3cube_solver.cpp`
- [48-state search](https://github.com/aknlite48/parallel-cube-solver/blob/main/48_state/3cube_solver.cpp): `48_state/3cube_solver.cpp`
- [Python 2×2 solver](https://github.com/aknlite48/parallel-cube-solver/blob/main/2cube_solver.py): `2cube_solver.py`

### Solution output

- [Solution and status](https://github.com/aknlite48/parallel-cube-solver/blob/main/20_state/3cube_solver.cpp): `20_state/3cube_solver.cpp`

### Other components

- **CLI user**

## Connections

- CLI user → C++ CLI: provides options (evidence: `README.md`)
- C++ CLI → Shuffle input: accepts shuffle (evidence: `README.md`)
- Shuffle input → 20-state model: sets cube state (evidence: `20_state/3cube_solver.cpp`)
- C++ CLI → 20-state search: selects solver (evidence: `README.md`)
- C++ CLI → 48-state search: selects solver (evidence: `README.md`)
- 20-state search → 20-state model: applies moves (evidence: `20_state/3cube_solver.cpp`)
- 48-state search → 48-state model: applies sequences (evidence: `48_state/3cube_solver.cpp`)
- 20-state search → Solution and status: prints result (evidence: `20_state/3cube_solver.cpp`)
- CLI user → Python 2×2 solver: sets move count (evidence: `2cube_solver.py`)
- Python 2×2 solver → Solution and status: prints solution (evidence: `2cube_solver.py`)
