The ethical rule should be to not allow robots ethical logic. If the piece of code considers ethics, and not functional logic, that is wrong... I.e, "kill 1 or 2 people" should not be considered in the logic. Stop as soon and safely as possible, should.