Hacker News new | ask | show | jobs
by Karupan 738 days ago
I don’t know much about Rubik’s cubes, but isn’t that quite a limited number of moves as seen in the video? As a demo for the electronics and control systems, it’s great. But is it really that impressive from solving a cube that it got done in a blink of an eye?

Genuinely curious, as I’ve always been skeptical of claims of world record cube solving times, if there is a heavy reliance on the starting position, and that isn’t consistent.

5 comments

>But is it really that impressive from solving a cube that it got done in a blink of an eye?

If you look closely when the robot performs the fast rotational movements on the cube, it has near zero overshoot. It nails the position right every single time while also being insanely fast.

That's definitely impressive for marketing their servo controls especially considering that the cube is not a "speed cube" with chamfered edges on the blocks that can tolerate rotations with imprecisely aligned pieces, but a regular one that's less tolerant to that.

It's just a little disconnect between the expectations of people who know nothing about cube solving, who think that finding the solution is the difficult part, vs. the reality that this is entirely a demo of how fast and precise you can make the mechanical and electrical parts. Eventually it will be a demo of how resilient against tearing themselves apart you can make them (and the cube).
Any Rubik's cube can be solved in at most 20 turns, and we have established algorithms to solve any position in at most 30 that the computer is surely using.

https://en.wikipedia.org/wiki/Optimal_solutions_for_the_Rubi...

https://www.mathworks.com/matlabcentral/cody/problems/1123-r...

The most popularly used algorithm is 2-phase algorithm solver.

In a first phase you Reduce the cube state to a one that can be solved in only 180-degree turns, and in the second phase you complete the job using only 180-degree turns.

It has a nice property of splitting the work roughly in half (so both of those phases have roughly half bits of complexity of the full puzzle). And both of them are small enough that can be solved pretty instantly.

The optimal Reduction is not often leading to optimal solution, so you try out many different Reductions and see which one can be completed fastest. Interestingly - this is also the approach top human solvers use in Fewest Moves event.

https://github.com/cs0x7f/min2phase (in java) and https://github.com/cs0x7f/min2phase.js (in js)

This very nice library is a minimalistic implementation of 2phase algorithm and can generate hundreds of scrambles per second in the browser (so generating random state and then solving and then printing) and it hardly ever produces scramble longer than 20 moves. It's used by cubing trainers / timers etc.

So a good algorithm in a fast language on a good cpu should solve a cube in roughly 20 moves in probabaly 0.001s.

However to squeeze few miliseconds here and there it would make sense to read the cube state, use some very fast heuristic to make a first move, and utilize the 0.1s it takes to rotate the first face to find the best possible solution afterwards. Probably by the move 3 we will reach optimal solution.

I noticed their solution used a fair number of concurrent opposing side rotations. I don't think these moves are very common unless you specifically optimize for it?
I think they are quite common.

If you have a random sequence of moves then after each move you have 1/5 chance of turning the opposite face. So the fact that in 16 moves sequence they had it twice is roughly expected even if they didn't optimize for it

Computers can generate optimal solutions to arbitrary positions. There's no need to apply the human-optimized ergonomic algorithms or methods that human use to speedsolve.
Thanks, didn’t know that. Will do some reading tonight.
I suppose this shows the purpose of the robot: to demonstrate the electronics. There is nothing interesting about solving a cube (although this robot is incapable of rotating the center), and a 3x3 cube can be solved quite quickly by humans already (3.13s!). I'd love to see them try to do this with any other cube. There's something quite special about the 3x3 that makes it easier to solve. No parity problems like an even cube, and no center pieces to move like a >3 cube.
The theoretical number of turns needed to solve from any position is 20 so the 16-ish turns I counted in the video doesn't seem far off.

Any "recording breaking attempt" is going to be a little dependent on a good starting position.

The full solution seemed to be 14 moves by the axial turn metric, or 16 moves by the half turn metric. Axial means if you do turns on the same axis, it only counts as one move

This robot is able to do optimal solutions that a human wouldn't be able to find