Over the past five years, at the Leeds School of Business at the University of Colorado, Boulder, researchers have been giving subjects some funny tasks. Rate the comedy of a joke about a kitten used as a sex toy. Appraise the humor of Hot Tub Time Machine clips while sitting at various distances from the screen. Watch, on repeat, a YouTube video of a guy driving a motorcycle into a fence and indicate when it stops being amusing. This is the work of the Humor Research Lab, also known as HuRL, founded by professor Peter McGraw to answer what is actually a very serious question: What, exactly, makes things funny?

The question is more complicated than it may seem at first blush. Why do we laugh and derive amusement from so many different things, from puns to pratfalls? Why are some things funny to some people and not to others? How is that while a successful joke can cause pleasure, a gag gone awry can cause serious harm? The underpinnings of humor have proven far more vexing than those of other emotional experiences. Most scholars, for example, agree that anger occurs when something bad happens to you and you blame someone else, and guilt occurs when something bad happens to someone else and you blame yourself.

But there is little agreement when it comes to humor. Take the International Society for Humor Studies. Launched in 1989, the ISHS includes academics from disciplines ranging from philosophy to medicine to linguistics. Together they’re a productive lot, organizing an annual conference covering topics like “Did Hitler Have a Sense of Humor?” and founding HUMOR: The International Journal of Humor Research, a quarterly publication featuring scholarly articles on subjects like “The Great American Lawyer Joke Explosion.” They have recently compiled a 1,000-page Encyclopedia of Humor Studies, covering the whole of humor research from “Absurdist humor” to “Xiehouyu” (a humorous Chinese figure of speech). But you won’t find in it a universally agreed-upon theory of humor.

Over the centuries, various scholars have attempted to posit such a theory. Plato and Aristotle introduced the superiority theory, the idea that people laugh at the misfortune of others. Their premise seems to explain teasing and slapstick, but it doesn’t work well for knock-knock jokes. Sigmund Freud argued for his relief theory, the concept that humor is a way for people to release psychological tension, overcome their inhibitions, and reveal their suppressed fears and desires. His theory works well for dirty jokes, less well for (most) puns.

The majority of humor experts today subscribe to some variation of the incongruity theory, the idea that humor arises when there’s an inconsistency between what people expect to happen and what actually happens. Incongruity has a lot going for it—jokes with punch lines, for example, fit well. But scientists have found that in comedy, unexpectedness is overrated. In 1974, two University of Tennessee professors had undergraduates listen to a variety of Bill Cosby and Phyllis Diller routines. Before each punch line, the researchers stopped the tape and asked the students to predict what was coming next, as a measure of the jokes’ predictability. Then another group of students was asked to rate the funniness of each of the comedians’ jokes. The predictable punch lines turned out to be rated considerably funnier than those that were unexpected—the opposite of what you’d expect to happen according to incongruity theory.

There’s another problem with these theories. While they all have their strengths, they share a major malfunction: They can’t explain why some things are not funny. Accidentally killing your mother-in-law would be incongruous, assert superiority, and release pent-up tensions, but it’s hardly a gut buster if you have to explain the catastrophe to your wife.

It was with the goal of developing a new, more satisfactory comedic axiom that McGraw launched HuRL. Working with his collaborator Caleb Warren and building from a 1998 HUMOR article published by a linguist named Thomas Veatch, he hit upon the benign violation theory, the idea that humor arises when something seems wrong or threatening, but is simultaneously OK or safe.

The way McGraw sees it, the benign violation theory does better than all the other humor theories in explaining the wide world of comedy. A dirty joke, for example, trades on moral or social violations, but it’s only going to get a laugh if the person listening is liberated enough to consider risqué subjects such as sex OK to talk about. Puns can be seen as linguistic violations that still make grammatical sense.

And while most humor theories have struggled to account for tickling, or just avoided the phenomenon altogether, the benign violation theory accounts for even this kind of laughter. As seen through McGraw’s theory, tickling involves violating someone’s physical space in a benign way. People can’t tickle themselves—a phenomenon that baffled Aristotle—because it isn’t a violation. Nor will people laugh if a stranger tries to tickle them, since nothing about that is benign.

McGraw’s theory has another benefit going for it. Unlike other major humor theories, it does a good job delineating why some things aren’t funny. A joke can fail in one of two ways: It can be too benign, and therefore boring, or it can be too much of a violation, and therefore offensive. To be funny, a joke has to land in that sweet spot between the two extremes.

Naturally, almost as soon as McGraw unveiled the benign violation theory, people began to challenge it, trying to come up with some zinger, gag, or “yo momma” joke that doesn’t fit the theory. But McGraw believes humor theorists have engaged in such thought experiments and rhetorical debates for too long. Instead, he’s turned to science, running his theory through the rigors of lab experimentation.

The results have been encouraging. In one HuRL experiment, a researcher approached subjects on campus and asked them to read a scenario based on a rumor about legendarily depraved Rolling Stones guitarist Keith Richards. In the story—which might or might not be true—Keith’s father tells his son to do whatever he wishes with his cremated remains—so when his father dies, Keith decides to snort them. Meanwhile the researcher (who didn’t know what the participants were reading) gauged their facial expressions as they perused the story. The subjects were then asked about their reactions to the stories. Did they find the story wrong, not wrong at all, a bit of both, or neither? As it turned out, those who found the tale simultaneously “wrong” (a violation) and “not wrong” (benign) were three times more likely to smile or laugh than either those who deemed the story either completely OK or utterly unacceptable.

In a related experiment, participants read a story about a church that was giving away a Hummer H2 to a lucky member of its congregation, and were then asked if they found it funny. Participants who were regular churchgoers found the idea of mixing the sanctity of Christianity with a four-wheeled symbol of secular excess significantly less humorous than people who rarely go to church. Those less committed to Christianity, in other words, were more likely to find a holy Hummer benign and therefore funnier.

McGraw became ever more confident in his theory. But he also knew that if he really wanted to figure out what makes things funny, he had to venture beyond the confines of HuRL. So three years ago, he set off on an international exploration of the wide world of humor—with me, a Denver-based journalist, along for the ride to chronicle exactly what transpired. Our journey took us from Japan to the West Bank to the heart of the Amazon, in search of various zingers, wisecracks and punch lines that would help explain humor once and for all.

The result is The Humor Code: A Global Search for What Makes Things Funny, to be published next week—on April Fool’s Day, naturally. As is often the case with good experiments—not to mention many of the funniest gags—not everything went exactly as planned, but we learned a lot about what makes the world laugh. In this Slate series, we’ll be recounting some of our adventures and attempts to answer the great mysteries of comedy, from Do animals have a sense of humor? to Why does every culture have a Polish joke? We’ll be here all week. (And next week, too!)

Next up: Is it possible to determine when, exactly a joke is too soon and when it’s too late? We used the tragedy of Hurricane Sandy to find out.

This series is adapted from The Humor Code: A Global Search for What Makes Things Funny.