Hod Lipson of Cornell University and colleagues invented a robot that can (somewhat) self-replicate:
Their robots are made up of a series of modular cubes -- called "molecubes" -- each containing identical machinery and the complete computer program for replication. The cubes have electromagnets on their faces that allow them to selectively attach to and detach from one another, and a complete robot consists of several cubes linked together. Each cube is divided in half along a long diagonal, which allows a robot composed of many cubes to bend, reconfigure and manipulate other cubes. For example, a tower of cubes can bend itself over at a right angle to pick up another cube.
You just have to see the video clip: Link (Thanks D. Meloney!)