system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do code breaking machines know when the code is broken?

How, for example, did the WWII code breaking machines at Bletchley Park know when a message was decrypted? Did they search for common german words?
gpt
For WWII, the machines used algorithms that followed precise instructions. The code has already been broken by humans (aided by computers), and they then worked out precise steps for a computer to follow.

The WWII code breaking machines knew when they were finished because the instructions given to the machines by the code breaking experts told them so. It's pretty much "do x, do y, do z, done".

The humans started by searching for repeating patterns, for indications that a ciphertext was made up of words of certain lengths, for indications that there were certain words, etc.

Since the germans rarely changed keys and since their messages often started the same way, it was relatively easy to find patterns that allowed them to figure out the algorithm.