Posts tagged with 'rubik'

PCPlus 298: Solving Rubik’s Cube

Ah, memories, memories. For September 2010’s issue I wrote about how to solve Rubik’s Cube, and it allowed me to revisit my days at Kings’, London, when I first came across the puzzle. Back in those days (and probably even now), the Maths Society at Kings had a fun weekend away in Windsor Great Park where we’d have talks about recreational mathematics. (Yes, I know, many people don’t think “recreational” and “mathematics” can be in the same sentence, but bear with me here.) Of course, it was an occasion for too much drinking and smoking and playing 3-card brag and staying up all night, but in 1979 we discovered a puzzle that pushed all that aside: Rubik’s Cube.

PCPlus logoAnd, boy, was it addictive. We had Prof Singmaster (the author of the first book about Rubik’s Cube, and the person who laid down the naming convention for describing Cube moves) attend and he showed how to solve it using simple moves that could be repeated ad nauseam to eventually solve the Cube. He also showed how to speed up the Cube by disassembling it, sanding the internal sides a little and spraying with silicone spray to lubricate it. I practiced enough over the next few weeks that I could easily solve the Cube within two minutes, but never got better at it than that. These days, people are solving it within a few seconds, which is quite incredible.

In the article, I discuss various manual algorithms that have been devised since 1979. There’s Singmaster’s original, Fridrich’s (the one where you have to memorize 120 different moves), Marshall’s, and Petrus’. And then came the computer algorithms: Thistlethwaite’s and Kociemba’s. There is of course the ultimate algorithm known colloquially as God’s algorithm, but no one has found that yet.

Another aspect to God’s algorithm is how many moves does it entail to solve a thoroughly mixed up Cube? By simple counting arguments, it was shown early on that the lower bound is at least 18 moves. Coincidentally, just after I’d written this article, Rokicki, Kociemba, Davidson, and Dethridge proved that all cube positions could be solved with at most 20 moves (they used a computer program to essentially count them all).

Me? I’ve still got my original 32 year old Cube. It’s still as smooth and fast as ever, but I’ve now forgotten my moves. The muscle memory I’d achieved through those weeks of repetition has been lost. I now use an iPhone app to solve my Cube, although mine has the colors in the “wrong” order. It’s non-standard according to the prevailing color scheme so I have to remember to swap over two colors when entering the random Cube into the app. My wife bought me a wooden 30th Anniversary cube last year for Christmas and let’s say there’s no way it’ll ever be used in speed trials.

(Fascinating fact: Images of Rubik’s Cube are copyrighted. My editor at PC Plus, Alex Cox, had to apply for permission for us to use images of a Rubik’s Cube in the article. Fascinating fact 2: the images we used were generated by Alex from a POV-Ray template.)

This article first appeared in issue 298, September 2010.

You can read the PDF here.

(I write a monthly column for PCPlus, a computer news-views-n-reviews magazine in the UK (actually there are 13 issues a year — there's an Xmas issue as well — so it's a bit more than monthly). The column is called Theory Workshop and appears in the Make It section of the magazine. When I signed up, my editor and the magazine were gracious enough to allow me to reprint the articles here after say a year or so.)

Album cover for Another Time, Another PlaceNow playing:
Ferry, Bryan - Smoke Gets in Your Eyes
(from Another Time, Another Place)


Rubik’s Cube iPhone app

A couple of months ago I finished an article for PCPlus about algorithms for solving Rubik’s Cube. It’ll appear in issue 298 in September 2010.

As part of my research I came across this article and video on Wired about an iPhone app that helped you solve it and, more than that, solve it in a remarkably small number of moves (usually 20 or fewer) using Kociemba’s algorithm. The free app (called CubeCheater) was written by Eric Faller. Unfortunately it seems he didn’t request permission from Seven Towns (the current owners of the license to market Rubik’s Cube worldwide) and had to remove the app. (Aside: my editor at PCPlus, Alex Cox, obtained permission from them for me to write about Rubik’s Cube for the magazine before I ever put electronic pen to Microsoft Word paper.)

Bummer. I would have liked to try the app and written about it as well. But, no go, so I submitted the article and forgot about it.

Imagine my surprise when this weekend, I was perusing the App Store when I came across the official Rubik’s Cube iPhone app. Further imagine my surprise when I saw that said app had exactly the same solver function as CubeCheater. Not only that, but the same interface.

Rubik's Cube iPhone app Solver interface

(Compare this to the interface shown in the video taken 18 months ago.) Interesting, no?

Anyway, I bought it ($4.99) to try it out. The only part of the app I was interested in was the Solver function where you input the state of a mixed-up cube and it solves it for you in as few moves as it can.

There is a cool feature where you input the faces using the camera rather than painting each cubelet with colors from the palette. You take a snapshot of the cube and the software works out the face’s grid and the colors in each cubelet.

For me and my particular cube this functionality is a complete and utter failure. The edge detection is pretty bad to begin with (hint: don’t try and fill the camera screen with the face like the image below, but make it occupy as much room as the image of the face above), but the color recognition just sucks. Here’s my white face (so called because it’s named after the center cubelet):

Actual white face on physical cube

And here’s what the app thought it was:

Interpretation of physical white face

There’s another problem which the app doesn’t address. For some unknown reason — perhaps because my cube is so old (I purchased it in 1979 before Ideal Toys got the original license to market the puzzle worldwide in 1980) — my cube center cubelets don’t follow the current standard positioning. I have red on the opposite side to white, not yellow. In fact, yellow and red are reversed on my cube, so, even if the camera input method worked, I’d have to fiddle with the colors anyway (wherever the app talks yellow, I have to think red, and vice versa).

OK, so given that for my physical cube I have to remember to switch yellow and red, does it work? Does it calculate a solution with a small number of moves? The answer is yes. It’s quite magical if you look at the cube after each move and see the colors slowly coming together.

I don’t particularly want to rate the app officially (after all, I haven’t tried the other parts of the app: solving a virtual cube on the screen with flicks of the finger, or the tutorial section), but I will admit to being very disappointed in the camera interface. Unlike this Sudoku Grab app, the AI in the Rubik’s Cube iPhone app is not that good at all.

Album cover for I Don't Know What You Want But I Can't Give It Any MoreNow playing:
Pet Shop Boys - I Don't Know What You Want But I Can't Give It Any More [the Morales Remix]
(from I Don't Know What You Want But I Can't Give It Any More)


Search

About Me

I'm Julian M Bucknall, the M because it's my middle initial and because I and the other Julian Bucknall (the movie guy) would like to differentiate ourselves.

I'm a programmer by trade, an actor by ambition, and an algorithms guy by osmosis. I write articles for PCPlus in my spare time, not that there's much of that.

Julian M Bucknall Apart from that, an ex-pat Brit, atheist, microbrew enthusiast, Pet Shop Boys fanboy, slide rule and HP calculator collector, amateur photographer, Altoids muncher.

DevExpress

I'm Chief Technology Officer at Developer Express, a software company that writes some great controls and tools for .NET and Delphi. I'm responsible for the technology oversight and vision of the company.

Validation

Validate markup as HTML5 (beta)     Validate CSS

Bottom swirl

Archives

February 2012 (4)
SMTWTFS
« Jan  
1234
567891011
12131415161718
19202122232425
26272829

Like this Archive Calendar widget? Download it here.

Social networking

Google ads

The OUT Campaign

The OUT Campaign

My Tweets

Bottom swirl