The Imitation Game, like all historical movies, has little relation to actual history and is primarily a fictional interpretation of the brilliant British mathematician Alan Turing who helped break the German military code during World War II.
Accepting that the film does not convey reality in specifics, and that it somewhat extols Turing as a gay martyr in sync with Hollywood p.c., it still entertainingly captures some larger realities about the ethics of global statecraft.
British code breakers at the now legendary Bletchley Park at the war's start struggled mightily to surmount Germany's encoding Enigma machine, a version of which had been smuggled to the British by Polish intelligence. Although unreferenced in the film, the heroic Polish agents were captured and tortured by the Germans but reportedly never surrendered their secret.
In the film, the British code breaking team flails about until Turing's genius constructs a computer to decode Enigma, creating the Ultra project that became one of the war's best kept and most powerful subterfuges. By most accounts, Ultra saved countless Allied lives and possibly shortened the war by many months if not years.
The challenge is for the Allies to exploit Ultra's code breaking without betraying their triumph to the Germans and prompting them to resort to a different code. In the film's fictional account, Turing's little team must themselves decide which Allied lives must be sacrificed to known incoming German attacks to protect the secret. In reality, higher ups decided how to disguise Ultra's discoveries by contriving other plausible intelligence sources believable to the Germans.
There's also the problem of sharing Ultra discoveries with Soviet allies. The film's fictional account has a Soviet mole within the code breaking team, with the full knowledge of a senior British intelligence official, who uses the mole to stealthily transmit select German messages to the Soviets, without even Prime Minister Churchill's approval. In reality, the British regularly shared Ultra secrets with the Soviets but disguised the source as covert human agents.
The film briefly alludes to actual Soviet moles in British intelligence, but not on the Ultra team, who infamously defected to the Soviets during the Cold War. Turing in the film is eyed suspiciously after the war but is not guilty of Soviet espionage. Instead he's arrested for a male sexual encounter and later commits suicide, which is true. Not portrayed in the film is that Turing evidently became an atheist as a boy after a young friend died.
Turing seems to have been a tragic, tormented figure that helped to save his nation, along with many others at Bletchley Park, whose accomplishments were, unlike in the film, fully known to and a source of tremendous satisfaction to Churchill, if not to the public for several decades.
The film is inspirational and broadly accurate in capturing the urgency of the war effort against the Germans, with every minute lost costing Allied lives, whether seamen in convoys, pilots in the air, soldiers on distant fields, or civilians in targeted cities. Here government is fulfilling its primary duty to protect and defend, by stealth and force, killing the attacking enemy before the enemy kills his targets. The stakes in the British war effort were enormous, affecting all humanity then present and many generations hence. And the Ultra project, however successful, was often inexact. Not all German attacks could be carefully discovered and rebutted. And while not as directly craven as the film portrays, with an entire Allied convoy sacrificed to protect Ultra, the British did have to prioritize some lives over others, a terrible calculation that ultimately falls on all governments.
In the film, at war's end, the Ultra machine is dismantled, and the Ultra team dispersed and pledged to permanent secrecy. In real life, the Ultra secret was released in the 1970s. Conspiracy theories then claimed that Churchill had coldly sacrificed the city of Coventry to brutal German bombing to protect Ultra. The movie mercifully avoids this allegation, which responsible historians have discredited.
The Imitation Game, like all such films, should be ignored as reliable history and instead appreciated as a poetic dramatization of the responsibilities of lawful rulers to safeguard their people. Ultra enabled Britain not only to defend itself but also to preserve decent governments everywhere from barbarism and darkness. The spiritual implications are not directly acknowledged in this film but should be obvious to all who have discernment. Often the instruments of national defense are deeply flawed, but the purposes are often sacred.