Robot Solves Rubik’s Cube in just One Second

Some of the fastest Rubik’s cube solvers in the world have gotten down to a five second solve — which is quite an incredible feat for a human — but how about one second? Well, [Jay Flatland] and [Paul Rose] just built a robot that can do exactly that.

The robot uses four USB webcams, six stepper motors, and a 3D printed frame. The only modification to the Rubik’s cube are some holes drilled in the center pieces to allow the stepper motors to grip onto them with 3D printed attachments.

The software is running off a Linux machine which feeds the data into a Rubik’s cube algorithm for solving. In approximately one second — the cube is solved.

It wasn’t that long ago that humans could still beat machines at solving Rubik’s cubes. In fact, the previous world record we shared was for a robot that could solve a cube in 10.69 seconds — a good five seconds slower than the fastest human solvers.

[Jay & Paul] are currently in the process of submitting their robot for consideration for a new world record.

Of course if you wanted to build one yourself true hacker style — all you’ll need are some popsicle sticks, an Arduino and some RC servos.

[Thanks Itay!]

55 thoughts on “Robot Solves Rubik’s Cube in just One Second

    1. There are cubes made for speed and yes, cube lube is available.

      I think this is unfair as it has 6 *hands*.

      I would like to see them do this with a 4x4x4 as a 4x4x4 doesn’t have center pieces.

      1. Yes. We used a “speed” cube ( a Dayan Zhanchi to be specific ) and silicone lubricant ( from but basically the same as the stuff used to lubricate plastic gear sets in RC race cars ).

        We also experimented with cube tension ( speed cubes have adjustable tension ), and found that a well lubed but fairly “tight” cube worked best for us.

        We “exploded” cubes several times by trying to turn the speed up to “11”.

    1. Impressive as it is, I myself would be against using modified cubes in competitions unless there is a distinction between modified and unmodified cubes.
      I think the cube solver will be a lot less interesting looking if it’s going to come down to just the software for speed after the cube is modified to fit the hardware.

      1. It is awesome and yet the mods just don’t sit right with me either. We all accept that the puzzle itself can be done super fast by computer, so the challenge now is surely to move a standard cube really fast to apply the solution. Something to keep them busy for version two! Also modified cubes blow out my fantasy cube solving vending machine!

      2. Not allowing mods just makes it into a battle for who can design the best high-speed cube holder. Some sort of vacuum sucker, or can you use glue? A frame around the outside? Does it really matter? The cube’s mechanism isn’t modded (except, it’s a special cube designed for speed, not a Rubik’s [tm] one).

        If anything, agreeing on a standard cube would be more important. But then the time limit might come down to how fast you can turn it before it falls to bits, which is beyond your control.

        All considered, it doesn’t matter. Solving the sequence, then making the turns, is the issue. Sequence-solving is now trivial with modern computing power.

        And it’s not like it solves world hunger. The cube’s only modified to give the machine a proper grip on it, just a few holes in the tile would do that. For what it’s worth, for what it actually is, I think this is acceptable. Particularly since it’s a specially-designed speed cube anyway.

    2. The creators would have to chime in whether it’s actually a factor or not, but in the video they clearly position the center cross in the same position every time: white on top, blue to the observer’s right.

      1. At the the the video was filmed, we had to put the cube in the same way was we put it in during initial calibration.

        The initial calibration could be any way, but later solves had to match that orientation. The stickers were to help us remember to calibrate it the same way every time ( so that we didn’t have to remember ).

        For our official attempt on Friday, February 5th, we will be judging the center face via the camera. A little harder, due to the reduced sticker area, but workable.

        Anyway, I’m not sure that it matters, because the WCA rules spell out in the scramble section that the cube shall be scrambled with white up and green forward, and human competitors get to hold ( but not twist ) the cube for a few seconds before a solve and put it down however they want before actually solving.

        Also, the current Guinness record holder has the same restriction.

        We’re going to enable the center detection code mainly to make sure we don’t mess anything up on “game day.”

    3. This is Paul Rose ( the silent guy in the video )
      1) As far as I can tell from the WCA rules, this modification is legal for human competitions

      The current Guinness record holder completely removed the center caps and still qualified for the Guiness record.

      I admit it would be “cooler” to turn an unmodified cube, our earlier tries at doing this basically worked but didn’t stand a chance of beating the current record holder, whose cube is also modfied.

      2) We can detect the center pieces. It is harder, and wasn’t perfected at the time of the video, but will be in play on our official attempt on Friday, February 5th.

      The sticker area visible to the camera is significantly smaller for these pieces, but still sufficient.

        1. I see your point.

          But seriously, if you can generate an (on average) 18 turn solve in 10 microseconds on a fast PC, I’d like to switch to using your algorithm.

          Right now it is taking me ( on average ) 15 milliseconds, and very rarely up to 166 milliseconds for some deeply twisted cases like the SuperFlip.

          Your code would net me an over 1000x speedup.

          We considered using a compute cluster to distribute the (pruned) search, but (oddly) the Guiness contract specifically ruled out network connections for the solving robot.

          As it stands, there are typically better solutions than the one we find, but finding them would take longer than it takes to physically execute the longer solve. If we could cut two moves off of our average solve, we could comfortable solve in the sub-second a majority of the time.

    1. According to comments on the youtube video, simple modifications are allowed in competition.

      Apparently they are fine and other similar record holders also modified their cubes.

      Also, apparently the human speed champs use modified cubes – rubiks isnt the only or preferred brand, people have speed-cubes that spin freely!

      Who knew!

    1. I very much doubt they would get the same traction on the layers using just friction on the respective centerpieces.

      If the same rules apply for humans and machines, such a cube course violates WCA regulations (3j, “cube pieces must be without any markings or damage”). But of course it would be at the discretion of the Guinness committee, not the WCA, whether they’ll allow it—and/or possibly put it into its own category.

      1. Perhaps they could temporarily attach the cube using something like Scotch “Command” adhesive. Hope that isn’t necessary though. The current modifications might violate the letter of the regulations, but I don’t think they violate the spirit.

  1. Wow, that’s fast. An interesting note: In the early ’80s the tbp society at U of I (who?, You know, the place HAL 9000 was supposed to be created … by now) solved the same problem w/a North Star CPM machine & some pneumatic paraphernalia. Guessing, it took maybe 5 minutes for the mechanics to do their work. So in 30 years we’ve had about a 300 x speed improvement. Woefully short of Moore’s Law which would put the bar at 15^2 x. Still, that’s fast.

    1. moore’s law is an observation about the growth of transistor count in ICs. It is about as useful or relevant here as any other completely unrelated empirical observation. your application here is a 3rd degree assault on science. you should be imprisoned.

  2. Interestingly, the current world-record robotic solver was built by a kid in my daughter’s high school (Zack Gromko). I don’t think his required modifications to the cube, but I’m not 100% sure.

  3. This Paul ( the silent one in the video ).

    Our official attempt will be on Friday, February 5th.

    After the dust settles, we plan to make the CAD drawings, the microcontroller schematics and code, and the C++ code for the linux solving application available on github. Probably GPL, but since we used boost ( for general utility) and SDL ( for graphics ) we’ll need to investigate which license fits best.

    1. Yes.

      For the real record will used hand scrambled cubes ( to prevent the appearance of memorizing and reversing the scramble ). Either the judge will do this himself, or pick someone to use the official WCA scramble generator and following the generated scramble by hand.

      But we have a random scramble routine that (virtually) takes apart the cube and puts the pieces in random locations with random orientation, and then fixes any parity errors ( there are certain ways to put together a disassembled cube that cannot be solved ). We use this for testing, because it is easier than taking out the cube, scrambling it by hand, and re-inserting it.

      Finally (in answer to your actual question), we have a few built in scrambles, including “SuperFlip” which is known to take maximum number of moves. Our machine takes a little longer than average ( 1.5 seconds IIRC ) on this one, but still comfortably beats the current record. The extra time is partially due to the extra 2 twists above the average random case, and partially due to the search algorithm having to dig deeper to find the solution.

      H. Kociemba ( ) has shown that the odds of requiring the max number of turns given a random scramble is something like 1 in 10 ^ 11 ( 1 in 100,000,000,000 )

  4. What is the actual “solving” time not including the physical movement? My assumption is that the full solution is acquired from the initial imaging of the cube, so once it is “solved”, the sequence of moves is generated and kicked into gear. So, how long does it take to generate the solution? Can a human generate a solution in the same time? The physical movement is secondary to the solution in my opinion. In other words, if I could look at a rubiks cube and determine the solution in a fraction of a second, the act of physically moving it to the solved state is irrelevant when comparing the human mind to a computer.

    1. You must be kidding… Do you think the solving takes more than .5 second? Computer vision is way faster thank you seem to think. All designs I’ve seen so far were based on mechanical perfection, not algorithm speed. Nobody even mentioned the algorithm speed.

      I must strongly advise you to try to make a simple CV algorithm yourself to give you the idea regarding speed.

      1. Not kidding at all. The first sentence of the article specifically states the comparison of a human to a robot in solving the cube. In that comparison, a human’s limitation regarding physical movement is greater than that of the robot, so immediately you are not comparing apples to apples. One way to have a better comparison is to separate the two tasks. I would be tempted to state that some humans can take one look at a cube and almost instantly know all moves to solve the cube. That means the article is basically that a robot can do a task in a fifth of the time it took a human? so what, not impressed at all then.

        If all the designs are based upon mechanical perfection, than why bother rating them based upon actually solving the cube. Why not rank them by “rotations per second” ? With that argument, the CV algorithm is pointless to the comparison.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s