Aaron Sorkin on the set of MOLLY'S GAME (Michael Gibson/STXfilms)

“Molly’s Game” opens — and closes — with the image of a tiny, frozen twig.

It’s a pine branch, one of several typically scattered on snow-covered slopes to help with depth perception as skiers navigate the expanses of blinding white. In the case of the new film — based on the 2014 memoir by Molly Bloom, a former world-class skier whose athletic career ended after she wiped out when her boot clasp snagged on just such a branch — it’s also a big, fat metaphor. For screenwriter Aaron Sorkin, who makes his directorial debut with “Game,” that branch represents the vicissitudes of fortune, those small, random life events that suddenly redirect our paths and which can only be seen in retrospect (or in movies of someone’s life story).

For Bloom, played by Jessica Chastain, abandoning skiing led her to move from Colorado to Los Angeles, where, through a series of twists and turns, she ended up organizing and running a regular high-stakes poker game patronized by such boldfaced Hollywood names as Ben Affleck, Leonardo DiCaprio and Tobey Maguire. The game, which she ultimately relocated to New York and a clientele of Wall Street financiers, was eventually raking in upward of $50,000 a night for Bloom, until it was shut down by the Feds, and Bloom was sentenced to probation for running an illegal gambling ring.

Everyone has such “frozen stick” moments, Sorkin said during an interview in Washington last month. “There’s usually more than one — and oftentimes several sticks — that they trip over, and that send them on a trajectory,” he says. “That’s why I like the metaphor so much.”

So what was Sorkin’s frozen stick moment?

Behind the scenes with Jessica Chastain, Director Aaron Sorkin, and Chris O'Dowd on the set of MOLLY'S GAME . (Michael Gibson/ STXfilms)

When asked that question directly, the 56-year-old actor turned playwright turned screenwriter turned filmmaker — whose early, post-college career once included such odd jobs as delivering singing telegrams — demurs. “I hope that when people go to see ‘Molly’s Game,’ they’re not thinking about me and the stick that I tripped over,” he says modestly. “When they’re watching the movie, I hope they’re just watching the movie.”

Getting him to open up about himself is going to take some doing.

It’s no great secret that Sorkin has an abiding fondness for legal matters and for brainy, rat-a-tat dialogue. His breakout 1989 play, “A Few Good Men,” is, like the subsequent Oscar-nominated film version starring Tom Cruise, a courtroom drama. So is his 1993 film “Malice.” And “Molly’s Game,” like “The Social Network” before it, involves legal challenges. (Idris Elba plays Bloom’s fictionalized, talky lawyer, defending her against what Sorkin calls the “railroading” of the Justice Department.) In December 2018, Sorkin’s new stage adaptation of “To Kill a Mockingbird” — Harper Lee’s Pulitzer Prize-winning novel about a black man unjustly accused of rape — will debut on Broadway.

According to Sorkin, growing up as the son of a lawyer is what reinforced a lifelong love of lively debate that can be seen in his best-known work, which includes such smarty-pants TV shows as the Emmy-winning series “The West Wing” — known for its infamous “walk-and-talk” scenes of traveling chatter by bustling White house staffers — and “The Newsroom,” set in the milieu of a progressive TV news operation.

“At the family dinner table, I loved the sound of smart people arguing,” says Sorkin, whose two sibling are attorneys. “Not like, ‘Who left the light on?’ But my father would come home with an issue, and we’d discuss.” Sorkin’s father, Bernard, a former intellectual property attorney for Time Warner, partly inspired Sorkin’s 2007 play “The Farnsworth Invention,” about the battle to determine who owned the intellectual property rights to the television. (Not everything Sorkin touches turns to gold. The New York Times review of “Farnsworth” described the talky production as like watching “an animated Wikipedia entry.”)

For Sorkin, who can sound like a frustrated lawyer at times, law is the purest form of storytelling: As a dramatist, he explains, it doesn’t get more ideal. “The battlefield is perfectly delineated. The stakes are perfectly delineated, as are the intentions and the obstacle. The jury is a stand-in for the audience, and they need to be convinced of something. The side that tells the better story is going to be the side that wins.”

But the legal system is more than just a convenient framework to hang a narrative on, he says. The single aspect of the law that fascinates him most is its pursuit of an intangible ideal. “I’ve always felt that the courtroom — that trial procedure — was very good at getting at the truth,” he says, adding, with a straight face, that he would love it if presidential debates were conducted more like trials and less like “joint press conferences.”

“I’ve always had this fantasy of what would happen if, instead of a debate, a candidate would take the witness stand, would have to be under oath, would be subject to direct cross examination and would be compelled by a judge to answer certain questions.”

Dream on, he is told.

That fascination with perfection, or at least with the drive to achieve the never-before-done — whether by “The West Wing’s” President Josiah Bartlett, “The Social Network’s” Mark Zuckerberg, Michael Fassbender’s perfectionist Apple chief executive in “Steve Jobs” or Jonah Hill’s fictional “sabermetrics”-wielding sports manager in “Moneyball” — has led Sorkin down a particular path. It happens to be one that has left him easily parody-able. Comedy skits on “Late Night With Seth Meyers,” “Mad TV” and “Saturday Night Live” (since deleted from the Web) have all tweaked Sorkin’s verbal mannerisms and propensity for stuffing facts and figures into sometimes pompous dialogue. A YouTuber has compiled several anthologies of “Sorkinisms.” Meyers’s sketch, for example, refers to the ubiquitous “impassioned speech by a low-level staffer that gradually softens the stance of the stern, yet warmhearted boss.”

“I’m aware that I have a distinguishable style,” says Sorkin, sounding less defensive than weary. “It’s not something that I set out to do, but this is how I write. I or anyone else would be foolish to try hard to not write like themselves. I’m not trying to write the way people talk,” he adds, “I’m trying to write in a more entertaining manner than the way people talk.”

This has led some to accuse Sorkin of self-righteousness, and for one writer to proclaim him “the reigning king of competence porn,” obsessed with supermen (and wonder women) who don’t exist in the wild. As for his own self-image, Sorkin insists that he’s far from perfect, calling everyone — Molly Bloom, his family, his friends — “all way smarter than me.”

That hasn’t stopped him from voicing his opinions, as he did in the form of a letter to his teenage daughter and ex-wife that was published by Vanity Fair the day after Donald Trump was elected. “Sorkin Girls,” it began gently, before getting right to the point: “It’s hardly the first time my candidate didn’t win (in fact it’s the sixth time) but it is the first time that a thoroughly incompetent pig with dangerous ideas, a serious psychiatric disorder, no knowledge of the world and no curiosity to learn has.”

That screed was originally intended, he says, as a private communication. “But my daughter’s mother said, ‘Can I send this to a friend?’ I said sure. And it turned out the friend was the editor of Vanityfair.com.”

Sorkin doesn’t regret the exposure. Far from it. He kind of loves seemingly lost causes, he says, and the heroes who champion them. Bloom, he argues, is one of them, not merely because she excelled in a field in which she had no previous expertise, but because she refused to give up some of her clients’ names to prosecutors, or to “dish about” the famous clients in her book. (This is only partly true. Bloom is only too happy to talk trash about Maguire in the book, who she writes once asked her to “bark like a seal who wants a fish” for a $1,000 gratuity. In Sorkin’s film, Michael Cera, as an unnamed “Player X,” is a stand-in for all loutish celebrities.)

The heroes who most appeal to Sorkin all have one thing in common: a kind of old-world “integrity” that his late father possessed. “He always lived his life with one foot in another century, and the other foot in a century that perhaps never existed,” Sorkin says. “Character, and the difference between right and wrong, were always very important to him.”

As he reminisces about his father, who died last Christmas, Sorkin finally decides to revisit that unanswered question. “You asked about my ‘frozen stick moment.’ ” he says. “I suppose it would have to be my first Broadway show being ‘Man of la Mancha,’ which I saw at 5 years old. I remember falling in love with Don Quixote — with all things quixotic, really. You know, when I mentioned my dream about presidential debates, you said, ‘Dream on’? Well, I do.”

Molly’s Game (R, 140 minutes). Opens Christmas Day at area theaters.