Rubik's Graph Lab

Every cube position is a vertex, every face turn is an edge. Use COVE-3 to solve a long 3×3 scramble, or explore shortest-path searches on smaller problems. Then step through the verified moves on the cube.

Make your own scramble
Scan a real cubeTwo photos of three sides each. Correct the colors and find a verified solution with COVE-3.

Photo 1

Three sides around one corner

Photo 2

The opposite three sides

Sticker map

Pick a color, then tap stickers to fix them

One photo shows only 27 of the 54 stickers, so it takes two. Hold the cube with one corner pointing at the camera, take the photo, then turn the cube to show the diagonally opposite corner. On each photo, drag the middle handle onto the corner nearest the camera and the six outer handles onto the cube's outline, or drag anywhere else to move the whole outline. Check that the face names under each photo are right, fix any misread stickers in the map, then press Solve.

Current vertex

Drag to rotate
Shortest path (half-turn metric)
Run a search to find the path.

Neighbourhood

Explored state graph

Forward tree (from scramble) Backward tree (from solved) Shortest path
Columns are distance from the root. Hover a dot to see how the search reached it, click it to load that state onto the cube.

States discovered per depth

log scale

Search cost

Path length–
Stored entries–
Time–
Deepest level–

The graph behind the cube

Vertices and edgesThe cube group is a Cayley graph. Each of the 43,252,003,274,489,856,000 positions of a 3×3 is a vertex, and the 18 face turns (U U2 U' and so on for six faces) are its edges. The graph is 18-regular and looks the same from every vertex.

Breadth-first searchBFS visits vertices in rings of equal distance, so the first time it touches the solved state it has found a shortest path. The catch is the ring sizes: 18, 243, 3,240, 43,239… roughly ×13 per level.

Meeting in the middleBidirectional BFS grows one tree from the scramble and one from solved, and stops when they touch. Two trees of depth d/2 are far smaller than one of depth d, which is why it reaches scrambles that plain BFS cannot.

A* with a lower boundOne face turn moves at most 4 corners and 4 edges, so ⌈misplaced corners ÷ 4⌉ is a distance that can never be overestimated. A* uses it to expand promising vertices first, while still guaranteeing a shortest path.

COVE-3 (3×3 only)Our two-phase solver skips moves already ruled out by its distance bounds and verifies every returned solution. It compiles faster search tables after the first solve. Results are practical solutions, without a shortest-path guarantee. See the paper for matched-output comparisons and the memory tradeoff.