During World War II, for instance, the Nazi's were basically kicking some major British butt, until that is, Alan Turing decided to get involved and crack the code of the Nazi Enigma cipher machine and even the score. It wouldn't be long until the tide would turn and the krauts found themselves on the receiving end...
Turing's ability to crack the German code was related to his work on computational theory. Instead of creating a domain-specific computer to perform a very limited set of functions, part of Turing's genius consisted in realizing (and proving) that a universal machine (now known as a Turing machine) could compute any string of operations that could be expressed in symbolic form, no matter how complex. This eventually gave rise to the idea of artificial intelligence, whose daddy, as you might already be able to guess, is Alan Turing. Here is a very short introduction to this man's genius.
To learn about his incredibly interesting work on mathematical biology (specifically his ideas related to the chemistry basis of morphogenesis), check out Jim Al-Khalili's documentary The Secret Life of Chaos.