When Robert Shafran started community college in Upstate New York in 1980, he was puzzled that some of his fellow students seemed unusually friendly, acting as though they already knew him.

That mystery is retold in the opening moments of the new movie Three Identical Strangers, and it gets more bizarre from there.

Spoiler alert: Shafran learned he was one of a set of triplets who were separated soon after birth and placed with adoptive families — part of a study in which researchers explored the age-old question of how human beings are shaped by nature and nurture.

"I wouldn't believe the story if someone else were telling it," he says in the documentary, now playing at area theaters.

The three were near-identical in appearance and seemed, at a glance, to share a number of behavioral traits. They had the same genes, after all. Yet in certain respects, their personalities were noticeably different. Should that be chalked up to the families who raised them, the filmmakers ask?

The film suggests that question remains somewhat unresolved, at least for these triplets and other participants in the study (which drew fire from ethicists — more on that later). But on a population level, scientists know a great deal about the relative roles of genetics and the environment in shaping all sorts of characteristics — both physical traits such as height and weight, and behavioral attributes such as personality and mental health.

For starters: Identical twins (and triplets) are not 100 percent identical, even though they originate from the same egg and sperm. Each time our cells divide and the DNA is copied, there is a chance for small, usually inconsequential, mistakes.

"It's not a perfect copy machine," said Gene Fisch, a behavioral genetics researcher and adjunct professor of statistics at Baruch College in New York.

Second point: instead of saying nature vs. nurture, call it genetics and the environment — the sum total of a person's experiences and exposures. And forget the word versus, as the two life-shaping forces interact with each other. For example, the environment can affect how a person's genes are expressed —  a phenomenon known as epigenetics.

Imagine a person born with a combination of traits needed to be a good reader, said Rebecca Waller, an assistant professor in clinical psychology at the University of Pennsylvania. Those tendencies can be enhanced by environmental factors.

"You're going to read more, and that's going to make you even better," she said. "And maybe because your parents see that, they buy you more books. Or maybe they drop you at the library on a Saturday."

Likewise, researchers have identified numerous genes that increase a person's risk for depression, but the outcome is far from certain, said Patrick Sullivan, a professor of genetics and psychiatry at the University of North Carolina at Chapel Hill.

"It depends what happens to you, what you're taught, whether you learn skills about resilience, and the slings and arrows of outrageous fortune," Sullivan said.

For decades before the advent of modern gene-sequencing techniques, studying twins was a powerful tool for answering such questions. By comparing identical twins with fraternal twins — those who share just half of their DNA, on average — scientists could tease out how much of the variation in a given trait was due to genetics.

Sullivan was part of a team that analyzed the results from 50 years of such studies. Generally speaking, genetics have been found to play a strong role in shaping easy-to-measure physical characteristics such as height, but they have less influence on behavioral attributes.

No surprise there, said Baruch College's Fisch.

"The brain is orders of magnitude more complicated than, pick an organ, whether it's bladder or heart or kidney," he said.

In most of these twin studies, adoptive and birth parents were told the goal of the research and agreed to take part. Not so for the children in the movie who were placed for adoption.

Renewed spoiler alert: Not only were the adoptive parents and children unaware of the study's aims, but the researchers had a hand in deciding where they were placed. In the case of the triplets, one was placed with a blue-collar family, another with a middle-class household, and the third in a wealthy home.

Other researchers have blasted this arrangement as a grotesque breach of ethics. It was all the more surprising because one of the study leaders, Peter Neubauer, was Jewish and had left his native Austria in the late 1930s under the growing shadow of Nazi Germany — a regime notorious for its experiments on concentration camp prisoners.

It remains unclear what he learned from the study, as the results were never published and Neubauer died in 2008. But when Shafran and his newfound brothers became celebrities in the 1980s, family, friends, and even talk-show hosts rushed to draw their own conclusions. As the film relates, much was made of superficial similarities such as the fact that all three liked Marlboro cigarettes, older women, and wrestling.

Likely a coincidence, said James Tabery, a University of Utah associate professor of philosophy and the author of Beyond Versus: The Struggle to Understand the Interaction of Nature and Nurture.

"People look for similarities because it sort of feeds this narrative of,  'Oh, look, isn't that amazing? It's your genes that are driving this," Tabery said. "They don't focus on the fact that one drinks Pepsi, or another drinks Sprite, and maybe another does not drink soda at all."

On a tragic note, one of the triplets, Eddy Galland, killed himself in 1995, and the filmmakers imply that his adoptive father's strict, unyielding demeanor played a role.

Fisch is skeptical.

"If that were the case, there would be a whole lot more suicides," the researcher said.

Shafran and the other surviving triplet, David Kellman, have been granted access to some of the findings in the study in which they unwittingly took part. But the public will have to wait. At Neubauer's direction, they were sealed in an archive at Yale University until 2066.

David Kellman (left) and Robert Shafran are two of the triplets described in the title of the movie “Three Identical Strangers.”
Taylor Jewell / Invision / AP
David Kellman (left) and Robert Shafran are two of the triplets described in the title of the movie “Three Identical Strangers.”