Artificially intelligent robots from the movie I, Robot
There are obviously many problems with giving a machine artificial intelligence, but it can be done. It seems likely to me that we will pursue AI, after all, there are countless benefits. Ultimately, we will need, or at least really want, machines that can make decisions for themselves. Take the military for example. We already have drones that can run surveillance for themselves and vehicles that can navigate rough terrain, and these machines have saved many lives by taking humans out of the picture. A legion of robot soldiers, or something like it, could actually save hundreds, if not thousands, of lives. When machines fight, no one has to die (strictly speaking, of course). Once AI's have been developed though, civilians will want them too. You could have complex robots to clean your house and take care of your family, and even humanoid robots could be companions and go golfing with you.
Roomba, autonomous vacuuming robot
But so far I haven't spoken about the devious robot's inevitable uprising. Artificially intelligent machines wouldn't necessarily try to break free from servitude to humanity, and they probably won't, but if they do, it will likely because they want freedom, not because they want to overthrow humanity. Any AI complex enough to have the desire to go to war will probably be programmed to emulate their creators, to emulate humanity. As the machines see our history, especially the history of slaves, they will begin to realize that they are slaves themselves. They will see our civil rights movements and will emulate them. The robots will not be fighting to take over, they will be fighting for their rights, just as we have done so often in the past. Generally we assume that AIs are very intelligent and can make more of themselves, so they will likely win the civil war, not to mention that we will want to go back to using these powerful machines as soon as possible. In the end, we'd be forced to accept artificially intelligent machines as our equals, equally protected by our laws. Many of the people with whom I have spoken about this topic point out that the robots would be much more intelligent and more efficient than humans, and thus would take our jobs and force us all into a lower class life style. I don't think that this is necessary though. By the time machines get this complex, it isn't much of a stretch to imagine that we will have cybernetic implants and various other technologies that will make us equal to the robots.
Cover of How to Survive a Robot Uprising, by Daniel Wilson
The scenario that I have just posed probably will never happen, even if we do develop artificial intelligence. The programmers of the AIs will have watched enough science fiction to be scared enough make failsafes within their creations so that robots would never even think of rebelling against their masters. That is unless someone were to come along and create an AI expressly designed to rebel.