Looking for a comic satirical robot-themed story from the 70s or earlier that took place at a British university. An ethics professor built a robot to solve the problem of ethical behavior when you were with another on a raft that would not hold two. One robot jumped overboard to save a sack of gravel. Another threw anyone overboard to save itself, even an innocent child. At climax, two robots were in a death struggle to throw each other off, while professors watched and placed bets.
I believe this is the novel The Tin Men (1965), by Michael Frayn. From the blurb:
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?
And from the book: (The robots were named "Samaritan".)
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.