root@jonasvoigt.de~/post/4$

Computing the shortest solution for a Rubik's Cube

What can this Program do?

This program will calculate the shortest sequence of moves needed to solve a 3x3 Rubik's Cube from any starting state.

Motivation

I wanted to learn Rust. Because the core concept of the solver isn't very hard to understand and implement I believed, this would be a fitting Project to get started. In addition because there are lots of calculations, a fast language like rust is preferred to a higher level language like java or python.

Quarter turn vs. face turn

The length of a solve of a normal 3x3 Rubik's Cube can be defined by counting either the number of quarter turns or the number of face turns.

A Quarter turn is performed as the name suggests when one of the Cubes faces is twisted 90° clockwise or counterclockwise. Face turns also allow a 180° twists of the faces. There are 12 different quarter turns and 18 different face turns.

It was proven, that only 20 face turns or 26 quarter turns are needed to solve any position. Source

Singmaster Notation

I am using the Singmaster Notation for denoting a sequence of moves. I chose the white as top and red as front.