A biographer for Alan Turing has criticised an upcoming film about the gay codebreaker for exaggerating his love affair with a woman.

‘The Imitation Game’ is the upcoming US film based on the biography of the wartime codebreaker and father of modern computing Alan Turing, which was written by Andrew Hodges.

Benedict Cumberbatch, who is set to portray Turing, will be joined by Keira Knightley as Turing’s fellow Bletchley codebreaker and “complicated love interest”, Joan Clarke.

But The Sunday Times has reported that Mr Hodges, who was sent a script of the film, is now “alarmed by the inaccuracies it”.

He said: “They have built up the relationship with Joan much more than it actually was.”

While the couple had been “briefly engaged”, Mr Hodges said, it was said that he liked her “because he could talk to her as if she were really another man” and there had never been much physical contact.

He added that the casting of Keira Knightley in the role did not “strike him as right.”

“I’m not being rude about her, but Joan Clarke was no glamourpuss.”

The film follows the break-up of their relationship, which happened because Turing was unable to live a lie by marrying her.

Hodges is said to have concerns with the main storyline as well, which involves a relationship between Turing and John Cairncross, who was later identified as the fifth man in the British spy ring that included Kim Philby and Guy Burgess.

“Their relationship is invented,” Hodges said, adding that it was “ludicrous” that two people working on separate projects at Bletchley would have ever met.

The Sunday Times reports that a line in the script, which sees Turing confronted by a colleague who tells him “No wonder they think you are a spy”, has now been removed.

Hodges is said to have written to the film’s writer Graham Moore about his concerns about the script, including criticisms that it showed nothing of Turing’s “extraordinary skills as a scientist and computer designer”.

He said he was told they were going to make more of his marathon running and see him having more interaction with colleagues to make him look less wimpish.

The producer, Teddy Schwarzman said the film was a drama, not a piece of entertainment and added while they do not want to fabricate events, there are some “creative liberties”.

He added: “When we come over, we are also going to get in touch with some other experts on that period. We know how very important Turing is to you over there.”

Earlier in May, a private member’s bill was introduced in the House of Lords, seeking to pardon Turing, who was prosecuted for “gross indecency” in 1952 after having a relationship with another man.

A New Alan Turing sculpture was also unveiled in London last month to commemorate the computer genius’s legacy.

“The Imitation Game” will be directed by Morten Tyldum and produced in association with Nora Grossman and Ido Ostrowsky of Amersand Pictures.