Brings to mind Isaac Asimov's book I Robot and the 3 Laws of Robotics.