When I was a teenager, I learned something important about human behavior just by listening to Cubs baseball games on the radio. I learned that the pain of losing tends to be greater than the pleasure of winning. When my team fell behind by a bunch of runs and then came back to win, I was elated -- for a little while. But when they got off to a big lead, squandered it and ended up losing, I sometimes stayed dejected for days.

Little did I know that I had stumbled on a central truth in the field of behavioral economics. The field itself wasn’t born for another three decades. But when it emerged in academia, thanks mainly to the work of psychologists Daniel Kahneman and Amos Tversky, it included as one of its fundamental tenets the idea of “loss aversion”: Losing an object of value that you had considered yours is a much more powerful negative experience than the positive experience of gaining the same thing.

A few years ago, an experiment in loss aversion was tried on some teachers in the Chicago Public Schools. One group was given bonuses at the end of the school year if their pupils reached a certain level of performance in math. A second group was given an equal amount of money at the beginning of the year, but stood to lose it if their students missed the target. The second group showed better results. The prospect of having money taken away from them was more of a motivating factor than the anticipation of a bonus later on.

That particular experiment was one of hundreds that have been tried across a whole range of government activity in the past decade or so. Many of them come from the work of two prominent scholars, Cass Sunstein and Richard Thaler, who have looked for ways to derive practical societal benefit from the original insights of behavioral economics.

Sunstein and Thaler are the most prominent apostles of “nudge” policy, the idea of changing the rules in ways that lead people to desirable behavior without forcing them to do anything. Some of the original nudge experiments are now legendary. New employees, for instance, are encouraged to save for retirement or volunteer for organ donation by opting out if they prefer not to participate rather than making them opt in if they want to sign up. Under this approach, the number of participants nearly always jumps significantly.

Other familiar experiments involve a behavioral economics principle that might be called social emulation. Residents who are failing to conserve energy, for example, are contacted with one of two alternative messages. One informs them politely -- or sometimes sternly -- that the time for compliance has come. The other cites the cooperation that their neighbors have provided, and quotes some of the neighbors on how important it is to be a team player. The second one, a classic nudge, is more effective.

Just a few years ago, nudge policy seemed to be on the road to remarkably fast global acceptance. As prime minister of Britain, David Cameron formed the Behavioural Insights Team that pursued a nudge strategy for organ donation at driver’s license centers and found that it led to 100,000 new volunteers in a single year. By 2015, the team had a staff of 70 and offices in London, New York and Sydney. President Barack Obama had his agencies look into it, and, in 2015, implemented a behavioral science insights policy across the federal government by executive order.

Then the whole movement seemed to stall. The insights team in the U.K. saw its budget and staffing cut back significantly. Obama was replaced by a new president and administration that showed zero interest in the idea. No new breakthroughs along the lines of the opt-in/opt-out strategy emerged to attract the attention of senior officials.

But to say that nudging has fizzled out is to miss the point by quite a bit. While the federal government has been de-nudging, state and local governments have been pursuing the strategy with a fair amount of enthusiasm. One example is an experiment in transportation policy underway now in Durham, N.C.

As reported by CityLab, the local government in Durham is using a nudge strategy to persuade solo drivers to find a different way to commute to work downtown. The goal for the first six months was a 5 percent reduction in single-person car trips. To achieve it, the city sent motorists home-to-work route maps that estimated the time their commutes would take by bus, bicycle and foot. The mailings gave them projected savings on gasoline and even possible weight loss, for those willing to try walking. The city also set up a lottery for city employees that offered a cash prize of $163 a week. Nobody was required to do anything; the program was strictly for people willing to ride the bus.

The lottery took advantage of the well-established principle of behavioral economics that says human beings tend to overestimate their likelihood of winning in a game of chance. It seems to have worked. Durham Mayor Steve Schewel reports that solo driving was down 16 percent among commuters who got the mailings and entered the lottery. The mailings alone led to a reduction of 12 percent. “It was all inspired by behavioral economics,” Schewel told me recently. “We’re really committed to that in Durham.”

But the influence of behavioral economics and nudge strategy has reached far beyond individual local experiments. I think it’s quite clear, for example, that the nudge approach was part of the Affordable Care Act. In requiring that everybody either carry health coverage or pay a penalty, the Obama administration was taking a page out of the Sunstein-Thaler playbook. The penalty was perhaps the most unpopular element of the law, and the Republicans repealed it in their 2017 tax bill. But the fact that most Americans opted to avoid the penalty, even when it amounted to far less than insurance would have cost, suggested that it was at least a qualified success. A law that forced them into buying health care would have certainly provoked far more hostility.

There is also more than a small amount of nudging in “housing first” initiatives, a policy in which local governments provide apartments to homeless people without forcing them to address the problems that caused them to be homeless. Having a decent place to live leads clients to make better life decisions even if the clients themselves aren’t sure what’s causing the improvement. Housing first has always had its critics, who believe it hands out unjustified rewards to the undeserving. But it has produced results better than most traditional approaches. Forcing the homeless to give up drugs or alcohol as a precondition for better housing has never been shown to work very well.

Nudging has had its share of failures. Most of them come in programs that cross a subtle line dividing free choice from paternalism. Former New York Mayor Michael Bloomberg thought he was practicing the best kind of behavioral economics when he sought to improve the health of his constituents by banning the sale of sweetened soft drinks in large “big gulp” containers. Soda drinkers could still drink as much soda as they wanted; they just had to buy it in smaller increments. Bloomberg thought this was a harmless nudge, but New Yorkers didn’t see it that way. They considered it arrogant paternalism and accused Bloomberg of trying to be a municipal nanny. The idea was never implemented.

Something similar happened in West Virginia, where state health officials tried to promote wellness among public employees by imposing higher health-care premiums for those who failed a health test or refused to participate, and by handing out gift cards and exercise equipment to those who tested in good health. The public outcry against the program, which was called Go365, was so loud that Gov. Jim Justice cancelled it early in 2018. In the opinion of its many critics, Go365 went far beyond the boundaries of a nudge.

What the record shows is that behavioral economics can be a potent force for good. But it is also a tool that needs to be used with caution. What’s a nudge to one person may be intrusive meddling to another. Paternalism does not have a big constituency. Nannying has an even smaller one.

At its root, behavioral economics rests on an unsettling foundation. It is based on the idea that, left to themselves, people often will behave irrationally even when the stakes are high. It’s a failing that many are uncomfortable accepting. Sunstein admitted this rather ruefully a few years ago. “People think that human beings should be able to go their own way,” he wrote, “even if they end up in a ditch.” Lifting them out of the ditch is a worthy undertaking; it just has to be done gently.