Algorithms

My first exposure to algorithms was during my time in middle school when I picked up the Rubik’s cube. I was baffled seeing two of my classmates solve it. I was utterly intrigued. That has to be magic.

I went up to one of them and asked- how did you solve that? (This was the time when dial-up internet, and I did not have google at my disposal) He humbly replies, “No, I am no genius. It is nothing but a set of moves I remembered. It came with the instructions with the cube” And he showed me. No it was algorithms- a set of sequences that seemed to output the same thing every time it is executed. “There are more algorithms, which are more efficient, and require less moves and less time to move this piece to where I want, and I am practicing to remember them”, he said. “It is muscle memory. You do it over and over, and eventually you will not really have to think about it, your fingers will remember the sequence”.

I think that week, I asked my mother to buy me a Rubik’s cube. I picked up the instructions and began following. I remember I spent the entire day following the instructions. By just simply following the sequence instructions of rotating -the pieces were moved, solving layer by layer. Still, I needed this pamphlet next to me, opened to solve it. There for the following weeks, all I did was solve the Rubik’s cube. Finally, I remembered all the basic algorithms to solve the enter cube.

It did not end there. I managed to learn shorter algorithms, more efficient ways to hold the cube, as well as understand just the logic of the color placement. It seem to become more intuitive as time went on. I can almost “feel” where the pieces would end up. There are was a standard pattern.

Fast forward now to the present. Its been around two decades and these algorithms are still etched in my muscle memory. My average solution time is ~45 seconds- which is by no means impressive in the world of speed-cubing, yet it is still impressive to those who have never seen a Rubik’s cube before. The world record time for a human is 4.22 seconds by Feliks Zemdegs. The world record for a robot? 0.637 seconds. That is insane!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store