# shahkrapi/solving-rubik-s-cube-using-graph-thoery architecture

> Architecture diagram of the GitHub repository shahkrapi/solving-rubik-s-cube-using-graph-thoery, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery
- Repository: https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery

## Overview

This repository describes a Rubik’s Cube solver that explores cube states using breadth-first and depth-first search, then uses a hash table to identify a match and returns the solution path stored during search. The README documents the algorithm but no source excerpts are available, so the graph shows only those documented relationships; component paths point to the sole source file in the tree.

Main entry points: [`final.cp`](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp) (Cube solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_search["State search"]
  node_solver["Cube solver<br/>[final.cp]"]
  node_bfs["Breadth-first search<br/>[final.cp]"]
  node_dfs["Limited depth-first search<br/>[final.cp]"]
end

subgraph group_matching["State matching"]
  node_hash[("Hash lookup<br/>[final.cp]")]
end

subgraph group_results["Solution output"]
  node_storedpath["Node solution path<br/>[final.cp]"]
  node_solution["Cube solution<br/>[final.cp]"]
end

node_user(("Cube solver user"))

node_user -->|"provides cube"| node_solver
node_solver -->|"uses shallow search"| node_bfs
node_solver -->|"uses parallel search"| node_dfs
node_solver -->|"checks match"| node_hash
node_solver -->|"retains path"| node_storedpath
node_storedpath -->|"provides"| node_solution

click node_solver "https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp"
click node_bfs "https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp"
click node_dfs "https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp"
click node_hash "https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp"
click node_storedpath "https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp"
click node_solution "https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp"

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_solver,node_bfs,node_dfs,node_user toneBlue
class node_hash toneAmber
class node_storedpath,node_solution toneMint
```

## Components

### State search

- [Cube solver](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp): `final.cp`
- [Breadth-first search](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp): `final.cp`
- [Limited depth-first search](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp): `final.cp`

### State matching

- [Hash lookup](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp): `final.cp`

### Solution output

- [Node solution path](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp): `final.cp`
- [Cube solution](https://github.com/shahkrapi/solving-rubik-s-cube-using-graph-thoery/blob/master/final.cp): `final.cp`

### Other components

- **Cube solver user**

## Connections

- Cube solver user → Cube solver: provides cube
- Cube solver → Breadth-first search: uses shallow search
- Cube solver → Limited depth-first search: uses parallel search
- Cube solver → Hash lookup: checks match
- Cube solver → Node solution path: retains path
- Node solution path → Cube solution: provides
