Making movies is always a gamble, and film studios are constantly searching for ways to minimize their risk. Now they’re turning to artificial intelligence in an effort to predict audience behavior.

A new study says that 20th Century Fox is using A.I. to analyze movie trailers in the hopes of finding things that audiences respond to, so the studio can then recreate those elements in trailers for other movies. Read more from the study below, including a breakdown of how they applied this technique to last year’s superhero film Logan.

The Verge points us to this study that was published last month, in which it’s revealed that Fox created something called Merlin, “an experimental movie attendance prediction and recommendation system.” The study is full of complex language and technical jargon, but here’s the gist: researchers extracted individual frames from movie trailers; used machine learning to label items on the screen like trees, faces, and cars; then compared that data with similar data from other trailers and movie attendance numbers to see if the information can help predict audience viewing patterns.

The studio is looking for data-driven connections here: if audiences have previously seen action films with male leads, are they more likely to see another action film with a male lead? Using the trailer for Logan, Merlin discovered that these were the most common labels:

But they’re not just concerned with what appears in the trailers – they’re also looking at when it appears, and for how long:

Temporal sequencing (for example, a long shot of an object versus intermittent short shots) can convey information about the movie type, the movie plot, the roles of the main characters, and the filmmakers’ cinematographic choices. When combined with historical customer data, sequencing analysis can be used to create predictions of customer behavior.

After analyzing the data from the Logan trailer and after Logan was released in theaters, the study produced a table that showed the actual top 20 moviegoer audiences (on the left) next to Merlin’s predictions (on the right):

Translation: Merlin wasn’t exactly spot-on, but it was pretty close. It knew that Logan audiences would also be interested in those other films, but it just couldn’t correctly predict how interested they were in seeing them. Sounds like there’s still some more work to be done here, but having access to these very specific data points can point the studio in different directions when it comes to marketing and even green lighting certain projects:

The impact of these tools on 20th Century Fox’s marketing and data teams is significant. Instead of depending solely on high level audience survey results, the team can now deploy more precise instruments to determine customer intent. The insights are at least two orders of magnitude more detailed than the previous sets of analytics the studio had been relying on.

Will studios be able to rely on machine learning to predict audience behavior? Maybe one day, but it looks like we’re not there yet.