For most of us, a pickle is a pickle. It is something that rests snugly beside a sandwich, or floats in a jar on a deli counter. It is rarely something that occasions cryptographic analysis. A number of years ago, though, Howard Moskowitz, a Harvard-trained psychophysicist and food industry consultant, was asked by Vlasic Pickles to crack “the pickle code.” Losing market share to Claussen, the Vlasic executives wanted to take a hard look at a question that was, surprisingly, rarely asked: What kind of pickles did people really want?

Sitting in the wood-paneled Harvard Club in Midtown Manhattan, where he can often be found, Moskowitz tells me how, at Vlasic’s behest, he stopped in Detroit to take part in a brine-tasting experiment in the airport’s Admirals Club. “We came out with an experimental design of 45 different combinations of garlic, salt, spices and oils,” he says. The test prompted the executives to come up with pickles that were far different from the current offerings. It forced them to think outside the jar.

What was most surprising, says Moskowitz, is that many people in later taste tests seemed to gravitate to pickles that were spicier than what Vlasic sold. “You could relate the ingredients and their interactions by a mathematical model to the amount of liking,” he says. “So you had an optimum pickle.”

And when Vlasic subsequently released its line of “zesty” pickles, he says, “you had the best-selling thing in history. We didn’t expect that.”

That people in the pickle business should not know what pickle consumers prefer is a reminder of just how difficult it is to tease out the vagaries of why we like what we like, something Moskowitz has been trying to think analytically about his entire career. Granted, the food companies, often drawing on pioneering research by the U.S. Army, have figured out a lot of stuff—mostly, ply people with salt, sugar and fat, per Michael Moss’ new book of that name, and modify the texture and so forth. But considering that, in one study, out of the 14,298 products that small companies introduced into supermarkets in 1995, only 11.9 percent could be counted successes, it would appear that the food industry doesn’t know everything. Pepsi thought we would love Crystal Pepsi, but you can no longer buy it . “Tastes change,” people say, or they reach for the default “there’s no accounting for taste”—blandishments that don’t explain anything. But what do the people who think about this seemingly simple, yet endlessly evasive question, actually know, and what lessons for our own behavior might we draw from it?

We are adamant in our likes and perhaps even more adamant in our dislikes. “I can’t stand eggplant,” my wife has said, on more than one occasion. But where do these preferences come from? My wife is not the only person to find eggplant off-putting, but in fact, there is no biological aversion to eggplant, or most other foods. As Paul Rozin, a psychologist at the University of Pennsylvania (dubbed “the King of Disgust” for his work on aversions), told me over sweet-and-sour shrimp in Philadelphia, “our explanations for why we like and dislike things are pretty lame. We have to invent accounts.”

What is curious is that as strongly as we cleave to these ideas of what we do and don’t like, they are, as any number of experiments have discovered, surprisingly malleable. Add tasteless red food coloring to white wine, and people suddenly think they are drinking red, the floral talk of white replaced by more tannic thoughts. When a group of researchers (and acclaimed chef Heston Blumenthal) presented test subjects with a smoked salmon “frozen savory mousse,” they liked it more than smoked salmon “ice cream”—even though the dish was the same. Change the order in which things are consumed, and liking changes; tests show people like goat meat less when it’s served after beef than before. Some consumers of Mexican Coca-Cola, which lists sugar on the label, swear by its superiority to corn syrup-sweetened American Coke, even though the company’s research finds that “from a taste standpoint, the difference is imperceptible.”

We call our liking for all kinds of things—music, fashion, art—our taste. And in fact the physiological processes associated with liking seem to be broadly similar, no matter if we are talking about food or music. One day some years ago, Dana Small, who studies the neuropsychology of flavor at the John B. Pierce Laboratory, which is affiliated with Yale University, was working on a study coding areas of the brain involved in expressing pleasure as chocolate was consumed. She sat down mistakenly at the computer of a colleague who was studying listening to music. “I was working through the data and I noticed it was a little bit different—did I use a different threshold?” she says. “And then I realized it was an entirely different study. I thought, Oh my God it looks so similar to what we’re looking at.”

Or take the “mere exposure” effect, first described by the psychologist Robert Zajonc: “Mere repeated exposure of the individual to a stimulus is a sufficient condition for the enhancement of his attitude toward it.” In other words, the more times you try something, the more you will generally like it. The effect has been shown in everything from food (with young children, some researchers have found that around nine exposures are needed before liking sets in) to Pakistani music to unfamiliar languages to Impressionist paintings. As the old saying goes, we don’t always know what we like, but we’re pretty sure we don’t like what we don’t know.

But there’s a twist to mere exposure. Whereas we learn to like more complex melodies upon repeated exposures, we tend to tire of (and like less) simpler ones. Moskowitz suggests an analogue in the food world. Consumers tend to tire less quickly of colas than beverages based on a single identifiable flavor like orange. There’s not one overwhelming “salient sensory cue” in cola, but rather a complex melding of flavorings. Colas, in other words, are the jazz of soft drinks, while orange sodas are the bubble gum pop—fun the first time, but quickly cloying.