"Love is the only thing that can save this poor creature," Gene Wilder grandly declares to his assistants in Young Frankenstein as he commands them to lock him in a room with his monster. "And I am going to convince him that he is loved even at the cost of my own life. No matter what you hear in there, no matter how cruelly I beg you, no matter how terribly I may scream, do not open this door or you will undo everything I have worked for. Do you understand? Do not open this door."

Think about that for a minute. Dr. Frankenstein goes into the room telling his aides to ignore what he's going to say once he's inside. He knows he will want to come out, so he enlists others to help him subordinate his own later wishes to the ones he has right now, which he apparently prefers.

There's a name for this sort of thing. In the quietly sizzling field of self-control studies, it's called precommitment, because it involves acting now against the strength of some later desires, either by taking certain options off the table or by making them prohibitively costly.

Precommitment doesn't just happen in movies. For years the economists Dean Karlan and John Romalis kept their weight down by means of a clever pact. Karlan and Romalis knew a little something about incentives, so they struck a deal: Each would have to lose 38 pounds in six months or forfeit half his annual income to the other. If both failed, the one who lost less would forfeit a quarter of his income. They lost the weight and generally kept it off, although, at one point, Romalis's weight popped back up over the limit and Karlan actually collected $15,000 from his friend. He felt he had no choice. He felt he had to take the money to maintain the credibility of their system, without which they'd both get fat.

Precommitment works, which is why Karlan, now a professor at Yale, set out to make it available to the world via stickK.com, the Internet's precommitment superstore. Karlan's venture enables any of us to contractually control our own actions or, if we violate the agreement, face a penalty we've chosen. Theoretically, it could make a Trollope of the most recalcitrant writer, allowing him to impose on himself the wanted law that cannot be disobeyed. Despite its nerdy origins, the site has a rakish motto: "Put a contract out on yourself!"

The concept is fiendishly simple. StickK.com (the second K is from the legal abbreviation for contract, although baseball fans will detect a more discouraging connotation) lets you enter into one of several ready-made binding agreements to lose weight, quit smoking, or exercise regularly, among other things. You can also create your own agreement, which many of the site's 100,000 registered users have done. You specify the terms (say, a loss of one pound per week for 20 weeks), put up some money, and provide the name of a referee if you want one to verify your results. Whenever you fail, stickK.com gives some of your money to a charity or friend that you've chosen. Whether you fail or succeed, stickK.com never keeps your money for itself aside from a transaction fee.

If you want a sharper incentive, you can even pick an individual enemy or an organization that stickK.com calls "an anti-charity." Democrats, for instance, might find it especially motivating to know that if they fail to live up to a binding personal commitment on stickK.com, some of their hard-earned money will go to the George W. Bush Presidential Library. Anti-charities apparently are highly motivating; stickK.com says they have an 80 percent reported success rate. "All stickK is doing," Karlan told me, "is raising the price of bad behavior—or lowering the cost of good behavior."

What's especially appealing about ventures like stickK.com is not just that they give us the tools to constrain ourselves but that they are voluntary. We are fortunate to live in a time when the biggest problem that many of us face is coping with our own appetites in the face of freedom and affluence. Inevitably our failures—bankruptcy, obesity—bring calls for government to protect us from ourselves. But there are ways we can protect ourselves from ourselves without trampling the rights of others.

Consider exercise. It's good for you, and people want to be healthy and attractive. So lots of us join gyms—and then don't use them, which is why the places get a lot less crowded after January, when the New Year's resolutions start to peter out. The membership fee is just the cost of our good intentions. The real expense is the time and effort required to work out.

Enter Gym-Pact, a clever Boston venture cooked up by a couple of recent Harvard grads. Gym-Pact gives participants a cut-rate membership. The catch is, you have to specify in advance how many times a week you'll show up and how much extra you'll pay for each missed day. In effect, Gym-Pact helps reallocate the cost of exercise to idleness.

Precommitment can be especially helpful when it comes to bad habits, including substance abuse. In the movie Tropic Thunder, one of the characters is a heroin addict who runs out of his drug while making a movie in the jungle. When a jungle drug-making operation is discovered, he gets one of his colleagues to tie him to a tree so he won't succumb to temptation. Soon enough, of course, he is pleading to be untied, just as Gene Wilder was pleading for his helpers to open the door.

Sound familiar? It should. History's first known episode of precommitment occurs in The Odyssey, when Odysseus and his men are sailing home from the Trojan War. He has been warned about the Sirens, whose seductive song leads sailors to destruction, but he wants to hear it anyway. So he gives his men earplugs and orders that they tie him to the mast, ignoring all subsequent pleas for release until they are safely past the danger.

The Odyssey is all about the management of desire, and the famous wiliness of its hero is on full display in this episode. Odysseus essentially invents precommitment to inoculate himself against his own predictable (and potentially fatal) future desires. A lesser man might have relied on willpower alone, but Odysseus knew that no one is immune to temptation.

Precommitment and the Poor

Dean Karlan had spent a good deal of time thinking about precommitment before launching stickK.com, especially in conjunction with his other great interest, Third World finance. A few years back, he and colleagues from Harvard and Princeton set out to investigate whether people would freely choose a precommitment device to help them save, and if so whether it would make much of a difference.

They designed an elegant experiment that produced fascinating results, which they recorded in a 2006 Quarterly Journal of Economics paper titled "Tying Odysseus to the Mast: Evidence From a Commitment Savings Product in the Philippines." They carried out their project on the island of Mindanao, in partnership with a rural financial institution there known as the Green Bank. The professors first surveyed 1,777 current or former customers of the bank to assess how good they were at deferring gratification. The surveys asked such questions as, "Would you prefer to receive 200 pesos guaranteed today, or 300 guaranteed in one month?" And equally important: "Would you prefer to receive 200 pesos guaranteed in six months, or 300 guaranteed in seven months?"

Customers who chose the sooner, smaller reward in answer to the first question but the larger, later reward in response to the second were deemed likely to have self-control problems. The researchers offered 710 of these individuals a new kind of savings account called Save, Earn, Enjoy Deposits, or SEED. These special accounts offered the standard 4 percent interest, with a single catch: Withdrawals weren't allowed until either an agreed-upon date or sum was reached. (Almost all the savers chose a date rather than a sum, since failing to accumulate the latter could mean their savings were locked away indefinitely.)

Some 202 self-aware individuals, or 28 percent of those receiving the SEED account offer, accepted—a group that skewed somewhat female. And 83 percent of SEED enrollees also bought a ganansiya box from the bank. This is like a piggy bank with a lock, except that the bank holds the key; savers accumulate small sums by putting a peso or two into a box when they can. It's a poor man's precommitment device, in this case one that mirrors, on a small scale, the design of the SEED accounts.

Karlan and his colleagues found that SEED worked for the participants. After just a year, SEED account holders had increased their savings by a remarkable 81 percent. It was a modest experiment, but it showed that giving people the opportunity to precommit can help them rapidly accumulate capital, even if they don't have much income. The experiment also showed that many people with self-control problems know they have them. The SEED account participants mostly knew themselves well enough to purchase ganansiya boxes. This kind of self-knowledge isn't uncommon among the Third World poor. Daryl Collins, a consultant on Third World finance and a former lecturer at the University of Cape Town, reports that poor South Africans sometimes rely on money guards—"a neighbor or relative or friend that you trust and say, 'Hold this, and don't let me touch it,'?" she explains. "Sometimes the same money guard asks you to hold their money, and so when someone comes to borrow money, you say, 'It's not my money.' It works."

Back in the 1990s, when it was suggested that early-withdrawal penalties might be discouraging Americans from saving more in retirement accounts, a survey found that 60 percent of us wanted to maintain the restrictions; only 36 percent favored making it easier to tap retirement savings early. Why such a lopsided result? I think it's because people understood how susceptible they would be to the temptation to crack open their own nest eggs. They wanted the barrier left in place to keep themselves away.

I'm not surprised. I remember my mother, in the 1960s, dutifully making regular deposits into a Christmas club account at the local bank. On the surface, Christmas clubs make no sense. You have to make regular deposits—I seem to recall my mother having something like the kind of payment book you might get with a car loan—and you receive little or no interest. Most amazing of all, the bank won't let you have your money back until December. But of course this was the reason my mother signed up; the arrangement forced you to save, and it kept your savings out of your hands.

I did something similar when I worked at a big newspaper and signed up for automatic payroll deductions, with the money going into my credit union savings account. Then every time I got a raise, I raised the savings deduction by the same amount. My lifestyle never expanded with my income, but I did build up a pile of cash. I had colleagues who used the government's withholding of income taxes the same way. Those unfamiliar with this technique may not know that you have some discretion about how much Uncle Sam withholds from your paycheck; if you have a mortgage, kids, and other significant deductions, you should reduce the withholding to match what you'll ultimately owe, since the government won't pay you interest while it has your overpayments. On the other hand, you can't access the withheld money until you file your taxes—after which you'll get a nice, big refund. Think of the lost interest as a modest service charge, well worth it to people who know they might not save any other way.

Self-control sophisticates use the tools that happen to be at hand, as is apparent from the urban numbers racket. If you know how the lottery works, you understand the numbers game, except that the latter offers better odds.

I grew up around people who played the numbers. They'd wager 25 or 50 cents with a bookie on some three-digit number based on a dream or a birthday or some other likely premise, and if the number came in, they'd win. The daily number was always taken from some objective source that was ostensibly beyond manipulation; it might have been the last three digits of the day's take at Aqueduct, for example, or of the trading volume on the New York Stock Exchange. Like many people who buy lottery tickets, many numbers players play for entertainment.

But back in the 1970s, the sociologist Ivan Light looked at numbers gambling in Harlem and saw not a diversion or even "a tax on stupidity" (the term derisive economists use for state-run lotteries) but a functioning financial system—and an effective precommitment device to help people save. What outsiders didn't seem to understand was that Harlem residents didn't trust, and weren't well served by, banks. The so-called numbers racket, illegal though it may have been, partially filled this vacuum.

First, remember that the winning number is always just three digits, 000 through 999, so the odds of winning are a far-from-astronomical 1 in 1,000. And while the pot never contains millions, a winner who bet $1 might clear $500 after the customary 10 percent tip to the runner, who carries the loot back and forth. (Naturally, no taxes are paid.)

How did this add up to a savings plan? Survey data showed that the players were persistent, with nearly 75 percent playing two or three times a week and 42 percent playing daily, for years on end. In other words, they acted something like long-term investors. And they were likely to get back $500 for every thousand bets of $1 each. That may not seem like much of a return on investment, but bear in mind that many players bet with quarters, a sum that even among the poor tends to vanish unaccountably. They got some hope. They couldn't raid their "savings" until they won. And their money also bought convenience: Numbers runners made house calls, and these visits no doubt helped people keep playing.

In some poor neighborhoods of India, "deposit collectors" perform the same function. The collector gives a would-be saver a card imprinted with a grid of 220 cells, and the customer commits to handing over, say, five rupees for each cell each day. At the end, the saver would get back 1,100 rupees, less 100 rupees for the collector's fee. Savers are happy to live with this negative interest rate in exchange for the convenience and for the commitment device.

In Harlem, numbers players also knew their money was supporting black enterprise, local jobs, and a certain amount of neighborhood investment. But most of all, sooner or later you had a large sum of money to look forward to—and no control over when it would arrive.

"Most gamblers understand their numbers betting as a means of personal saving," Light reported, adding: "The bettor's justification for this seemingly preposterous misconception arises from unsatisfactory experiences with depository savings techniques. Once a numbers collector has a man's quarter, they aver, there is no getting it back in a moment of weakness. If, on the other hand, the quarter were stashed at home, a saver would have to live with the continuing clamor of unmet needs. In a moment of weakness, he might spend the quarter. Therefore, in the bettor's view, the most providential employment of small change is to bet it on a number."

Precommitment and Paternalism

StickK.com has come along at a time of renewed interest in paternalism. A number of people, most prominently the University of Chicago economist Richard Thaler and the Harvard legal scholar Cass Sunstein, have suggested that institutions should help people make better choices by means of more thoughtful "choice architecture." (Sunstein currently serves as administrator of the federal Office of Information and Regulatory Affairs.) At company cafeterias, for instance, the fruits and vegetables might be displayed more prominently and priced more attractively than desserts so that people will be more likely to pick healthier items. The idea is not to mandate behavior but to present choices so that the indisputably better option is more likely to be selected.

The classic example is the movement in business to automatically enroll employees in a 401(k) plan, with the right to opt out. This is the opposite of the traditional approach, which relies on employees to opt in. It turns out that human beings have a strong status quo bias, which is a fancy way of saying inertia is a powerful force in people's lives. In a study published in 2001, for instance, Brigitte Madrian and Dennis Shea found at one company that sign-ups among new hires rose to 86 percent from 49 percent after automatic enrollment was adopted. Reversing the default condition, which cost nothing and constrained nobody, thus significantly boosted the retirement prospects of a great many employees.

StickK.com lets people do this sort of thing for themselves. It's a place where they can act of their own volition to make themselves adhere to their second-order preferences—that is, their preferences about preferences. You may like to smoke cigarettes, for example, but you may also prefer not to have that preference. And your rational allegiance is to your second preference, the one that lets you avoid lung cancer and the other problems of smoking. The beauty of stickK.com is that it lets people decide for themselves which longer-term goals they embrace, in effect by becoming their own paternalists. And it gives them the means to enforce their own second-order desires, just as people do when they have their stomachs stapled or their jaws wired to constrain their eating. As Vito Corleone might have put it, stickK.com wants you to make yourself an offer you can't refuse.

So how can each of us be our own godfather? The answer is to shuck the naiveté of the untutored in favor of a more sophisticated approach to ourselves and our intentions. That means, first, relying as little as possible on willpower in the face of temptation. It's much better, like Odysseus, to row right past the cattle of the sun god than to count on controlling the hunger that could lead to a fatal barbecue. It also means acknowledging how much we are influenced by our surroundings—and taking command of our environment so that it influences us in ways we prefer. Most important of all, a more sophisticated approach means recognizing that we cannot honor our best intentions by ourselves. If we are to take control of our own destiny in a world of such unprecedented freedom and abundance, we have no choice but to enlist the help of others—not just family but friends, colleagues, and community. The only hope, in short, is to do all that we can to have ourselves tied to the mast of our own intentions.

Yet there are times when we might conclude that someone so dependent on precommitment actually lacks self-control. A fat person who has his jaws wired shut in order to slim down, for example, signals to all that he couldn't control his eating without resort to artifice. Jon Elster has observed that, when it comes to booze, many societies have norms against both drunkenness and abstinence. Sydney Greenstreet, pouring a drink in The Maltese Falcon, puts the point neatly: "I distrust a man who says 'when.' If he's got to be careful not to drink too much, it's because he's not to be trusted when he does." Regardless of the signals it sends, committing yourself—irrevocably, if you can—to your best intentions is the most powerful weapon available in the war for self-command.

Hell Is Not Other People

Inhibition often begins with the sense that somebody is watching; experiments have demonstrated that simply installing a mirror makes people behave more honestly when, for example, they pick up a newspaper and are supposed to leave their money on the honor system. Mirrors also seem to diminish stereotyping, promote hard work, and discourage cheating. In one study of children, the mere presence of a mirror reduced the stealing of Halloween candy by more than 70 percent. You can think of other people as human mirrors. "Our friends and relatives," the psychologist Howard Rachlin writes, "are essential mirrors of the patterns of our behavior over long periods—mirrors of our souls. They are the magic 'mirrors on the wall' who can tell us whether this drink, this cigarette, this ice cream sundae, this line of cocaine, is more likely to be part of a new future or an old past. We dispense with these individuals at a terrible risk to our self-control."

Human relationships are vital in many ways, but in the self-control arena we are as dependent on them as Odysseus was on his crew, for we simply cannot bind ourselves to our own wills without other people. Participants in some 12-step programs have sponsors they can call upon when the will weakens, and even stickK.com encourages users to name a referee who can attest to whether they've met their goals. While loneliness subverts self-control, community can promote it in various ways, not least by minimizing social isolation and establishing norms. Communities are also social information systems, and being known in one is surely a moderating force, because reputations are valuable. Communities can reward with esteem and punish by turning a cold shoulder. You can use this knowledge against yourself. If you make New Year's resolutions, for example, you're much better off telling everyone about them, even putting them on a blog. Once this is done, you'll be much more likely to uphold them, since your reputation will be at stake.

If you're serious about living up to your second-order preferences, then the truly radical approach is to treat yourself like a moderately sophisticated lab rat. People often do so instinctively by promising themselves a certain reward—opening the good wine, buying a new dress, taking a vacation in Hawaii—when a certain goal is met. But self-rewards can be tricky without appointing someone else to bestow or withhold the prize. If you don't mind treating yourself like a lab rat, friends and family members can be a big help.

If you want to make a difficult but enduring change, announce it (to yourself and others) well in advance; an engagement period is always useful in getting one's intended to the altar. It's not by chance that the military allows enlistees a period of time between signing and induction. One study of charitable giving found that it rose when a delay was permitted between pledging and giving. Another study found that the longer in advance people ordered groceries, the less they spent and the healthier their choices were.

On the other hand, since speed and proximity kill self-control, it pays to keep a buffer of time and space between you and the most dubious gratifications. The Wall Street Journal cites the example of Scott Jaffa, a systems administrator in suburban Washington, D.C., who "destroyed the online access code for his 401(k) so he could no longer have instant access to his retirement accounts. His goal was to make it 'significantly harder' and to require 'human interaction' before he could trade on his own emotions." This act of precommitment helped him endure some stomach-churning stock market declines without taking any harmful action.

Homer and Ned

In America, it sometimes seems, you are either Homer Simpson or Ned Flanders. Homer is a slave to his appetites most of the time, although his fat-clogged heart is in the right place, while his neighbor Ned is a paragon of self-control, never letting his temper get the better of him even for a moment—but only because he's in thrall to a cult-like evangelism. Both men seem to be missing a fully functioning will.

I go back and forth when I think about which I'd rather be. Homer is selfish, shortsighted, flabby, and dumb, finding consolation in a bucket of fried chicken with extra skin. Ned is nicer and better-looking, has better-behaved kids, and runs his own business, yet there is something awful about him too. The basis of his good life seems contrived, even prefabricated, and his relationship to choice efficient but somehow stunted.

The third alternative is to decide for ourselves which of our preferences we like and then defend them against the importuning of those we do not. In the philosopher Harry Frankfurt's formulation, this is what makes you a person; the alternatives are submitting blindly to impulse, like Homer, or submitting blindly to some power outside yourself, like Ned.

Faced with these options, we find ourselves once again in the position of Odysseus, who must navigate between Scylla and Charybdis as part of his long and difficult journey home. But while we don't have much say over the desires we have, we certainly can decide which we prefer and then search for ways to act on that basis. Self-regulation will always be a challenge, but if somebody's going to be in charge, it might as well be ourselves.

Daniel Akst (danielakst@gmail.com) is a member of the editorial board at Newsday. This article is adapted from his book We Have Met the Enemy, published by arrangement with the Penguin Press, a member of Penguin Group (USA) Inc. © Copyright 2011 by Daniel Akst.