Eu acredito que este é o romance Os Homens de Lata ( 1965), de Michael Frayn. Da sinopse:
The William Morris Institute of Automation Research is working hard to simplify our lives by programming computers to carry out life’s routine tasks. Whether it’s resolving ethical dilemmas, writing pornographic novels, saying prayers, or watching sports, these automation experts are developing machines to handle it all, enabling us to enjoy more free time. And when it’s announced that the Queen will be paying a royal visit and the Institute’s madcap bunch of researchers decide to program the computers to receive her, what could possibly go wrong?
E do livro: (Os robôs foram nomeados "samaritanos".)
His first attempt, Samaritan I, had pushed itself overboard with great alacrity, but it had gone overboard to save anything which happened to be next to it on the raft, from seven stone of lima beans to twelve stone of wet seaweed. After many weeks of stubborn argument Macintosh had conceded that the lack of discrimination was unsatisfactory, and he had abandoned Samaritan I and developed Samaritan II, which would sacrifice itself only for an organism at least as complicated as itself.
...
... Gradually the raft settled in the water, until a thin tide began to wash over the top of it. At once Samaritan leaned forward and seized Sinson's head. In four neat movements it measured the size of his skull, then paused, computing. Then, with a decisive click, it rolled sideways off the raft and sank without hesitation to the bottom of the tank.
He developed Samaritan III, which not only refused to sacrifice itself for an organism simpler than itself, but kept the raft afloat by pushing the simpler organism overboard. "Look at it, man," he cried to Goldwasser, awed by his own handiwork, as they watched Samaritan III ruthlessly toss first a sandbag and then a sheep over the side.
Macintosh put two Samaritan IIIs on the raft together, and the result drove him back on to the defensive. At first he tried to claim that it was entirely in accordance with good sense and natural justice that both Samaritan IIIs should throw themselves overboard.