Wednesday, July 9, 2014

On Rubik's Cube

I love Rubik's cube. It's a puzzle that many people associate with intelligence, mathematical ability, and good problem solving skills, but being able to solve it actually has nothing to do with any of those. The only things you need are basic pattern recognition and muscle memory - both of which everyone has anyway.

    1. My first cubes

My first Rubik's cube was even older than I am. My dad bought two of them (one with standard colours, and one with pictures of fruit) some time in the early 80's when they first became popular, together with a short book explaining how to solve them. I found the book in 1996, shortly after we'd moved house. I asked my dad about it, and he found the two cubes for me. Not wanting to cheat, I scrambled one and tried solving it myself. It didn't take long to figure out how to solve one side, but I quickly realised that any turn inevitably messed up four sides, got frustrated, and moved on.

I came back to them a couple years later. This time, I actually tried reading the book. The first chapter was all about the internal mechanism, and how to take the cube apart. Naturally, I stopped reading there and did exactly that. I took them both apart, and put them back together in a solved state, and began to look at how various turns affected the faces. Whenever I got stuck in a position that I couldn't solve, I would take the cube apart, and put it back together. After a while, the core of one of the cubes broke while I was taking it apart. Having made very slow progress, and having lost a cube, my 12 year old brain decided it had more interesting things to do, so I moved on.

    2. Solving the damn thing

Once again, I came back the the cube a few years later. I think I was about 17 years old this time, and far more patient. I only had the cube with the fruit stickers left, so I had to be more careful. I decided to read the book, and I approached it the same way I would approach a school text book. I took a notepad and a pencil, and began to take notes.

The book described a very simple layer-by-layer method for solving the cube. You would start by inserting the four edges on the top face, and then execute a simple algorithm until they cycled into the correct positions. Then you would insert the four corners of that face, then the four edges of the middle layer. At this point, the top two layers of the cube were solved. To finish the last layer, you had to switch some corner pieces in the bottom layer to get them in the correct position, then execute an algorithm over and over until they were oriented correctly. Then, you would execute an algorithm to cycle the last four edges, until they were in the correct position, and finally you would execute one of three algorithms to flip them into the correct orientation. The book claimed that the method required an average of about 120 moves to solve the cube. There were a total of nine algorithms to learn, and it only took a couple of days to memorise them all (it's surprisingly easy if you just let muscle memory take over).

The catch was the centres. The book assumed that the cube had stickers with a solid colour, but my cube had little pictures of fruits. All of them would point the same direction except for the centres. I later learned that a cube like this is called a supercube, and some people draw arrows (or buy stickers with arrows) to turn their Rubik's cubes into supercubes. I was not content having my centres pointing the wrong way, so I sat down and figured out a couple of algorithms myself that would allow me to orient five of the six centres while solving the cube. I noticed that a couple of the algorithms I already knew rotated one or two centres if I repeated them three times, and with that, I could solve the cube, centres included.

Solving a Rubik's cube is a very relaxing task. It takes very little brain power, and is actually very meditative. Apart from occasionally glancing down to see which algorithm you need to execute next, you don't even really have to watch what you're doing. I used to solve my cube several times a week, just to meditate and relax.

    3. Moving on: new Cubes and new methods

My fruit cube lasted a surprisingly long time. After several years, it began to lock up occasionally. A couple years after that, pieces began to pop out every now and then. By late 2012, the pieces became so loose that it reached a stage where it would lock up on almost every turn, and it became almost impossible to solve without the whole thing exploding in my hands. I needed a new cube, so I bought one: a cheap Chinese cube from a flea market stall. The stickers lasted less than two weeks, and it was less than a month before one of the edges broke in half.

It was then that I decided to take things seriously. I went online and did some research, and discovered the fascinating world of speedcubing. I discovered that the world record at the time was less than six seconds, and that more than a thousand people around the world can solve a Rubik's cube in under fifteen seconds almost all the time! It put my two and a half minutes to shame.

I found out what makes of cube were actually considered good quality, and found a stickerless DaYan GuHong on sale. While waiting for my new cube to arrive (it took two months, thanks to a useless Postal service), I found a Rubik's 2x2 cube in a local toy store. I could solve it by adapting the 3x3 method, but it felt very slow and inefficient. I learnt to solve it using the Ortega method, which is a much faster method specially developed for 2x2 cubes, which is also fairly light on algorithms (you actually only need two of them, but learning up to eleven makes things faster).

Conveniently, my GuHong arrived the day before I left for America to present a paper a conference. A 15 hour plane flight is absolutely perfect for learning a new method. I made a short cheat sheet with the algorithms for the ZZ method, and between the two plane flights, I managed to memorize them.

    4. Speedcubing: attempt #1

Last month, a toy store near my girlfriend's house held a Rubik's cube competition. When I had first looked in 2013, there were only six South Africans ranked by the World cube Association, and speedcubing in the country seemed pretty much non-existent. I was fairly surprised to see an actual competition. I checked the World Cube Association website, only to see that the first official competition had been held a few months before, and more than thirty people had attended, two of whom had managed to set times under fifteen seconds.

It led me to find, a South African online store that stocks a range of the world's leading speed cube brands. I told myself that if I could solve my cube ten times with an average time less than 90 seconds (a minute faster than a year before), then I would allow myself to buy a new cube. I made it, but only just. In ten solves, my best time was 1:22, with an average of 1:29.8.

I ordered my new cube, a DaYan ZhanChi (since my stickerless GuHong is technically not competition legal), as well as a new 2x2 (my Rubik's brand one had a cracked core), and a 4x4 cube. With these new cubes, together with a couple of key rings, I can officially say that I have begun a bit of a collection.

I thoroughly enjoyed my first competition. By some miracle, I actually won the 2x2 category with an average of just over 16 seconds (my five solves took 13, 15, 15, 18 and 32 seconds). In the 3x3 category, I came nowhere near the winning average of 45 seconds. My best time was 53 seconds, and I averaged just over a minute.

    5. Next goal: An official WCA ranking

There's going to be an official WCA ranking event in Johannesburg on 23 November, and one in Cape Town on 30 November. This leaves me four and a half months to practice and get my times down. My goal is to set at least one time less than 30 seconds at that event. I'm improving fairly quickly. As of 30 June, my average time over 100 timed solves was 1:15.62. By 8 July, my average time over 100 solves had dropped to 57.93 seconds, and my current personal best is 42.65 seconds. 30 seconds may seem ambitious, but I'm fairly confident that I will be able to do it.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .