You probably aren’t living in the moment. Most people spend their leisure time in imaginary worlds—reading novels, watching television and movies, playing video games and so on. And when there isn’t a book or screen in front of us, our minds wander.

This seems to be the brain’s natural state. Neuroscientists describe the brain regions involved in mind wandering as the “default network,” so-called because it’s usually humming along, shutting down only when something demands conscious attention.

How does all of this mind wandering affect our happiness? In an article published in Science, Matthew Killingsworth and Daniel Gilbert frame the question like this:

Many philosophical and religious traditions teach that happiness is to be found by living in the moment, and practitioners are trained to resist mind wandering and ‘to be here now.’ These traditions suggest that a wandering mind is an unhappy mind. Are they right?

Killingsworth and Gilbert used an iPhone app to collect data from over two thousand people. The app would prompt their subjects at random times to answer questions about their happiness (How are you feeling right now?”, from “very bad” to “very good”), about their ongoing activities (“What are you doing right now?”, with various options) and about whether their minds were wandering (“Are you thinking about something other than what you’re currently doing?”—and if they answered yes, they also reported whether their imagined experience was unpleasant, neutral, or pleasant.)

Consistent with previous studies, people reported mind wandering about half the time. Mind wandering was frequent for almost every activity they were involved in—the exception was “making love.” (Presumably these subjects waited until they were finished before answering the iPhone prompt.)

The novel finding was that the sages were right: People were less happy when their minds were wandering. In fact, whether or not they were mind wandering had more of an influence on their happiness than the activity they were actually involved in. As Killingsworth and Gilbert say in their title: A wandering mind is an unhappy mind.

It's not just daydreaming that makes us unhappy. Take another form of imaginative escape—the involuntary act of dreaming. The most common dream that people report isn’t anything enjoyable. It’s being chased.

Or consider the fictions we choose to engage with. Often these are positive, corresponding to events and experiences that we would enjoy in everyday life, sometimes by empathizing with an imaginary protagonist who is doing something pleasant. But many popular types of fiction correspond to experiences that are unpleasant or worse. Many of us are drawn to horror—to gruesome stories of zombies, cannibals, serial killers, torture chambers, and the like. Others prefer sadness—the young mother dying of cancer, the child with leukemia; stories of betrayal, loss, real human suffering. We pay for experiences that make us shudder and weep.

David Hume spoke of this “unaccountable pleasure” experienced by audiences of tragedies, and was savvy enough to point out that the negative emotions evoked by tragedy are a feature, not a bug: “The more they are touched and affected, the more they are delighted with the spectacle.”

It’s weird that our minds work this way. From an evolutionary perspective, you might expect that we would be driven to act in ways that have positive adaptive consequences, increasing our odds of survival and reproduction. But where’s the value in spending so much time thinking about unpleasant events that are not real?

Perhaps it’s an evolutionary accident. Our feelings can be insensitive to the difference between the real and the imagined. This is how pornography works—an image can evoke much the same response as the real thing. And so we might be captivated by horrible imagined events because thinking about actual horrible things is of obvious importance—if someone is plotting to kill you, it’s worth thinking about it, however unpleasant—and, to at least some extent, we treat the imaginary as if it were real.

But there might be something else going on. To give a sense of an alternative, think about the recent movie, “Edge of Tomorrow.”

It takes place in a near future in which the Earth is attacked by aliens. Tom Cruise plays a public relations officer with no combat experience who ends up engaged in battle, and is promptly killed. For reasons too complicated to get into here, he finds himself in a time loop, and is reborn before the battle begins, with memories of the events leading up to his death. He is able to learn from his past experience, and so he fights over and over again, getting better each time, until ultimately he defeats the aliens. The movie’s tagline is: Live. Die. Repeat.

The movie is essentially a depiction of a video game experience, where death returns you to a save point. The same idea is the theme of Groundhog Day, in which the character played by Bill Murray relives the same day, learning new skills, and ultimately becoming a better person. And it appeared earlier in the short 1904 book, “The Defence of Duffer’s Drift”, which tells the story of a young lieutenant responsible for defending a river crossing during the Boer War. His story is told as a series of dreams, beginning with a nightmare of military defeat. But in this next dream, he remembers the lessons of the last and does better, and then he dreams again, learning more, until he achieves victory in his final dream. The book was reprinted and used in military training for many years.

The experience of repeated failure is unpleasant, especially if you’re stuck in a time loop. But one can see how it would be an extraordinary power to repeatedly explore one’s options and learn from failure, with no real permanent consequences.

And this is what we do with our imagination. We use simulated worlds to prepare for the real one. In his book, “Why does tragedy give us pleasure?”, the critic A.D. Nuttall nicely summarized this view:

The human race has found a way, if not to abolish, then to defer and diminish the Darwinian treadmill of death. We send our hypotheses ahead, an expendable army, and watch them fall.

In earlier work, I called this the “safe practice” theory. It captures both the lure of the imagination and its negative tilt—we think about unhappy events because these are the events that we most need to prepare for. While we also have the capacity to conjure up enjoyable fantasies—and often do just that—we possess a grimly adaptive mental system that pushes us to think about worse-case scenarios, to obsess about failure and loss, driving us to ruminate about how we would cope if our futures went to hell. Live. Die. Repeat.