GitHub icon Gmail icon Messenger icon LinkedIn icon

LEGO Rubik's Cube Solver

2nd May 2018


I spent the majority of my final year at university working on my dissertation project: "Analysis of Rubik’s Cube Solution Algorithms with a LEGO Mindstorms Robot". Because solving Rubik's Cube with a LEGO Mindstorms kit had been done before, I decided that I would use it as a tool to analyse solving methods and attempt to produce a final optimised solution that would work with my robot.

The Robot

The first job was to design the robot with the limited number of LEGO pieces I had in a way that would handle a Rubik's Cube reliably. My first major design took around a week to complete, and was a combination of simply building with what I had and creating some CAD designs. The end result of this was a robot which could handle a Cube, but had too many minor faults to satisfy my self-defined brief.

The second (and final) design was a vast improvement on its predecessor, and was much more reliable. It used a cradle to hold and rotate the Cube and a grabber-arm-thing to flip the Cube onto its side to provide functionality for any move necessary. I also used a colour sensor to scan the Cube at the start of the program.

The Software

The software also went through a few different major iterations: the final version used pre-generated tables of positional data to find sequences between each table, which when combined would create a solution. The amount of data created was upwards of 100GB, even after weeks of optimisation.