If you knew nothing at all about Alan Turing, the place to start gaining a favorable impression of the man would not be in the opening scene of Hugh Whitmore’s 1986 play “Breaking the Code,” currently revived in a production by Amanda Chang ’13, as her senior project. Watching the stammering, fidgety Turing (Iason Togias ’16) unconvincingly report the details of a burglary to a skeptical detective, you might question the playwright’s choice of a protagonist seemingly unqualified to do anything except bite his nails.

The brilliant Turing, a mathematician, computer scientist and cryptographer largely credited for breaking the Germans’ Enigma code during World War II, is conspicuously absent in this introduction. In his stead is someone imperfect, at times embarrassingly so — in other words, someone just like the rest of us.

“Breaking the Code” elaborates at length on Turing’s formidable genius, but ultimately cedes the spotlight to his homosexuality,  “gross indecency” under British law, for which he is arrested and forced to undergo hormonal treatment. In oscillations between Turing’s boyhood, tenure at code-breaking headquarters Bletchley Park and current-day affair with the teenaged Ron Miller (Derek Braverman ’15), we discover a man struggling with emotions that run counter to the rationality of his intellect.

“It’s the logical part of the brain that counts,” Turing says, speaking at his high school alma mater about the future of artificial intelligence. To him, his homosexuality is anything but logical, a flaw in the system he cannot address with a calculation. Here he has broken another code, a social code, the repercussions of which will drive him to suicide.

Turing is played with relentless didacticism, his every line tinged with an air of self-evidence. He is deliberately and uncomfortably awkward, an anxious, teetering fellow who walks as stiffly as the machines he dreams up.

The expressive Togias conveyed a consistent air of exasperation that was understandable, if not tolerable, from a character cursed to always be the smartest in the room. But the invariance of his tone was occasionally at odds with the tenderness of the scene. Speaking to his childhood friend, Christopher Morcom (Isaac Hudis ’16), whom he idolized, or even to Miller, the object of his affections, his forceful delivery seemed misplaced. And his rendition of Turing’s stammer is more an affectation than a believable, natural slump of the tongue.

Turing’s social ineptitudes are sometimes at odds with the assertiveness of his actions. Though anxious and possessed of self-confidence bordering on arrogance, he initiates a relationship with Miller. In a moment of intimacy, Turing puts his hand on Miller’s thigh with a tenderness and sensitivity unexpected from one whose heart seems to pound for mathematical logic alone. When they later fight, and when Turing reveals under investigation that he has withheld information about their relationship to protect his lover, we realize that Turing is an emotional creature burdened like any other by the confusing weight of his feelings.

Occasionally the script tends more towards biography than conversation, as when Turing explains the details of his residency at Princeton to Dillwyn Knox, a fellow codebreaker who is played with charisma and wit by David McPeek ’16. It feels dense in places, like a historical footnote. “Breaking the Code” is punctuated by moments of emotional fervor, but explanations of Turing’s background and development cause the play, which runs for nearly three hours, to drag.

Still, Chang’s production, sparsely staged and framed in the background by sensual flowers and human bodies suggesting Turing’s sexuality, brings the audience’s full attention to what is overall a compelling dialogue for Turing’s tragic demise. With his character about to commit suicide, and illuminated by a stark beam, Togias dispensed with his assertive delivery and finally permitted his voice to waver as Turing contemplates the future of machinery during his final moments.

“Can the mind exist without the body?” he croaked. In the machinated idyll of his imagination, can his pure and brilliant thinking escape from the imperfections of his damning desires? For once, he seemed like he did not know the answer.

“Breaking the Code” runs Jan. 31 to Feb. 2 at the Whitney Humanities Center Theater, 8 p.m. on Friday and 2 p.m. and 8 p.m. on Saturday.