It starts with asking the right questions. Patrick Lin, Keith Abney, and George Bekey’s new book Robot Ethics: The Ethical and Social Implications of Robotics is packed with them:

If a robot malfunctions and harms someone, who is responsible — the robot’s owner, its manufacturer, or the robot itself? Under what circumstances can robots be put in positions of authority, with human beings required to obey them? Is it ethically wrong for robots to prey upon our emotional sensitivities — should they be required to remind us, explicitly or implicitly, that they are only machines? How safe do robots need to be before they’re deployed in society at large? Should cyborgs — human beings with robot parts — have a special legal status if their parts malfunction and hurt someone? If a police robot uses its sensors to perform a surveillance operation, does that constitute a search? (And can the robot decide if there is probable cause?)