Last Christmas my son, now 14 years old, got a robotic toolkit present. This is a video showing the result. I was honestly stunned by surprise.
He uses the robotic toolkit to move the cube. A webcam is linked to a PC to feed the algorithm. A Visual Basic program feeds the robot with instructions.
Sourcecode available on his website.