This program solves a Rubik's cube, and renders the solution in OpenGL (Java's graphics rendering library).
The program takes in a video of a real-life scrambled Rubik's cube, converts this into a 3D render of the cube, and shows the steps required to solve the cube in a rendered simulation.
I built both the Rubik's cube solver and simulation model from scratch!
Video of Rubik's Cube -> 3D render of the cube -> 3D simulation solve of the cube
Video of real-life Rubik's cube:
2021-08-19.12-54-34_Trim.mp4
Slow speed solve:
Rubiks.Cube.Solver.2021-08-19.12-42-16_Trim_Trim_Trim.mp4
High speed solve:
Rubik.s.Cube.Solve.-.Max.Speed.mp4
For all you Rubik's Cube nerds out there, I used a combination of the beginners method and CFOP method to solve the cube.
These are the steps I used:
- Cross
- First layer solve
- Second layer solve
- OLL
- PLL
I wanted to implement a straight CFOP solution using F2L, but I found this to be quite challenging and unfortunately ran out of time.
In English... this solution solves the cube in layers, starting at the bottom layer and working its way up. The first three steps are solved using search algorithms with hand-crafted hueristics/tactics, and the final two steps are solved through algorithmic pattern matching.
For fun I also tried implementing neuro-evolutionary neural networks to see if they could make any progress... but unfortunately found the results to be too unpredicatable.
Trying to derive algorithms to solve a Rubik's cube (without help from the internet) was a very fun challenge!