There are two ways, I think, that one could go about making a story of Alan Turing and his key role in inventing the computer as a means of cracking a Nazi code during the Second World War. One way would be to go all-in on the psychological aspect, and take it for granted that Turing's closeted homosexuality was haunting him and driving him in his quest to uncover the secrets of his nation’s enemies, thus making his eventual punishment by the British government for his "gross indecency" even more ironically cruel. The other would be to discard personal matters altogether, and make a purely process-driven story, in which Turing and his colleagues are nothing but the human vessels for acts of research and insight, and the act of breaking the code is itself the protagonist, with all the people reduced to the status of window dressing.

The actual Turing biopic that exists in the world, The Imitation Game, tries to combine these methods in a hybrid that does not work much at all. It comes alive only when it most fully commits to being a war-era thriller about cryptography, dying another in a long line of tiny deaths when it alights on Turing's personality and especially his sexuality, which is handled in the most bone-headed, tasteless way. From the winking innuendos that keep elbowing those of us in the know (winking innuendos are a problem for the film: an even worse one is when Turing makes an offhand comment about the trickiness of using cyanide, and the part of me that knows how he died vomited a little bit in my mouth), to the outlandishly tin-eared way homosexuality finally pulled into the story proper, and finally to a cascade of "and then this happened" title cards near the end where, long after I assumed the movie couldn't do anything to make me more irritable, it commits its final act of trivialising the personal and political facts of its story that some registers as the worst moment of a film that only has two or three actively good ones.

So anyway, Alan Turing. Played here by Benedict Cumberbatch, straitjacketed into playing a much worse character than I think he should have been able to by a screenplay that pre-populates the character with a suffocating array of tics and ill-considered traits and bad focal choices - Graham Moore's script, adapted from Andrew Hodges's book Alan Turing: The Enimga, portrays him as possessed by a kind of sketch comedy reduction of Asperger syndrome down to the most barbaric "he's a dick! and he talks in clipped, dickish sentences about things nobody else cares about!" cluster of cheap clichés.The best thing I can say about the characterisation is that it neatly captures the peremptory, unlikable hardness of a brilliant mind more concerned with committing acts of genius than engaging with the world of humans. Which isn’t an uninteresting concept, though the film’s treatment of fumbles pretty badly.

Plainly, The Imitation Game fancies itself a descent into the closed-off interior world of a man who has gone to great lengths to disguise his actual personality. I expect it supposes that it has done a fine job of making Turing a sympathetic, tragic figure who just wanted to be known and understood. That’s certainly the implication of the demented line “Sometimes it’s the people no-one imagines anything of who do the things that no-one can imagine”, a tactical nuclear strike at the heart of English grammar that Moore loves so much, he includes it three motherfucking times. Well, sometimes it’s not that nobody imagines things of people, sometimes it’s just that people are tetchy and off-putting, and that’s far closer to the film’s depiction of Turing, with all his alienating tics that would feel better suited to a broad comedy than such a teary-eyed Serious Drama with all the hushed production design and costuming and stately lighting. Or the obnoxious way that Turing’s sexuality is pulled in as an “aha!” moment. I would like very much to be able to get over the film’s repellent use of Turing’s sexuality. But damn it, I guess I’m just not going to. Maybe it would be easier if the film’s very last beats didn’t leave such an ugly taste of “then he killed himself, but it’s okay, because the Queen pardoned him a half century later”.

So, while very little works in the film’s decision to make itself a biopic of Alan Turing rather than, say, a caper film about the team that broke the German Enigma machine, there are bits and pieces of The Imitation Game that are okay, or better. Alexandre Desplat has broken whatever curse he’s been laboring under, where for every good score he composes in a year, he has to pair it with a lousy one - this makes three times in 2014 (after The Grand Budapest Hotel and Godzilla) that Desplat’s music has augmented and deepened the film in crafty, enjoyable, even somewhat complex ways. It’s a mixture of mechanistic and romantic elements that do a much better job of exploring Turing’s headspace than the script or acting do.

In the face of a full roster of very talented people doing rather disposable things - Matthew Goode is all irritable reaction shots, Mark Strong is barely permitted more than a cameo (though it’s an amusing one), Charles Dance is stranded in a stock “priggish bureaucrat” role - Keira Knightley emerges as a deeply necessary and rewarding shot of human energy into the biopic-by-numbers feel of it all. Uniquely among the cast, she seems to have concluded that The Imitation Game would be better off as a comedy of manners than a bone-dry docudrama, and plays Joan Clarke, female genius in a world of condescending patriarchal men, with a distinctly spirited tang, almost more like an American’s parody of Brits and their stiff upper lips than an actual English actor playing an English character. There’s an ironic, play full twist to her line readings that gooses the film and makes it both meaningfully entertaining and aware of human emotions when she crops up onscreen.

And every so often, the techno-thriller this isn’t pokes its head up, and director Morten Tyldum suddenly shocks us by inserting a moment of well-paced, involving cinema into his creaky museum piece. The moment where Turing has an insight into the character string that will allow him to reliable break Enigma codes and rushes to implement it is absolutely tight and enthralling, not just an improvement over the dozing aesthetic of the rest of the film, but one of the best pieces of process-oriented filmmaking in 2014; it’s immediately followed by a discussion of war strategy and morality that’s equally strong and equally out-of-place in the film’s overall scheme.

Because, on the whole The Imitation Game isn’t just bland mediocrity, it’s actually lousy. Its agonisingly shallow, de-historical depiction of Turing as psychological agent never stops being annoying; its embalmed visuals make WWII England look like a diorama rather than a living place; its editing is actively shoddy, mashing frames together without caring in the slightest if they flow or if the performances within them feel continuous. It’s not just awards-bait filmmaking at its most trivially prestigious, but at its most stylistically flat as well. It’s not entirely without value, but not remotely enough to bother with it as a whole.