With all due respect to my once-smoldering passion for Fox Mulder, following a Twin Peaks marathon a few years back, Dale Cooper shot to the top of my most-wanted list. Sure, both FBI investigators are earnest, intuitive, and wickedly handsome in a two-piece suit, but Agent Cooper is clearly a man after my own heart. The kind of guy to introduce himself at the local mom 'n pop and settle down for a thick slice of cherry pie.

Forget the Black Lodge; the real mystery of Twin Peaks was how the hell everyone made such consistently killer cherry pie. More often than not, fresh fruit pies in the real world are a soggy mess. Tasty, perhaps, but best served with a spoon. Happily, a picture-perfect slice of "damn good" cherry pie is more science than fiction. So, how do we make a cherry pie that's juicy but not runny, thick but not gloppy, and (most important) worthy of Dale Cooper's praise?

Luckily, cherries themselves are wonderfully predictable. Some taste better than others, to be sure, but whether fresh or frozen, sweet or sour, juicy and plump from the farmers market or withered as they linger in stores, cherries are just colorful bags of mostly water.

A little more than 80%, if you want to be precise. That means we don't have to guess how much liquid they'll give up—we know. Suddenly, the amount of starch our pie needs is a constant, not a variable: a fixed percentage of the pitted cherries by weight.

Of course, the precise amount depends on the thickening power of any given starch, so, for simplicity's sake, I'm going to focus on my favorite: tapioca. I'm not talking about pearls or quick-cooking granules, but the fully powdered starch. It's widely available, easy to use, and well suited to the acidity of cherries; peaches, blueberries, and huckleberries (perhaps Dale Cooper's second-favorite pie), too.

Tapioca starch can also thicken cherry pie filling at a concentration of only 5.5%, so we don't need very much—a real victory for those of us who despise starchy pies. Combined with fruit juice, tapioca forms a translucent gel that feels silky and light, so you never have to deal with cloudy or gloppy filling. In my testing, this concentration worked with sweet, sour, or even frozen cherries.

Under normal conditions, tapioca starch begins to gelatinize around 140°F, and it can break down at temperatures as low as 190°F. That makes it lousy in savory applications, where it loses all its power in simmering stews and sauces. But those rules fly out the window when it comes to cherry pie, which behaves more like a candy than a sauce.

Whether you're making chewy caramel or gooey marshmallow fluff, the boiling point of any syrup (including cherry pie filling) is governed by sugar. The more sugar, the higher the boiling point.

Here's where things get crazy: Sugar effectively raises the gelatinization temperature of starch by altering the thermodynamic behavior of water itself so that it requires more energy (i.e., a higher cooking temperature) before it can penetrate a granule of starch. In short, sugar enables a fragile starch like tapioca to perform supernatural feats, even in a bubbling-hot pie.

But only at the right concentration! Too little sugar (less than 15% of the cherries by weight) and the water will behave more or less as usual, allowing the tapioca to break down long before the crust has a chance to bake through and through. Too much sugar (over 35%) and the water won't be able to penetrate the starch until it's cooked well beyond the temperature of any normal pie.

In my experience, the ideal concentration of sugar is about 25%, enough to delay gelatinization so the tapioca-thickened filling and dough bake at the same rate. That's a vital consideration if you want the bottom crust to turn out flaky, crisp, and brown. (A soggy bottom crust is a sure sign that something's gone awry.)

By adding sugar to taste, as if it were merely a sweetener and nothing more, we leave our success to chance. While there's no denying the romance of recipes that call for a handful of this and a handful of that, we've all seen enough soupy pies and goopy fillings to know that the odds aren't good. But if we accept sugar as a fixed percentage of our fruit by weight, all risk of failure is removed.

With that revelation, the ultimate cherry pie is no Lynchian mystery. It's a simple fact of life.

So, if we're adding sugar as a fixed percentage by weight, not by taste, how does that account for cherry varieties that might be sweeter or more sour than others? I use a couple of methods to adjust sweetness in my pie. The filling can be doctored to taste with lemon juice and salt—I use a heavy hand with both; most fruit pies are criminally under-seasoned—and both will help bring balance and complexity to the filling. If you're dealing with extremely dark cherries, which are particularly sweet, I highly recommend giving lightly toasted sugar a try.

Baked for just an hour or two at 300°F, sugar undergoes some low-level caramelization that will dramatically reduce its sweetness without adding any overt caramel flavor at all (its color should still be pale ivory). If anything, toasted sugar helps coax out the almond-y notes inherent to cherries, adding a bit more complexity to the pie. On that note, don't toss out those pits! Steeped with a little cream, they're a pitch-perfect (or should I say pit-perfect?) complement to your pie in the form of Cherry Pit Whipped Cream.

So pour yourself a cup of strong coffee, black as midnight on a moonless night, and prepare to settle down with a damn fine slice of cherry pie.

All products linked here have been independently selected by our editors. We may earn a commission on purchases, as described in our affiliate policy.