Is willpower a mood that comes and goes? A temperament you’re born with (or not)? A skill you learn? In Willpower: Rediscovering the Greatest Human Strength, Florida State University psychologist Roy F. Baumeister and New York Times journalist John Tierney say willpower is a resource that can be renewed or depleted, protected or wasted. This adaptation from their book views Henry Morton Stanley’s iron determination in the light of social science.

In 1887, Henry Morton Stanley went up the Congo River and inadvertently started a disastrous experiment. This was long after his first journey into Africa, as a journalist for an American newspaper in 1871, when he’d become famous by finding a Scottish missionary and reporting the first words of their encounter: “Dr. Livingstone, I presume?” Now, at age 46, Stanley was leading his third African expedition. As he headed into an uncharted expanse of rain forest, he left part of the expedition behind to await further supplies.

The leaders of this Rear Column, who came from some of the most prominent families in Britain, proceeded to become an international disgrace. Those men allowed Africans under their command to perish needlessly from disease and poisonous food. They kidnapped and bought young African women. The British commander of the fort savagely beat and maimed Africans, sometimes ordering men to be shot or flogged almost to death for trivial offenses.

While the Rear Column was going berserk, Stanley and the forward portion of the expedition spent months struggling to find a way through the dense Ituri rain forest. They suffered through torrential rains. They were weakened by hunger, crippled by festering sores, incapacitated by malaria and dysentery. They were attacked by natives with poisoned arrows and spears. Of those who started with Stanley on this trek into “darkest Africa,” as he called that sunless expanse of jungle, fewer than one in three emerged with him.

Yet Stanley persevered. His European companions marveled at his “strength of will.” Africans called him Bula Matari, Breaker of Rocks. “For myself,” he wrote in an 1890 letter to The Times, “I lay no claim to any exceptional fineness of nature; but I say, beginning life as a rough, ill-educated, impatient man, I have found my schooling in these very African experiences which are now said by some to be in themselves detrimental to European character.”

In his day, Stanley’s feats enthralled the public. Mark Twain predicted, “When I contrast what I have achieved in my measurably brief life with what [Stanley] has achieved in his possibly briefer one, the effect is to sweep utterly away the ten-story edifice of my own self-appreciation and leave nothing behind but the cellar.” Anton Chekhov saw Stanley’s “stubborn invincible striving towards a certain goal, no matter what privations, dangers and temptations for personal happiness,” as “personifying the highest moral strength.”

But in the ensuing century, his reputation plummeted as historians criticized his association in the early 1880s with King Leopold II, the profiteering Belgian monarch whose ivory traders would later provide direct inspiration for Joseph Conrad’s Heart of Darkness. As colonialism declined and Victorian character-building lost favor, Stanley was depicted as a brutal exploiter, a ruthless imperialist who hacked and shot his way across Africa.

But another Stanley has recently emerged, neither a dauntless hero nor a ruthless control freak. This explorer prevailed in the wilderness not because his will was indomitable, but because he appreciated its limitations and used long-term strategies that social scientists are only now beginning to understand.

This new version of Stanley was found, appropriately enough, by Livingstone’s biographer, Tim Jeal, a British novelist and expert on Victorian obsessives. Jeal drew on thousands of Stanley’s letters and papers unsealed in the past decade to produce a revisionist tour de force, Stanley: The Impossible Life of Africa’s Greatest Explorer. It depicts a flawed character who seems all the more brave and humane for his ambition and insecurity, virtue and fraud. His self-control in the wilderness becomes even more remarkable considering the secrets he was hiding.

If self-control is partly a hereditary trait—which seems likely—then Stanley began life with the odds against him. He was born in Wales to an unmarried 18-year-old woman who went on to have four other illegitimate children by at least two other men. He never knew his father. His mother abandoned him to her father, who cared for him until he died when the boy was 5. Another family took him in briefly, but then one of the boy’s new guardians took him to a workhouse. The adult Stanley would never forget how, in the moment his deceitful guardian fled and the door slammed shut, he “experienced for the first time the awful feeling of utter desolateness.”

The boy, then named John Rowlands, would go through life trying to hide the shame of the workhouse and the stigma of his birth. After leaving the workhouse, at age 15, where he had done cleaning and bookkeeping, and later traveling to New Orleans, he began pretending to be an American. He called himself Henry Morton Stanley and told of taking the name from his adoptive father—a fiction, whom he described as a kind, hardworking cotton trader in New Orleans. “Moral resistance was a favourite subject with him,” Stanley wrote of his fantasy father in his posthumously published autobiography. “He said the practice of it gave vigour to the will, which required it as much as the muscles. The will required to be strengthened to resist unholy desires and low passions, and was one of the best allies that conscience could have.” At age 11, at the workhouse in Wales, he was already “experimenting on Will,” imposing extra hardships on himself. “I would promise to abstain from wishing for more food, and, to show how I despised the stomach and its pains, I would divide one meal out of the three among my neighbours; half my suet pudding should be given to Ffoulkes, who was afflicted with greed, and, if ever I possessed anything that excited the envy of another, I would at once surrender it.”

Years later, when Stanley first learned of some of the Rear Column’s cruelties and depredations, he noted in his journal that most people would erroneously conclude that the men were “originally wicked.” People back in civilization, he realized, couldn’t imagine the changes undergone by men “deprived of butcher’s meat & bread & wine, books, newspapers, the society & influence of their friends. Fever seized them, wrecked minds and bodies. Good nature was banished by anxiety...until they became but shadows, morally & physically of what they had been in English society.”

Stanley was describing what the economist George Loewenstein calls the “hot-cold empathy gap”: the inability, during a rational, peaceful moment, to appreciate how we’ll behave during a time of great hardship or temptation. Calmly setting rules for how to behave in the future, one often makes unrealistic commitments. “It’s really easy to agree to diet when you’re not hungry,” says Loewenstein, a professor at Carnegie Mellon University.

It’s our contention that the best strategy is not to rely on willpower in all situations. Save it for emergencies. As Stanley discovered, there are mental tricks that enable you to conserve willpower for those moments when it’s indispensable.

Stanley had first encountered the miseries of the African interior at the age of 30, when the New York Herald sent him in 1871 to find Livingstone, last heard from some two years earlier, somewhere on the continent. Stanley spent the first part of the journey slogging through a swamp and struggling with malaria before the expedition narrowly escaped being massacred during a local civil war. After six months, so many men had died or deserted that, even after acquiring replacements, Stanley was down to 34 men, barely a quarter the size of the original expedition, and a dangerously small number for traveling through the hostile territory ahead. But one evening, during a break between fevers, he wrote a note to himself by candlelight. “I have taken a solemn, enduring oath, an oath to be kept while the least hope of life remains in me, not to be tempted to break the resolution I have formed, never to give up the search, until I find Livingstone alive, or find his dead body....” He went on, “No living man, or living men, shall stop me, only death can prevent me. But death—not even this; I shall not die, I will not die, I cannot die!”

Writing such a note to himself was part of a strategy to conserve willpower that psychologists call precommitment. The essence is to lock yourself into a virtuous path. You recognize that you’ll face terrible temptations and that your willpower will weaken. So you make it impossible—or disgraceful—to leave the path. Precommitment is what Odysseus and his men used to get past the deadly songs of the Sirens. He had himself lashed to the mast with orders not to be untied no matter how much he pleaded to be freed to go to the Sirens. His men used a different form of precommitment by plugging their ears so they couldn’t hear the Sirens’ songs. They prevented themselves from being tempted at all, which is generally the safer of the two approaches. If you want to be sure you don’t gamble at a casino, you’re better off staying out of it.

No one, of course, can anticipate all temptations, especially today. No matter what you do to avoid physical casinos, you’re never far from virtual ones, not to mention all the other enticements perpetually available on the web. But the technology that creates new sins also enables new precommitment strategies. A modern Odysseus can try lashing himself to his browser with software that prevents him from hearing or seeing certain websites. A modern Stanley can use the web in the same way that the explorer used the social media of his day. In Stanley’s private letters, newspaper dispatches and public declarations, he repeatedly promised to reach his goals and to behave honorably—and he knew, once he became famous, that any failure would make headlines. As a result of his oaths and his image, Jeal said, “Stanley made it impossible in advance to fail through weakness of will.”

Today, you can precommit yourself to virtue by using social-networking tools that will expose your sins, like the “Public Humiliation Diet” followed by a writer named Drew Magary. He vowed to weigh himself every day and reveal the results on Twitter—which he did, and lost 60 pounds in five months. Or you could sign a “Commitment Contract” with stickK.com, which allows you to pick any goal you want—lose weight, stop biting your nails, use fewer fossil fuels, stop calling an ex—along with a penalty that will be imposed automatically if you don’t reach it. You can make the penalty financial by setting up an automatic payment from your credit card to a charity or an “anticharity”—a group you’d hate to support. The efficacy of such contracts with monitors and penalties has been independently demonstrated by researchers.

Imagine, for a moment, that you are Stanley early one morning. You emerge from your tent in the Ituri rain forest. It’s dark. It has been dark for months. Your stomach, long since ruined by parasites, recurrent diseases and massive doses of quinine and other medicines, is in even worse shape than usual. You and your men have been reduced to eating berries, roots, fungi, grubs, caterpillars, ants and slugs—when you’re lucky enough to find them. Dozens of people were so crippled—from hunger, disease, injuries and festering sores—that they had to be left behind at a spot in the forest grimly referred to as Starvation Camp. You’ve taken the healthier ones ahead to look for food, but they’ve been dropping dead along the way, and there’s still no food to be found. But as of this morning, you’re still not dead. Now that you’ve arisen, what do you do?

For Stanley, this was an easy decision: shave. As his wife, Dorothy Tennant, whom he married in 1890, would later recall: “He had often told me that, on his various expeditions, he had made it a rule, always to shave carefully. In the Great Forest, in ‘Starvation Camp,’ on the mornings of battle, he had never neglected this custom, however great the difficulty.”

Why would somebody starving to death insist on shaving? Jeal said, “Stanley always tried to keep a neat appearance—with clothes, too—and set great store by the clarity of his handwriting, by the condition of his journals and books, and by the organization of his boxes.” He added, “The creation of order can only have been an antidote to the destructive capacities of nature all around him.” Stanley himself once said, according to his wife, “I always presented as decent an appearance as possible, both for self-discipline and for self-respect.”

You might think the energy spent shaving in the jungle would be better devoted to looking for food. But Stanley’s belief in the link between external order and inner self-discipline has been confirmed recently in studies. In one experiment, a group of participants answered questions sitting in a nice neat laboratory, while others sat in the kind of place that inspires parents to shout, “Clean up your room!” The people in the messy room scored lower self-control, such as being unwilling to wait a week for a larger sum of money as opposed to taking a smaller sum right away. When offered snacks and drinks, people in the neat lab room more often chose apples and milk instead of the candy and sugary colas preferred by their peers in the pigsty.

In a similar experiment online, some participants answered questions on a clean, well-designed website. Others were asked the same questions on a sloppy website with spelling errors and other problems. On the messy site, people were more likely to say that they would gamble rather than take a sure thing, curse and swear, and take an immediate but small reward rather than a larger but delayed reward. The orderly websites, like the neat lab rooms, provided subtle cues guiding people toward self-disciplined decisions and actions helping others.

By shaving every day, Stanley could benefit from this same sort of orderly cue without having to expend much mental energy. Social psychology research would point out that his routine had another benefit: It enabled him to conserve willpower.

At age 33, not long after finding Livingstone, Stanley found love. He had always considered himself hopeless with women, but his new celebrity increased his social opportunities when he returned to London, and there he met a visiting American named Alice Pike. She was just 17, and he noted in his diary that she was “very ignorant of African geography, & I fear of everything else.” Within a month they were engaged. They agreed to marry once Stanley returned from his next expedition. He set off from the east coast of Africa carrying her photograph next to his heart, while his men lugged the pieces of a 24-foot boat named the Lady Alice, which Stanley used to make the first recorded circumnavigations of the great lakes in the heart of Africa. Then, having traveled 3,500 miles, Stanley continued westward for the most dangerous part of the trip. He planned to travel down the Lualaba River to wherever it led—the Nile (Livingstone’s theory), the Niger or the Congo (Stanley’s hunch, which would prove correct). No one knew, because even the fearsome Arab slave traders had been intimidated by tales of bellicose cannibals downstream.

Before heading down that river, Stanley wrote to his fiancée telling her that he weighed just 118 pounds, having lost 60 pounds since seeing her. His ailments included another bout of malaria, which had him shivering on a day when the temperature hit 138 degrees Fahrenheit in the sun. But he didn’t focus on hardships in the last letter he would dispatch until reaching the other side of Africa. “My love towards you is unchanged, you are my dream, my stay, my hope, and my beacon,” he wrote to her. “I shall cherish you in this light until I meet you, or death meets me.”

Stanley clung to that hope for another 3,500 miles, taking the Lady Alice down the Congo River and resisting attacks from cannibals shouting “Meat! Meat!” Only half of his more than 220 companions completed the journey to the Atlantic coast, which took nearly three years and claimed the life of every European except Stanley. Upon reaching civilization, Stanley got a note from his publisher with some awkward news: “I may as well tell you at once that your friend Alice Pike is married!” Stanley was distraught to hear that she had abandoned him (for the son of a railroad-car manufacturer in Ohio). He was hardly mollified by a note from her congratulating him for the expedition while breezily mentioning her marriage and acknowledging that the Lady Alice had “proven a truer friend than the Alice she was named after.” But however badly it turned out, Stanley did get something out of the relationship: a distraction from his own wretchedness. He may have fooled himself about her loyalty, but he was smart during his journey to fixate on a “beacon” far removed from his grim surroundings.

It was a more elaborate version of the successful strategy used by children in the classic marshmallow experiment, in which the subjects were typically left in a room with a marshmallow and told they could have two if they waited until the researcher returned. Those who kept looking at the marshmallow quickly depleted their willpower and gave in to the temptation to eat it right away; those who distracted themselves by looking around the room (or sometimes just covering their eyes) managed to hold out. Similarly, paramedics distract patients from their pain by talking to them about anything except their condition. They recognize the benefits of what Stanley called “self-forgetfulness.”

For instance, he blamed the breakdown of the Rear Column on their leader’s decision to stay put in camp so long, waiting and waiting for additional porters, instead of setting out sooner into the jungle on their own journey. “The cure of their misgivings & doubts would have been found in action,” he wrote, rather than “enduring deadly monotony.” As horrible as it was for Stanley going through the forest with sick, famished and dying men, the journey’s “endless occupations were too absorbing and interesting to allow room for baser thoughts.” Stanley saw the work as a mental escape: “For my protection against despair and madness, I had to resort to self-forgetfulness; to the interest which my task brought. . . . This encouraged me to give myself up to all neighbourly offices, and was morally fortifying.”

Talk of “neighbourly offices” may sound self-serving from someone with Stanley’s reputation for aloofness and severity. After all, this was the man renowned for perhaps the coldest greeting in history: “Dr. Livingstone, I presume?” Even Victorians found it ridiculous for two Englishmen meeting in the middle of Africa. But according to Jeal, Stanley never uttered the famous line. The first record of it occurs in Stanley’s dispatch to the Herald, written well after the meeting. It’s not in the diaries of either man. Stanley tore out the crucial page of his diary, cutting off his account just as they were about to greet each other. Stanley apparently invented the line afterward to make himself sound dignified. It didn’t work.

Vastly exaggerating his own severity and the violence of his African expeditions—partly to sound tougher, partly to sell newspapers and books—Stanley ended up with a reputation as the harshest explorer of his age, when in fact he was unusually humane toward Africans, even by comparison with the gentle Livingstone, as Jeal demonstrates. Stanley spoke Swahili fluently and established lifelong bonds with African companions. He severely disciplined white officers who mistreated blacks, and he continually restrained his men from violence and other crimes against local villagers. While he did sometimes get in fights when negotiations and gifts failed, the image of Stanley shooting his way across Africa was a myth. The secret to his success lay not in the battles he described so vividly but in two principles that Stanley himself articulated after his last expedition: “I have learnt by actual stress of imminent danger, in the first place, that self-control is more indispensable than gunpowder, and, in the second place, that persistent self-control under the provocation of African travel is impossible without real, heartfelt sympathy for the natives with whom one has to deal.”

As Stanley realized, self-control is ultimately about much more than the self. Willpower enables us to get along with others by overriding impulses based on selfish short-term interests. Throughout history, the most common way to redirect people away from selfish behavior has been through religious teachings and commandments, and these remain an effective strategy for self-control. But what if, like Stanley, you’re not a believer? After losing his faith in God and religion at an early age (a loss he attributed to the slaughter he witnessed in the American Civil War), he faced a question that vexed other Victorians: How can people remain moral without the restraints of religion? Many prominent nonbelievers, like Stanley, responded by paying lip service to religion while also looking for secular ways to inculcate a sense of “duty.” During the awful trek through the Ituri jungle, he exhorted the men by quoting one of his favorite couplets, from Tennyson’s “Ode on the Death of the Duke of Wellington”:

Not once or twice in our fair island-story,

The path of duty was the way to glory.

Stanley’s men didn’t always appreciate his efforts—the Tennyson lines got very old for some of them—but his approach embodied an acknowledged principle of self-control: Focus on lofty thoughts.

This strategy was tested at New York University by researchers including Kentaro Fujita and Yaacov Trope. They found that self-control improved among people who were encouraged to think in high-level terms (Why do you maintain good health?), and got worse among those who thought in lower-level terms (How do you maintain good health?). After engaging high-level thinking, people were more likely to pass up a quick reward for something better in the future. When asked to squeeze a handgrip—a measure of physical endurance—they could hold on longer. The results showed that a narrow, concrete, here-and-now focus works against self-control, whereas a broad, abstract, long-term focus supports it. That’s one reason religious people score relatively high in measures of self-control, and nonreligious people like Stanley can benefit by other kinds of transcendent thoughts and enduring ideals.

Stanley, who always combined his ambitions for personal glory with a desire to be “good,” found his calling along with Livingstone when he saw firsthand the devastation wrought by the expanding network of Arab and East African slave traders. From then on, he considered it a mission to end the slave trade.

What sustained Stanley through the jungle, and through the rejections from his family and his fiancée and the British establishment, was his stated belief that he was engaged in a “sacred task.” By modern standards, he can seem bombastic. But he was sincere. “I was not sent into the world to be happy,” he wrote. “I was sent for a special work.” During his descent of the Congo River, when he was despondent over the drowning of two close companions, when he was close to starving himself, he consoled himself with the loftiest thought he could summon: “This poor body of mine has suffered terribly . . . it has been degraded, pained, wearied & sickened, and has well nigh sunk under the task imposed on it; but this was but a small portion of myself. For my real self lay darkly encased, & was ever too haughty & soaring for such miserable environments as the body that encumbered it daily.”

Was Stanley, in his moment of despair, succumbing to religion and imagining himself with a soul? Maybe. But given his lifelong struggles, given all his stratagems to conserve his powers in the wilderness, it seems likely that he had something more secular in mind. His “real self,” as the Breaker of Rocks saw it, was his will.

Adapted from Willpower, by Roy F. Baumeister and John Tierney. Published by arrangement with the Penguin Press, a member of Penguin Group USA. © Roy F. Baumeister and John Tierney.