by Oscar Ivarsson and Pär Eriksson
Cubiks Rube
a Rubik's Cube AI solver

- Background
- Algorithm 1: Layer-By-Layer
- Algorithm 2: Thistlewaite
- Result
- Demo
Introduction
HOW TO SOLVE RUBIK'S CUBE
1. Shuffle the cube.
2. Rotate the sides into correct positions


Background

Invented in the 70s by Erno Rubik
43 * 10^18 possible combinations
Rubik's Cube Group: { L, R, F, B, U, D }
Background
God's Number
The maximum number of moves to solve any instance of the cube.
1981 Jan - 140 moves
1981 Jul - 104 moves
1992 May - 56 moves
1995 Jan - 42 moves
2005 Nov - 40 moves
2007 Jul - 34 moves
2009 Jun - 29 moves
2014 Aug - 26 moves
Background
Solvability
Only 1/12 cubes are solvable

Algorithm 1: Layber-By-Layer
Algorithm 2: Thistlethwaite
Dr. Morwen Thistlethwaite

Thistlethwaite's Algorithm, works by restricting the positions of the cubes into groups of cube positions, that can be solved using a certain set of moves.
Maximum moves: 52 (Half-turn metric)
Algorithm 2: Thistlethwaite
G0 = < L, R, F, B, U, D >
G1 = < L, R, F, B, U2, D2 >
G2 = < L, R, F2, B2, U2, D2 >
G3 = < L2, R2, F2, B2, U2, D2 >
Moves of each subgroup
The plan is to manoeuvre down through the chain:
G=G0> G1> G2> G3> 1
One gets from Gi to Gi+1 by using moves in Gi only!
G4 = { I } solved state
Edge orientation example
Algorithm overview
Algorithm 2: Thistlethwaite
Optimizing the moves in each phase
The optimal theoretical solution would be to store all states of the cube, but as mentioned before this is practically impossible.
Instead we can store possible position for each phase. (G1, G2, G3)
?
!
Algorithm 2: Thistlethwaite
Iterative-Deepening A* (IDA*)

depth = 1
depth = 2
depth = 3
depth = 4
Result
Shuffle Count 100 200 300 400 500 600 700 800 900
Move Count: Layer-By-Layer 252 244 156 225 230 281 229 380 183
Move Count: Thistlewaites 54 48 50 45 55 44 41 48 55
Time: Layer-By-Layer 00:00:11 00:00:12 00:00:05 00:00:03 00:00:05 00:00:09 00:00:07 00:00:08 00:00:06
Time: Thistlewaites 00:11:71 00:28:96 01:14:59 01:01:79 00:19:46 00:14:38 00:24:21 01:18:67 02:40:86 Demo
Copy of Cubiks Rube
By Pär Eriksson
Copy of Cubiks Rube
- 310