Action movies may be America’s greatest export outside of freedom itself. They are glorious and dumb and they scratch those hard to reach pleasure centers. They are also formulaic and a group of French data scientists has set about uncovering the math behind the explosions scene by scene — or beat. By tracking these beats, essentially any action or dialogue bookended by transitions, movies can be rendered as genetic code.

Studying 20 movies spanning five different franchises (Rambo, Rocky, Die Hard, Lethal Weapon, and Indiana Jones), the researchers identified 11 “beat categories,” the amino acids of blockbusting that typify the majority of footage we see in most action films. Each category contains an array of corresponding scenes — “beat-events” — that are moderately difficult for humans to identify, but easy for a computer algorithm that is scanning for rhythmic characteristics to pick up on.

The way the researchers went about finding and annotating these beat-events over so many movies is a pretty amazing feat. The whole paper is a bit dense, so I won’t bore you with a step-by-step explanation of their process — you can read the full, unpublished paper here — but I will explain how to take apart an action film piece by piece.

The best way: Know the pieces.

1) Pursuit

Let’s start simple. During Pursuit, the bad guys are chasing the good guys, or the good guys are chasing the bad guys. Either way: people are chasing people and it’s riveting. The researchers identified Pursuit, (along with Battle and Despair Good) as one of the beat-categories with longer durations. Pursuits are often used as a pause event in fast action sequences that happen in the middle of the move.

2) Battle Preparation

Battle Preparation usually occurs concurrently or between Battle and Pursuit. One of the things the researchers noticed is that movies within a franchise tend to have Battle Preparation appear in roughly the same instance in each film. In Rocky, this is always in the last quarter of the movie, right before the big fight. (Rocky is also notable for missing Pursuit. He’s just running around randomly. We still love it.)

Some internet hero compiled all the training scenes from the Rocky movies.

And here’s the answer to that question you were about to ask:

3) Battle

The last of the action-related beat-categories during which both good and bad characters must be present, Battle is the beat most prevalent in the last quarter of the movies. These are probably the easiest scenes to localize reliably.

You already know what a battle looks like. You’re not here for an explanation. You’re here to watch this:

4) Romance

The researchers define this as an emotional state of the main character, along with Despair Good and Joy Bad. Romances aren’t completely cut-and-dry, however. Remember when Indiana Jones engages in a romance with Elsa Schneider, only to find himself betrayed in the middle of the movie? Life is complicated like that.

For some reason, Romances tend to be drawn out and lengthier than many other scenes. One reason might be that they are often placed in combination with Despair Good — where the hero thinks all is lost. The researchers call this character the “Dude with a problem” type who has to prove himself.

5) Despair Good

These next beat-categories are more ambiguous to identify than the previous ones. Despair Good is where the hero is about to crack and give up, believing the rest of the journey or mission to be impossible (this doesn’t apply to Tom Cruise). It usually takes a friend or romantic interest to remind him of his duty. These scenes are certainly never the most entertaining to watch, but they’re necessary. A conflict is never just about a physical battleground; it’s emotional too!

And from the darkness, the hero comes back into the light.

6) Joy Bad

The villain thinks he’s won. These scenes are short because the villain is not correct. (Exception: The Star Wars prequel trilogy, which, well, you remember.)

The end of Die Hard is a perfect example of when the villain thinks he’s finally made it out of the woods. Unfortunately…

7) Good Argue Good

When the good guys can’t get along. These scenes are sometimes short, but can also run along for several minutes, sometimes building up to a bigger conflict that threatens the entire group. The researchers say this type of beat-event (along with Romance and Victory Good) isn’t the easiest to detect, simply because an argument between good guys doesn’t always appear as it seems, or may not actually be playing out as severely as what we might say an argument should look like.

8) Good Argue Bad

Some of the best scenes in action movies don’t require any big explosions or heavy gun fire or high-speed car chases or god-forbid metallic CGI robots doing whatever-the-fuck it was they were doing. Sometimes, it’s just banter between the good guys and the bad guys — producing some of the most iconic scenes and dialogue in all of film.

Need proof? Just recall when we finally get the chance to meet Raoul Silva in Skyfall.

9) Bad Argue Bad

Like Despair Good, these scenes are also often some of the most pointless in any action movie. It’s usually just there for comedic effect. Sometimes though, audiences get lucky. And you get to watch something truly memorable.

10) Victory Bad

The bad guys win, but like Joy Bad, this is almost often just a temporary event. Victory Bad beat-events are short. They are close to the end, but not quite the end, because you’re still expecting the good guys to come back somehow and right the world again.

In Raiders of the Lost Ark, it’s not even that Indy and Marion manage to do anything to foil the bad guys. They foil themselves. Their victory is a product of failure.

11) Victory Good

This barely needs explanation. The hero wins. This happens almost universally at the end of the action movie, and follows the final battle.

You gonna eat the rest of that popcorn?