And with the advent of what artificial-intelligence expert Professor Hugo de Garis calls artilects - massively intelligent artificial intellects - there is the risk that not only will we have created our successors but also that such machines may wipe humans out by accident or design. De Garis thinks "species dominance" will be one - if not the - main political issue this century.

"If these artilects come into being, they may become so superior to us they might, to use an analogy, treat us like ants," he says. "They may do something and, as a side effect, we get wiped out. Or they may choose to wipe us out. "They would think a trillion times faster, they would have unlimited memory, they could change their shape, they would be immortal. They would be godlike. Imagine what they could be thinking." De Garis is the director of the China Brain Project, trying to build China's - and possibly the world's - first artificial brain. As with Bill Gates, he can foresee a time when robotics will be a huge industry. (So can the US military, which is already talking about phasing out human soldiers by the 2030s and putting robot troops on the front line.)

"If we can build an artificial brain, that would hopefully be the beginnings of increasingly intelligent robots and that could become a huge industry," de Garis says. "They could babysit the kids, take your dog for a walk. A robot is just a piece of steel but it's the control that makes it useful. That's where the artificial brain comes in." Yet in his book, The Artilect War, he imagines a scenario where there will be a terrible battle between the forces who want to build these massively intelligent machines (the Cosmists) and those who don't (the Terrans). The Terrans would either fear the potential for catastrophe - what if a robot soldier accidentally nukes a city? - or be nervous about the idea of humans being surpassed by machines.

De Garis says the growth of nanotechnology will give engineers and scientists powerful new tools. There will be an explosion of knowledge of how the brain works - companies involved in artificial brain research "will be the Googles and Microsofts of the future". This technology can be used to create artificial brains that replicate many of our brain's pathways and features for use in the robotics industry. "Year by year, billions of people will notice that last year's robot is quite a bit dumber than this year's," de Garis says.

"They upgrade. As the IQ gap between humans and machines starts decreasing, you can imagine millions of people starting to worry a little. People start to ask questions such as, 'Are machines going to get as smart as us? Is that a good thing? Should we legislate an upper limit of artificial intelligence so it's not threatening to humans?"' The Terrans might be tempted to launch a pre-emptive strike on the Cosmist force to remove any possible danger from such superhumanly smart machines. And the Cosmist forces, who see such technology as the destiny of humanity, may respond in kind.

"And since we're talking about the late 21st century, we're talking about gigadeaths," he says. "Frankly, I'm glad to be alive now. I do not want to be alive to see this." Hans Moravec, research professor at the Robotics Institute of Carnegie Mellon University, predicts in his book, Robot: Mere Machine To Transcendent Mind, that robots will evolve into a new intelligent species and take over the running of a more automated economy. People will have a lot more leisure time, with the drawback being we'll have to accept our own obsolescence. Others are more optimistic. In his book, The Singularity Is Near: When Humans Transcend Biology, writer and technological visionary Ray Kurzweil says that "within several decades information-based technologies will encompass all human knowledge and proficiency, ultimately including the pattern-recognition powers, problem-solving skills, and emotional and moral intelligence of the human brain itself".

Yet he rejects de Garis's idea of an almighty war between robot-loving Cosmists and tech-fearing Terrans. "It is like a war today between the Amish, an American religious sect that largely rejects technology, and the rest of society," he says.

Instead Kurzweil imagines a more benign role for robots, who will work hand in hand with humans - and may regard their human creators with something approaching reverence. Kevin Warwick, professor of cybernetics at the University of Reading in Britain, has been researching ways to link artificial and human intelligence to upgrade the latter. He can see the appeal of a third option: to technologically augment oneself to become an artilect-like superior being.

"In terms of moving from being human - I see humans as being very limited," Warwick says. "And why should we be so limited? I can see the advantages from a mental point of view particularly [of merging with technology]. Once you merge with the machine, you can plug yourself into the network." Some people may want to remain totally human.

"They'll be part of some subspecies," Warwick says. "It'll be up to them if they want to be bossed around and be second-rate." He thinks it is mildly ridiculous that some people consider humans will always be smarter than machines because machines can't write poetry or make a cup of coffee. "I think some of the time people like to write books with Hollywood endings and the Hollywood ending is that humans will be all right because robots can't make a cup of coffee," Warwick says. "If you say in the book that humans will all die off, no one wants to read that. Even Terminator gets crushed in the end. In reality it's not the Terminator that gets crushed - it's the humans that get crushed."