When killer robots menace all the fleshy ones, your options are few: You can mount a feverish, last-ditch resistance, with everyone wearing camo pants. You can travel back in time naked. Or you could just get them to plug Marvin The Paranoid Android into their main computer.
The absolute best sequence of killer robots being confounded must come from Douglas Adams' Life, The Universe And Everything. It's not quite as great as Adams' first two books in the Hitchhiker's Guide To The Galaxy series, but it's still better than almost anything else. The warlike robots of Krikkit have discovered Marvin the Paranoid Android, whose brain (he's fond of reminding us) is the size of a planet. So it seems like a fantastic idea to plug him into their computer system. Unfortunately:
Its brain had been harnessed to the central intelligence core of the Krikkit War Computer. It wasn't enjoying the experience, and neither was the central intelligence core of the Krikkit War Computer.
The Krikkit robots who had salvaged this pathetic metal creature from the swamps of Sqornshellous Zeta had done so because they recognized almost immediately its gigantic intelligence, and the use this could be to them.
They hadn't reckoned with the attendant personality disorders, which the coldness, the darkness, the dampness, the crampedness and the loneliness were doing nothing to decrease.
It was not happy with its task.
Apart from anything else, the mere coordination of an entire planet's military strategy was only taking up a tiny part of its formidable mind, and the rest of it had become extremely bored.
Luckily for Zaphod Beeblebrox, Marvin is paying attention when a killer robot tries to off him shortly afterwards:
Zaphod's head snapped round (the other one was looking hawkishly in entirely the wrong direction) just in time to see the lethal killer robot directly behind him seize up and start to smoke. It staggered backwards and slumped against a wall. It slid down it. It slipped sideways, threw its head back and started to sob inconsolably.
Zaphod looked back at Marvin.
"You must have a terrific outlook on life," he said.
"Just don't even ask," said Marvin.
And that, kids, is how you mess up an army of killer robots.