Isaac Asimov, history's most prolifi writer and Mensa's honorary president, attempted to formulate a more modest set of ethical precepts for robots and instead produced the blatantly suicidal three laws
The three laws were not intended to be bulletproof, just a starting point. And Asimov knew very well that they had holes in them; most of his robot stories were about holes in the three laws.
The Three Laws of Robotics are normally rendered as regular English words, but in-universe they are defined not by words but by mathematics. Asimov's robots don't have "thou shalt not hurt a human" chiseled into their positronic brain, but instead are built from the ground up to have certain moral precepts, summarized for laypeople as the three laws, so built into their cognition that robots with the three laws taken out or modified don't work right, or at all.
Asimov actually gets the whole idea of making AI ethics being hard more than any other...
In 2004, Michael Vassar gave the following talk about how humans can reduce existential risk, titled Memes and Rational Decisions, to some transhumanists. It is well-written and gives actionable advice, much of which is unfamiliar to the contemporary Less Wrong zeitgeist.