Isaac Asimov’s Three Laws of Robotics (1940)
First Law: A robot may not injure a human or through inaction, allow a human to come to harm.
Second Law: A robot must obey the orders given it by human beings, unless such orders would conflict with the first law.
Third Law: A robot must protect its own existence, as long as such protection does not conflict with the first or second law.