As for the precise nature of those interactions, Buck and Axel could only theorize. They posited a sort of lock-and-key relationship between the olfactory receptors in our noses and the molecules in the air. But the number of receptors they discovered instantly posed a mathematical problem. Humans have about 400 kinds of olfactory receptors (far fewer than mice), but we can smell about 10,000 distinct odors. So Buck and Axel theorized that smell was combinatorial. Each receptor, their research showed, is uniquely primed to react to a few different molecules, and our noses sense distinct odors when many receptors fire at the same time. John Kauer, then a researcher at Tufts University, relates the idea to playing chords on a piano. “The piano only has 88 notes,” he says. “If you were only able to use one note per odor, you could only detect 88 different odors.” If odors are more like chords, then the math suddenly works out.

SIGN UP TODAY Get the Backchannel newsletter for the best features and investigations on WIRED.

Inspired by Buck and Axel, who won the Nobel Prize in 2004 for their work, Mershin and other scientists conceived of odors as simply lists of molecules. If you want to understand the smell of a clove of garlic, the thinking went, the answer lies in its chemical components. “Somewhere in these mol­ecules,” Mershin believed through the mid-2000s, “the smell of garlic is written.”

After Buck and Axel released their major findings, it didn’t take long before the first major efforts to build an artificial nose got underway. Darpa wanted to replace dogs as a tool for finding land mines, so beginning in 1997, it poured $25 million into a program called Dog’s Nose. The agency funded scientists across the country to build a bunch of would-be sniffing machines and then brought them to a field in Missouri for testing. The ground was sown with every manner of land mine, from small antipersonnel devices the size of tuna fish tins to hefty antitank munitions. Although stepping on the mines could no longer set them off—the fuses had been removed—the buried explosive ordnance could still be set off by, say, a lightning strike. “As soon as there was any hint of a thunderstorm,” says Kauer, who participated in the program, “we evacuated.”

Kauer had built a gray, shoebox-sized device that he eventually christened the ScenTrak. His gadget wasn’t equipped with actual olfactory receptors. Instead, it was packed with long strands of molecules called polymers that Kauer knew would react to DNT, a molecule common in most land mines. When the ScenTrak came across an explosive, the DNT bound to the polymers, causing the ScenTrak to set off an alert. “Land mine!” the box cried.

At least, that’s how it worked in ideal conditions. ScenTrak was able to pick out nearby traces of DNT in the air of an otherwise odorless lab. Out in the field, though, when Kauer scanned the ScenTrak back and forth over a patch of ground, it became confused. The polymers would react to DNT, but also to the weather, to plants, or to certain kinds of soil.

Other devices in the competition, including one called Fido and another called Cyranose, were based on roughly the same theory. They all used polymers sensitive to specific compounds. And they all proved somewhat narrowly functional. (Fido is now used at military checkpoints to scan for explosives at close range.) But these devices don’t really smell, any more than, say, a carbon monoxide sensor can smell. They often misfire in scent-rich environments where odors—apparently made of some of the same compounds—may waft in from various nonexplosive sources.

In part, that’s because the theory these devices were built on was too reductive. Today, most scientists believe that the lock-and-key theory of olfactory bonding is far too simple. In some cases, it turns out, molecules with very similar shapes have completely different odors; in others, very differently shaped compounds smell alike. A molecule’s shape, in other words, is not synonymous with its smell. Instead, many receptors bind to many different molecules and vice versa. But each receptor has what some scientists call a distinct “affinity” for each molecule. It’s that special affinity, the theory now goes, along with the combinatorial nature of olfactory reactions, that accounts for unique scents. The piano doesn’t just have 88 keys that can form chords; it also has pedals and dynamics. “You hit piano keys at different strengths, heavy and light and so on,” Zhang says. “Heavy, you get one sound; light, you get another sound.” Or to put it another way: The theory of smell just gets more complicated.