A robot arm builds "babies" that get progressively better at moving without any human intervention.
The ultimate aim of the research project is to develop robots that adapt to their surroundings.
The work by teams in Cambridge and Zurich has been published in the journal PLOS One.
It seems like a plot from a science fiction film:  a robot that builds other robots  - each one better than the previous generation. But that is what researchers in Cambridge and Zurich have done.
But those concerned about machines taking over the world shouldn't worry, at least not yet.
At this stage the "baby robots" consist of plastic cubes with a motor inside. These are put together by a "mother" robot arm which glues them together in different configurations.
Although the set up is simple the system itself is ingenious.
The mother robot assesses how far its babies are able to move, and with no human intervention, improves the design so that the next one it builds can move further.
The mother robot built ten generations of children. The final version moved twice the distance of the first before its power ran out.
According to Dr Fumiya Iida of Cambridge University, who led the research with colleagues at ETH Zurich, one aim is to gain new insights into how living things evolve.
"One of the big questions in biology is how intelligence came about - we're using robotics to explore this mystery," he told BBC News.
"We think of robots as performing repetitive tasks, and they're typically designed for mass production instead of mass customisation, but we want to see robots that are capable of innovation and creativity."
Another aim is to develop robots that can improve and adapt to new situations, according to Andre Rosendo - who also worked on the project.
"You can imagine cars being built in factories and the robot looking for defects in the car and fixing them by itself," he said.
"And robots used in agriculture could try out slightly different ways of harvesting crops to see if they can improve yield."
Dr Iidya told me that he came into robotics because he was disappointed that the robots he saw in real life were not as good as the ones he saw in science fiction films such as Star Wars and Star Trek.
His aim was to change that and his approach was to draw lessons from the natural world to improve the efficiency and flexibility of traditional robotic systems.
As to whether we'd ever see robots like those in the sci-fi films that inspired him, he said: "We're not there yet, but sure, why not, maybe in about 30 years."
Follow Pallab on Twitter

The men, aged 26 and 24, were in a house in Melrose Street when three men armed with a knife, hammer and batons forced their way into the property just before midnight on Saturday.
After assaulting the men, the gang left with a sum of cash and personal items. They also smashed a number of windows.
The men in the house received medical treatment for their injuries.
Police have appealed for anyone with information to contact them.

The $5m (??3.2m) prize is supposed to be awarded each year to an elected leader who governed well, raised living standards and then left office.
This is the fourth time in five years there has been no winner.
A committee member said the group looked "for excellence in governance but in leadership also".
Kenya's Mwai Kibaki met at least one of the criteria, after he stepped down as president earlier this year.
However, his 2007 re-election was tarnished by disputes which turned violent, leading to the deaths of some 1,200 people.
His opponent, Raila Odinga, said the poll had been rigged in favour of Mr Kibaki, who denied any wrongdoing.
Three people have won in the seven years since the prize was launched: Cape Verde's Pedro Verona Pires; Festus Mogae from Botswana and Mozambique's Joaquim Chissano.
Sudan-born telecoms entrepreneur Mr Ibrahim launched the prize in an attempt to encourage African leaders to leave power peacefully.
The $5m prize is spread over 10 years and is followed by $200,000 a year for life.
Engineers have developed a robotic system that can evolve and improve its performance.
[NEXT_CONCEPT]
Two men have been assaulted by an armed gang in south Belfast.
[NEXT_CONCEPT]
The world's most valuable individual prize - the Mo Ibrahim prize for good governance in Africa - has gone unclaimed yet again.