It can be hard to predict which films will triumph at the box office and which will completely bomb. Just ask the people who made the recently released sci-fi thriller Valerian, which cost a shade under $200 million to make--and after one weekend, has made back just $23.5 million in total ticket sales.

Perhaps in the future, forecasting audience enjoyment won't be such an inexact science. Disney and the California Institute of Technology have teamed up to build an artificial intelligence system that they say can measure moviegoers' facial reactions to determine just how much they're really liking a film.

According to a paper published collaboratively by the two institutions last week and first spotted by Digital Trends, the team of researchers had test audiences watch Disney movies and used an infrared high-definition camera to capture their reactions. The camera recorded various reactions, like smiles, laughs, and widened eyes. The team then fed that information--approximately 16 million data points in total--into the A.I. system.

Once the system was trained to process the reactions, new audiences watched the same films, which included Star Wars: The Force Awakens and the live-action version of The Jungle Book. The infrared camera recorded their responses, and the network measured how much they were enjoying a film in a given moment. To test its accuracy, the researchers had the system then predict how individual audience members would react at certain points in the movie. After just a few minutes of observation, it was able to accurately predict which audience members would react in specific ways.

In a release, Caltech professor Yisong Yue, who worked on the project, pointed out that the system could be useful in other scenarios, like caring for the sick or elderly. "After all," she said, "people don't always explicitly say that they are unhappy or have some problem."

Artificial intelligence is more widely being used to pick up on social cues, under the belief that it can do so more effectively than humans. Cogito, an A.I. company profiled by Inc. earlier this month, monitors conversations at call centers and provides prompts to warn a representative when the person on the other line is becoming angry or annoyed--or when the rep is talking too quickly or interrupting too much. The company already has clients in some of the country's largest insurance providers and credit card companies.

The $12 billion U.S. film industry could stand to benefit too. It's possible that a more data-driven, A.I.-based examination of audience reactions could have alerted EuropaCorp and STX Entertainment--Valerian's production company and American producer, respectively--to the fact that audiences weren't responding like they'd hoped. Barring a miraculous late surge, the film is likely to finish more than $100 million in the red, which would be one of the biggest box-office losses ever.

The bigger question, at least for film aficionados, is what this technology ultimately means for the future of the art form. Will it shift filmmaking out of the realm of human creativity and into that of engineering products to manipulate people into liking them? Perhaps the more noble use case is the one described by Professor Yue, in which doctors, nurses, orderlies, or social workers can use the technology to provide the best care for those who are unable or unwilling to communicate their feelings.

At least humans are still making movies at all. Last year, A.I. co-wrote a horror movie script that a Canadian production company is hoping to turn into feature-length film. And experts recently predicted that computers will be capable of performing all tasks, from driving to accounting to art, better than humans by 2060.