Researchers have developed robots that learn to live with damaged parts in less than a minute, instead of the many hours needed by traditional self-learning systems.
The system paves the way for robots to be used in a wide variety of settings, coping with damage that occurs in the real world.
Possible applications include robots looking after the elderly, rescuing earthquake victims or doing housework.
Details are in the journal Nature.
We marvel at the robots we see in films: some try to wipe out humanity, such as Ultron in the recent Avengers film, while others like C-3PO in Star Wars are helpful albeit slightly annoying. But they are the still the stuff of science fiction, partly because if the slightest thing goes wrong with a real-life robot it usually stops working altogether.
In a step towards making the machines of the movies a reality, French and US researchers have developed a learning algorithm that enables robots to adapt very quickly when they are damaged.
Factory and laboratory robots have a strictly pre-defined way of operating. So if a component breaks, it normally has to be replaced for the robot to continue with its task.
Most self-learning systems that seek alternative ways of continuing with the task are too slow, because they try out billions of possibilities. Using software that filters out the ineffective strategies, the new system vastly speeds up the process.
The team demonstrated the principles with a six-legged, spider-like robot that found a new way of crawling across the floor after one of its legs was broken. They also unveiled a robotic arm that could adapt to a broken joint and learn a new way to drop a ball in a bin.
In both instances, the robots were able to learn a new strategy to complete their task in less than a minute. Traditional self-learning systems would have taken days.
According to Dr Jeff Clune of the University of Wyoming, the development represents an important first step toward robots that are able to operate independently, outside of the carefully controlled confines of a laboratory or factory floor.
"Having the kind of intelligent robots you see in the movies is much closer than people realise. Our algorithm should in principle work on any kind of robot no matter how complex it is," he told BBC News.
"If anyone can get a working C-3PO, our algorithm could help it to deal with unforeseen situations and damage."
The new system uses a computer simulation to filter out all the possible solutions that will not work well. It then collects the ones that are both effective and different from each other, so that the robot does not waste time testing out similar strategies.
Next, the robot tries out what the simulation predicts will be the best solution. If that fails, it tries out something entirely different. It carries on doing this until it finds a strategy that works.
The research points the way to robots that are more robust, adaptable and cheaper to maintain than today's machines, according to senior author Jean-Baptiste Mouret, from Pierre and Marie Curie University in Paris.
"If you have robots in your home they would probably be expensive and you would not want them to stop working if a small part breaks," he told BBC News.
"Robots are used in factories because they are a controlled environment and nothing unexpected can happen to them. We would like to put these robots outside of factories to help in the outside world, where anything can happen."
Alongside recent advances in artificial intelligence, such as the self-learning system developed by Google's DeepMind Technologies, this development could see the emergence of new uses for robots.
"The things (DeepMind) is working on are amazing," says Dr Clune. "(Together) we will bring closer a future where robots are helping humans.
"We should be sending robots into Fukushima instead of asking human volunteers to take lethal doses of radiation. Robots should be putting out forest fires so we don't have to risk human lives and they should be used to help us in our homes," he said.
Among the ideas for household robots are machines for cleaning, cooking, or loading and unloading dishwashers.
Most of the development of the system was done by Antoine Cully, a PhD student working with Dr Mouret. He says one of his principal motivations was to help those who are infirm.
"I hope we can have robots that are assistants for the elderly," he said.
Dr Clune, though, believes this technology could have applications at the other end of the age spectrum.
He has very recently become a father, whose newborn child has been keeping him awake into the early hours of the night. He confesses that he has spent the extra sleepless hours pondering "long and hard" whether he could use the new system to create a robot that can soothe a crying baby.
"Necessity is the mother of invention, so maybe that will be my next invention," he joked.
But I was left with the impression that his comments were not entirely in jest.
Follow Pallab on Twitter