All too often, public Q&A sessions after movie premieres are exercises in self-congratulation and randomness: People ask about camera lenses and “where you got your inspiration” and how it felt to kiss that guy in that one scene. I’m glad I did not skip the discussion after the New York premiere of Kyle Patrick Alvarez’s claustrophobic and provocative film “The Stanford Prison Experiment,” because it was not like that at all. People argued about the movie and about its dramatized retelling of history and, most of all, about the meaning of the underlying event, a notorious 1971 experiment overseen by Stanford psychologist Philip Zimbardo (played by Billy Crudup in the film) that was almost the social-science cognate of building the atom bomb.

If you’ve ever taken an introductory course in psychology, you’ve heard about this one, which remains a hot topic four decades later and profoundly affected the nature of intellectual discourse about prisons and other coercive institutions. (It’s coincidence that philosopher Michel Foucault’s landmark study “Discipline and Punish” was published just four years later, but it’s the kind of coincidence that isn’t quite an accident.) Zimbardo divided a group of 22 college students – all of them male, nearly all white and generally middle-class – into random groups of “guards” and “prisoners,” and installed them in an improvised prison along the basement corridor of a campus building. (It was late summer, and the bucolic Stanford campus was nearly deserted.) The “cells” were empty offices; the “hole,” or solitary confinement unit, was a storage closet.

To say that this little exercise in role-playing went off the rails is like saying the Hindenburg encountered a technical glitch. Zimbardo has said he had no idea whether these young men would take their assigned roles seriously, or whether any actual conflict or drama would emerge. After the first day, he was worried that his two-week prison simulation might be a tedious bust. After six days, he finally realized that the entire scenario had spun out of control into a nightmarish spectacle of brutality and abasement, and shut the whole thing down. The “guards” had increasingly become petty and sadistic tyrants, seeking to crush all signs of individuality and resistance. Some prisoners had become so demoralized and isolated they had lost touch with external reality, and began to believe they were actual convicts serving hard time.

And it wasn’t just the college kids who got sucked too deeply into this invented narrative. Zimbardo has repeatedly acknowledged, and told the New York audience again on Wednesday night, that he should have pulled the plug several days earlier than he did. It’s like a theological parable about a man who plays God and then cannot escape his created universe. Rather than standing outside as an observer, Zimbardo played the role of the “prison warden,” who could grant paroles and hand out privileges or punishments. Even that imaginary power distorted his perspective, and made him part of the experiment.

Alvarez and screenwriter Tim Talbott stick scrupulously to documented fact in “The Stanford Prison Experiment,” taking much of their dialogue directly from audio and video recordings Zimbardo’s team made at the time. Their film makes no direct effort to explore what went wrong in Zimbardo’s invented universe, or how we should understand its significance today. But by throwing us into the middle of a terrific ensemble of young actors – headed by Ezra Miller as a rebellious and possibly unstable prisoner and Michael Angarano as a guard who immediately adopts a sadistic persona – Alvarez captures an emotional immediacy and risk that is deliberately excluded from academic debate. For the New York premiere audience, many of whom were professionals in psychology and related fields, the effect was palpable, and reopened old and unsettled questions about Zimbardo and his research.

Zimbardo did not make this movie and does not appear in it – but “The Stanford Prison Experiment” unmistakably bears his fingerprints, and contains elements of both mea culpa and self-justification. Alvarez and Talbott relied heavily on Zimbardo’s account of the experiment in his 2007 book “The Lucifer Effect,” and consulted with him repeatedly. Anyway, there he was onstage during the panel discussion, wearing an expensive suit that looked more Vegas than Stanford and still recognizable, at age 82, as the suave and swaggering rebel played by Crudup in the film. It’s a terrific performance from an undervalued actor, by the way, whose shadings and nuances partly solves a central dilemma of this film: It must tell the story largely from Zimbardo’s point of view, while also finding enough distance to depict him as a flawed and arrogant man who from the beginning is seduced by the power of his own ideas.

I’m not qualified to issue an opinion on the academic debate about whether the value of Zimbardo’s research outweighs his ethical lapses, or whether he has atoned sufficiently for his sins. (Nor do those strike me as especially interesting questions.) But I can tell you this: The dude’s semiotics are deeply bizarre. He has written a book called “The Lucifer Effect,” and he looks, both in the movie and in real life, exactly like a Romantic 19th-century representation of the devil, a mustachioed rake offering mankind knowledge we don’t want but can’t refuse. His name is better suited to a stage magician or a character in a later Nabokov novel – The Great Zimbardo! – and like any competent conjurer he appeared to have a confederate in the audience. A striking young woman in a red dress, who was actually in the seat marked “Dr. Philip Zimbardo,” repeatedly tried to shout down his critics. When the panel moderator wondered whether the Stanford experiment could be considered “science,” Devil Woman burst out: “That’s insane! How could you ask that?”