Asimov's 30 laws of robotics

# A robot must tip its hat in the presence of a lady human being, except where such a display would be construed as a come-on by a jealous male human being, who then might pose a difficulty to the Third Law.

# A robot may not act in such a fashion as would make dogs obsolete, because dogs are less expensive than robots, and robots should be reserved for science things.

# A robot, when given contradictory orders by two human beings, and assuming those orders do not violate the First Law, must decide which order to follow based on which human being has a deeper voice.

Link