Monday, May 19, 2014

Rubik's Cube Simulation and Solver.

On the auspicious occasion of 40th Anniversary of Rubik's Cube I would like to share with you my "Rubik's Cube Simulator and Solver". I made it some years back, so many of you might know of this (from my facebook).



Despite many requests, I haven't planned to share my source code of this application. Its not because I don't want to share, its because I coded it two years back with Swapnil Sneham and its all spaghetti in there. We had to complete it in limited time, and we had other projects in hand as well. Due to this, the app is still not well finished and might even be buggy.

For those who haven't seen it, I would like say few things before sharing :D

The algorithm is kinda slow, takes a lot of time to solve the cube. I haven't optimized it nor touched the code since. It was all in rush, and all I could do then :)
The algorithm used is the basic rubik's cube solving trick. It's very simple and even simpler to implement. Only thing challenging was the cube distance calculation. Once you figure-out a good way to represent and calculate it, the overall application is piece of cake :D

So, here is the video:



Enjoy!





2 comments: