Tonight’s Thinking Machine story involved Leo and Ada (and The Thinking Machine, of course) in a mystery that required figuring out a secret code. Dr. Evil had deployed thousands of robot sharks across the seven seas that were doing evil of various kinds; sinking ships and the like, and Dr. Evil was controlling them using messages coded by the Enigma machine. (Leo knows about the Enigma machine. In fact, when I said that Dr. Evil was using an Enigma machine, Leo said that he got it from the Nazis — I don’t think that he actually knows who the Nazis are, though.) Anyway, so the police called in Leo and Ada to help them decode the messages that Dr. Evil was sending to the robot sharks.
Leo and Ada built a room full of electrically cranked Thinking Machines that worked in parallel around the clock trying to decode Dr. Evil’s code, but they were having no luck. They knew that they needed a pad –a common correlated behavior that Leo and Ada could use to correlate with the messages.  But the behavior of the robot sharks was too complex to track, so they were having trouble figuring this out.
At first they tried simply repeating some of the message to the sharks to see what they would do. The hypothesis being that the shark would do the same thing with the same message, but this did not work; the sharks didn’t react at all to a repeated message, suggesting that there was a one-time key involved.
Then they noticed something interesting about the robots. The way that they worked was that they would run on batteries underwater for about 10 days, and then surface for one day to recharge their batteries using solar cells, and then dive again. Leo and Ada noticed that before each robot would surface, it would send a message to Dr. Evil’s lair, and all these message were the same length. They hypothesized that these messages were telling Dr. Evil that the particular robot shark was going offline to recharge. This hypothesis gave them their pad, so they collected thousands of occurrences of these messages, and fed them to the bank of Thinking Machines, programmed to simulated an Enigma, under the assumption that they were all, at least in part, saying the same thing.
It wasn’t easy; even a room full of electrically-cranked Thinking Machines working full time too hundreds of hours to crack the code, but they finally succeeded in proving the hypothesis correct. Each such message was a random number, which they assumed was a robot’s ID because it was the same for a given robot each time it surfaced, then a location in GPS coordinates, and finally just the message “Offline”. (Leo asked whether they also sent an “online” message when they had re-charged, and I said that they did, although I hadn’t thought this far ahead.)
Once they had cracked Dr. Evil’s code for these “offline” messages, it was a simply matter to crack all the rest, and Leo and Ada gave the police a Thinking Machine specially-programmed to decrypt Dr. Evil’s robot shark messages. And the police simply went around collecting robot sharks caught in the act of attack at that point.
 I used “pad” to mean a common behavior that the cryptanalyst could use to correlate with the messages. A friend of mine who is a cryptography expert reminded me that this is actually called a “crib”, not a “pad”.