It spent approximately 35 hours moving about at random, however intensive machine-learning computing was going on during this time.
Eventually, the robot was able to understand its own dimensions and capabilities.
It then began successfully performing exercises, picking up objects and placing them elsewhere.
Professor Hod Lipson, who leads the Creative Machines lab, where the research was carried out, said: “This is perhaps what a newborn child does in its crib, as it learns what it is," he says.
"We conjecture that this advantage may have also been the evolutionary origin of self-awareness in humans.
“While our robot's ability to imagine itself is still crude compared to humans, we believe that this ability is on the path to machine self-awareness."
The self-modeling robot was also used for other tasks, such as writing text using a marker.
Meanwhile to test whether the self-model could detect damage to itself, the researchers 3D-printed a deformed part to simulate damage and the robot was able to detect the change and re-train its self-model.
The new self-model enabled the robot to resume its pick-and-place tasks with little loss of performance.
"Self-awareness will lead to more resilient and adaptive systems, but also implies some loss of control," the authors warn.
"It's a powerful technology, but it should be handled with care.” The study is published in the journal Science Robotics.
[link to finance.yahoo.com (secure)
[link to www.telegraph.co.uk (secure)