Mar 26, 2014

Small and fast NXT cube solver



"Copper Dragon" made a wonderful small NXT based cube solver with an ingenious new mechanism to solve the cube.
below are some quotes how it is made:
The machine can turn the bottom face by blocking the middle layer with the fork and rotating the turn-table. It can not turn the top face at all and the cube itself can only be rotated around the vertical axis. This requires of course a special solving strategy and a special way to scan the colors: It needs to restructure the whole cube while scanning. This scanning process is rather cumbersome and takes up the first 18 seconds.
The solving algorithm consists of 7 phases with precomputed tables that solves a 2x2x2 subcube first, extends to 3x2x2 then F2L and last layer in one step. It tries 4 rotational symetries and chooses the shortest solution. By this an average of approximately 38 turns are needed for a full solve. What you see in the video is indeed a full solve that requires about 18 seconds for scanning, 1 second for computation and 26 seconds for solving. With the 26 seconds I was a bit lucky, but it seldom takes more than 30. 
I am using NXC with the enhanced firmware (for the motor control). While the code is pretty slow in execution, it is fast enough for my table-driven solver. Biggest problem was of course the tiny flash memory space. I would have preferred to use fewer and bigger tables for a shorter solution, but this is pretty much the best I could squeeze into the device.

I must also confess that I had to do two things you could consider cheating: The scanning process is not complete since the mechanism can not scan the middle pieces. Therefore I have to insert the cube always with the white face on top and the red face to the right.
Also the current mechanism can not handle an original Rubiks cube because of corner cutting problems. I am using a "Speed Cube Ultimate II" instead which has excellent corner-cutting. Maybe I can overcome the second restriction without loss of speed, but I have no idea how to scan the middle pieces without additional camera/color sensor.


I wonder what could happen if David or Mike, team up with Copper Dragon.

1 comment:

Tristan Vukosich said...

WOW! That is amazing! No offense to David Gilday's design, but this robot is much smaller and faster! I noticed you didn't use pieces from the NXT 2.0 kit, but it doesn't look like they're hard to find either.

And about that 'cheating', I don't think that's the right word for it. The way you put the cube in is just how you prepare the machine. And as far as the kind of cube, it looked like a normal one to me. Great job all around I think!

P.S. You should try re-writing the code on an EV3 brick, since it has more flash memory. ;)

Related Posts Plugin for WordPress, Blogger...