The New Film “Codebreaker” Explores the Life and Legacy of Mathematician Alan Turing

The father of the computer age was persecuted in his own time for being gay.

By: Shane Harris

Alan Turing, the British mathematician, is one of the most influential and least appreciated figures of the 20th century. Turing is credited with the original insight that helped create the computer age, the realization that any mathematical calculation can be done by a single device moving ones and zeros back and forth. Later, as a government codebreaker in World War II, Turing used his genius for numbers and design to help break a powerful German military code, which helped turn the tide of the war.

Patrick Sammon.

But although Turing was a national hero, he was treated like a pariah by the very government he helped to save. In 1952, he was prosecuted for having a sexual relationship with another man. He was forced to undergo a grueling, experimental hormone therapy. Shortly thereafter, he took his own life. He was 41.

The new drama-documentary Codebreaker explores Turing’s legacy and how he helped to create the modern world. The movie has its US premiere on Wednesday, October 17, at the Georgetown AMC theatre, before moving on to New York, San Francisco, and other cities. We sat down with Patrick Sammon, the film’s Washington-based creator and executive producer, to discuss Turing’s contributions and how the world might be different had he lived.

When did you first find out who Alan Turing was?

In January 2004, at the American History Museum, I came across a little display about Turing, and right away I thought, “This could be a great film.” So I wrote it down on a scrap of paper and put it in a file folder. I’d not heard of him before that moment. I’m not really a math and science guy, so he was new to me.

It wasn’t until five years later, when I was opening my own production company, that I opened the folder. There were probably 100 ideas in there, and Turing quickly came to the top of the pile.


Three things. First, it was a story I thought everyone should know. He’s one of the most important people of the last century. He has an amazing and tragic life story. He lays the foundation for the computer age, and if that wasn’t enough, he was instrumental in helping the Allies win World War II. Then you have this Shakespearean tragedy. His life unravels because of society’s intolerance toward him. Second, most people have never heard of him. Then the third piece was that I saw a market opportunity. There really hasn’t been a film about him.

How did he end up at Bletchley Park, which is where the British put all their codebreakers during WWII?

After Turing published his paper in 1936, in which he laid out the fundamental idea underpinning all computers, his mentor at Cambridge arranged for him to study at Princeton. At that time, Princeton was a remarkable place, because you had a lot of German Jewish scientists who’d fled the Nazis. Einstein is there. Turing is in this environment and becomes interested in codes, in cryptography. We’re not quite sure how he comes to the attention of the British, but they are interested at the time in codebreaking.

Turing comes home, and soon after, he’s recruited to become part of a codebreaking effort. He reports to Bletchley Park after the war breaks out. It’s a converted country estate halfway between Oxford and Cambridge, not far from London. War is declared in September 1939, after Germany attacks Poland, and the next day Turing reports for duty.

So did the British know that there was a German military code they needed to break?

Yes. The German military used the Enigma code, and each branch of the service had something called an Enigma machine. It was designed as a commercial machine after World War I and converted for military use. It allowed you to type in a letter, and the machine, using a rotor system, would convert it into a different letter that you’d use Morse code to translate. The receiver of the code would have the machine set to the exact same setting, so they could unscramble the text. And it was so complicated that the Germans thought the code was unbreakable.

How many settings were there?

Fifteen million-million different settings.

So if you’re sending me a message, we each know what setting we’re on out of all those possible settings, and then we can decipher the coded message?


The Poles had done really pivotal work on decoding Enigma in the mid-1930s. They’d had a spy give them some information, and they were the first to use mathematics to attack the coding system. But at some point the Germans made it more complicated, and the Poles were unable to break it. In the months leading up to the invasion, they turned over their information about their efforts to the French and the British. So the British had that critical foundation to get started.

So Turing and his colleagues knew how hard the Poles had worked, and they knew their work was really cut out for them.

Right. The key thing to remember with the Enigma code is that you have Germany trying to isolate England, which, of course, is an island. The supplies were coming from North America. And the German Navy was directing its U-boats, using the code, to attack shipping and goods needed for the war.

If you know where the U-boats are you can position around that. Churchill was most concerned about the war in the Atlantic. The US didn’t want to get involved. It was two years before Pearl Harbor. England was, in many ways, alone and isolated. They had won the Battle of Britain, so the invasion was put on hold, but there was the potential for Hitler to starve England. And Turing and his colleagues knew that if they weren’t breaking the code, people were dying and ships were being destroyed.

Turing had a number of insights to break Enigma. Early on, he came up with the idea that if the Nazis were using a machine to code information, a machine could be used to break it. With a colleague he designs a machine called the Bombe. It basically uses brute force to try to break the code.

Were they using something else up to that point to try to break the codes?

Yes. It was more primitive—basically a number of sheets and hole punches set up to try to solve the code. But the machine was able to test different settings to hopefully line up what the exact setting was.

And it can do it very quickly, and try lots of settings in a way it would take humans years to do.

Exactly. It was completely impractical for humans to do what these machines were doing.

The design flaw that let the Enigma get broken was that if you typed in a letter, it never came out the same letter. So if you typed E on a keyboard, you could cross E off the list of possible corresponding letters. And that mathematical and statistical door into codebreaking was something that was really instrumental in allowing Turing and the team to break the code.

How did Turing fit in at Bletchley Park? Was he openly gay there?

Some people would have known he was gay, but it wouldn’t have been known by everyone.

It was in many ways a utopia for the geeks of the 1940s. They were outsiders, but at Bletchley Park they could be themselves. They could be eccentric. Turing rode his bike to Bletchley Park wearing a gas mask because he had allergies. He wore pajamas under his jacket so he didn’t have to bother getting changed. He was an odd duck, but there were a lot of odd ducks at Bletchley Park, and that uniqueness was embraced in a way that it wasn’t before or after the war. People just didn’t care. They didn’t have time for rules. The stakes couldn’t be higher, and they all knew the stakes.

So what does Turing do after the war?

The development and technological breakthroughs during the war, and the huge resources applied to the war effort, lead to important breakthroughs that let his theoretical idea be turned into an actual computer. And he understands this. Working at Bletchley Park he understands that things have progressed enough that these computers will get built.

So right after the war, he designs one of the first computers, and he wants to build it, but that isn’t the way things were done. Engineers built things, and they didn’t want interference from the genius mathematician. So he runs into that bureaucracy, and he doesn’t realize that sometimes you have to use your elbows and work within the system.

It seems like today he’d be working for Apple, or someplace that has figured out how to synthesise the design and the engineering.

I think today’s world has more tolerance for outsiders. And the environment is much more favorable for people like Turing. My friends at Google say he’d have been the kind of guy who would have started a company like Google.

Later, in the late 1940s and early 1950s, he started thinking about artificial intelligence, and did visionary writing, which is why he’s known as the father of artificial intelligence. He came up with something called the Turing Test, to judge whether a machine is actually intelligent. Whenever you’re on a computer, buying something online, and you have to type in a scramble of letters, that’s a Turing Test. It’s testing to see if you’re a person and not some automated attack on the system.

So he was doing this visionary work, and then in the middle of all of it, his world came crashing down. He had had periodic relationships with men. He’d moved to Manchester in 1948 to work in a computer lab. In late 1951, he met a young man on the street named Arnold Murray. They became friends. They had a relationship over a few weeks. At some point, Turing became concerned that the young man had stolen from him. Murray denied it. And the relationship ended.

Not long after, Turing went home one night and found his home had been burglarized. He confronted Murray, who said he had nothing to do with it. But he said a friend of his had heard him talking about Turing, and saw his address on a letter he’d written to Turing. This friend concocted a plan to break into Turing’s home.

The question we’ll never know is whether Turing understood the risk of reporting this to the police. Homosexual acts were illegal, in public or in private. But he went to the police and said, “I think this person broke into my house.” The police started asking questions. He mentioned his friendship with Murray. The police wanted to know why he’s friends with a 19-year-old when he’s nearly 40. And Turing admitted to the relationship and was arrested.

He was convicted of gross indecency, an 1885 statute, sadly the same used to prosecute Oscar Wilde. He also violated class lines. He was an upper-class academic dealing with rough trade from the other side of the tracks.

He was given a choice: go to prison for a year, or go on probation and go through hormone therapy, basically chemical castration. He chose the latter, and was given estrogen, which stops the production of the male hormone testosterone and replaces it with the female hormone. The scientists we talked to said he would have lost his libido, his testicles would have shrunk, he would have stopped growing hair on his body, he would have grown breasts, and his mind would be affected.

Turing was an accomplished marathon runner. He was in excellent shape. So his body was being destroyed. The mind of this genius was being affected. He started treatment in April 1952, and it lasted a year. He was a guinea pig. They didn’t know what the long-term effects of this treatment would be and whether he’d go back to normal.

Did the doctors think they were somehow curing him of homosexuality?

It’s quack science, basically. There was this theory that this would take away the “evil desire,” and that was the thought behind giving people this treatment. There were probably 1,000 other men, maybe fewer, who were treated with this in the UK.

Why did they give him the choice between jail and treatment, and why did he choose it? A year in jail sounds like the better option.

They were trying to be nice. They were trying to be helpful in giving him an option other than prison. He would have been dealing with people from a different class, and he was an outsider, so it would have been a pretty awful experience. But we believe Turing was interested in continuing his work, and the idea of being kept away from his work for a year would have been impossible to contemplate.

Turing finished the treatment in 1953, and he took his own life a year later.

It seems like this chemical castration put him into a profound depression.

He started seeing a therapist beginning in the fall of 1952 and saw him until the end of his life. He talked with friends about the effect of the therapy on his mind and body. It’s not surprising that suicide would be the result when you’re trying to deal with a situation like this.

If you had to point to two or three technologies that are ubiquitous today whose pedigree goes back to Turing, or is his legacy, what would they be?

Turing’s legacy is on a macro level everywhere. The ones and zeros control our lives. His work on artificial intelligence and machine intelligence is relevant today. But he leaves us fundamentally the sadness of his death. He was 41 when he took his own life. You’re left with this question of what if? If he’d lived until he was 80 he’d have lived well into the modern computer age. You wonder what contribution he could have made. And then you wonder what other fields he could have contributed to.

And then you’re just left with outrage. You have one of the smartest scientists and most important people of the century, and he’s dead in his early 40s because of the persecution he faced because he was gay. He was afraid of the effect his homosexuality would have on how his ideas were perceived. It was bad luck, the timing of his life. He had a vision of where the computer would go, but not how society would change. Maybe if it had been a few years later, he’d see society was changing, and he could see a future that would be hopeful for him. And he just couldn’t see out of the darkness that he faced at the end of his life.

The story is sad, but people should also be inspired by Turing’s life and ideas and his genius. I respect his willingness to go against the grain. His ideas were unique. His personality was unique. And the way he lived his life was unique. People should respect and admire him for that.