In J. M. Barrie's classic stage play, Peter Pan, the Darling children embark on an adventure with Peter, a puckish young boy who refuses to grow old. In magical Never Land they meet fairies, battle pirates and encounter mystical creatures. The tale, which has inspired youngsters for generations to play similar games, seems to hint that one can remain young at heart forever by indulging in the wonders of imagination.

Nearly all children enjoy getting lost in fantastical worlds. But why they use their imagination so much is a question that has puzzled scientists studying human behavior for decades.

In the early 20th century psychologists suspected that imaginative activities were frivolous—fun but without any real purpose. Kids, they reasoned, would need to leave fantasy behind to fully develop into mature thinkers. More recently, a different viewpoint has emerged. Far from being useless, play is now seen as crucially important for children's development. When kids play, for instance, they can reenact events that scared or confused them as a way of making sense of these experiences. Through the scenarios presented in stories and embodied in play, youngsters learn about the world around them and explore their own place within it. Today advocates for “free play” argue that unstructured time for imaginative activities can help kids be happier and more creative and sociable.

In one particular area, however, imaginative play has seemed unhelpful: education. Decades of research have shown that for the purposes of instruction, the context for learning something new should be as similar as possible to the situation in which we apply it. By this logic, make-believe is best for learning when it is as true to life as possible. For example, in a 1989 investigation of hospitalized children at a Scott & White Clinic in Texas, children who engaged in therapeutic play, such as role-playing with medical scenarios and props, showed fewer hospital-related fears than those who engaged in other kinds of play.

It is easy to see how playing doctor might be useful for learning information about the body or health care. What has been less clear is whether a child gains anything by pretending to be a mermaid or superhero. But a new line of research suggests that such whimsical moments may, in fact, have educational value. Psychologists are finding that unrealistic situations can be surprisingly good for helping children learn. As evidence accumulates, it could lead to new approaches in early education that incorporate elements of fantasy—and may eventually illuminate the benefits of adult immersion in fictional worlds.

Dragons vs. Ducks

In 2015 my colleagues and I published a study in which we enrolled 154 children from low-income preschools in a two-week educational program. We read half of them realistic books on themes such as cooking and farming and the other half fantasy stories with elements such as dragons and castles. In the course of reading, we also taught the children new vocabulary.

After each reading session, we gave the students the opportunity to engage in pretend play with toys that represented characters or objects in the books. For example, there were shovels and ducks for the realistic books and swords and dragons for the fantastical ones. We tested their knowledge of the new words before the start of the program and after it ended, allowing us to measure how much knowledge the preschoolers had gained from these activities.

Overall, the program was a success. Both groups learned the new words that we taught. But kids who heard the fantastical stories were better able to tell researchers about the meanings of the new words than those who had heard realistic tales, showing important growth in their productive vocabulary.

Admittedly, each group was exposed to different words, so it is possible that something about the vocabulary in the fantasy tales was of higher interest than the other new words, but a study from another research team hints that we have stumbled on a broader pattern. In findings presented at the 2013 Biennial Meeting of the Society for Research in Child Development, Emily Hopkins and Angeline Lillard, psychologists at the University of Virginia, reported on having read 100 children different kinds of stories, one-on-one. In each narrative, the protagonist was faced with a problem. For instance, a female character needed to get food into a dog's bowl on the other side of a fence with slats too narrow for her hand. She solved the problem by rolling newspaper into a tube, slipping it between the slats and passing bits of kibble through the tube, one at a time, into the bowl.

As in my study, some of the kids heard about a problem and solution in the course of a realistic story. But another group heard about the problem and its solution in the course of a narrative that incorporated some violations to the laws that govern reality, such as characters who could fly or walk through walls.

After telling the children the story, experimenters presented them with a real-world analogue of the problem: they needed to move some marbles into a bowl that was placed inside a box with narrow slats. The subjects received a variety of materials for solving the problem. Some were irrelevant, but others could be used to re-create the solution in the story. For instance, one of the materials was a magazine they could roll into a tube, just like the fictional character had done with a newspaper. Children who had heard the fantastical tale were more likely to transfer this solution from the story to reality than those who had heard the realistic one.

Explaining the Impossible

These studies reveal that fantasy can help children learn but do not explain why an unusual context would be better than a realistic one in helping kids acquire real-world knowledge. A possible explanation emerges when we consider research with infants.

Recent work by Aimee Stahl and Lisa Feigenson, both psychologists at Johns Hopkins University, suggests that the fantasy advantage may have its roots in very early development. In a 2015 study, they tested the ability of 110 11-month-old infants to learn while watching a simple series of actions take place on a small stage in front of them, such as a ball rolling down a slide. In one scenario, half of the infants saw an ordinary event: the ball rolled down the slide and was stopped at the bottom by a wall. The other half saw the ball roll down the slide and then appear to roll through a solid wall before stopping at the bottom. (Similar magic tricks have been used extensively in developmental psychology studies, and even very young babies know that the first kind of event is ordinary and that the second kind is surprising.)

Next the infants observed a demonstration that revealed the ball's hidden property—that it squeaked when shaken. Researchers then tested the infants' memory for this property by showing them the ball and a new object and moving both while playing the squeaking sound. The simultaneous motion made it unclear which object was making the sound.

Babies who had seen the ball magically disappear looked more at it when presented with this test than infants who had seen the toy roll to a stop at the wall. In other words, the infants who had just seen an impossible event were more attentive to the squeaky ball, which suggests that they had absorbed the lesson of which toy squeaked—just as youngsters seemed to learn more from a fantastic story rather than a realistic one.

In the same study, Stahl and Feigenson further found that infants would investigate the aspect of an object that had just violated their expectations. For instance, when they played with a car they had previously seen floating in midair, they tended to drop it, as if to test its response to gravity.

These situations suggest that these infants were especially attentive to the source of the violation and open to receiving new information about it. If this is the case, then fantasy helps children to learn because it engages their full focus and attention in a way that reality does not. This interpretation is based on the mise en place theory, which my colleagues and I proposed in 2014. It describes the way in which aspects of the environment set the stage for particular kinds of thoughts and behaviors. When the environment is realistic, children know that they should not expect anything out of the ordinary and can proceed as usual. But fantastical scenarios signal that kids need to pay attention because things in that environment do not necessarily follow the typical script. As a result, children feel drawn to engage more deeply, mentally preparing them to learn in a more focused way.

The attention infants gave to the ball hints at a second reason for fantasy's power in learning. Surprising and unrealistic scenarios may require us to try to make sense of what has just happened. Along these lines, a 2010 study by Cristine Legare of the University of Texas at Austin and her colleagues involved teaching 80 preschoolers about special machines and objects, each with a unique purpose. Then, during a test trial, one of the objects worked as expected (for example, a “starter” object caused a machine's lights to turn on, just as it should), and one of the objects did not (a “do-nothing” object, which ought to have no effect, also turned the light on).

When asked to talk about what had happened during the trial, the children chose to explain the unexpected outcome first. The strange situation seemed to trigger a need to understand what had happened and to seek additional information. In other words, the unexpected scenario was especially ripe for learning.

This study suggests that perhaps unrealistic scenarios help children see the possibilities inherent in reality. As University of California, Berkeley, psychologist Alison Gopnik and I proposed in 2013, fantasy may facilitate learning in the same way that baby talk fosters speech. We do not talk to babies in an exaggerated, high-pitched way because that is how we want them to speak. Rather baby talk highlights important aspects of speech, such as word boundaries, and helps infants to zoom in on key elements of language. It is therefore possible that when children seek out impossible events, it is not because they use them as a direct guide to reality. Instead thinking about unrealistic possibilities can help create informative contrasts with how reality does and does not work, bringing to light the structure of the real world.

Tapping the Power of Fantasy

Naturally, the results from this small set of studies do not negate the body of previous work showing that similarity is helpful for learning and transfer of information. Similarities between educational and real-world contexts do enhance learning.

There are even a few cases where fantasy may backfire and send a mixed message. A 2014 study by University of Toronto psychologist Patricia Ganea found that preschoolers who heard stories with anthropomorphized animals were left with less realistic expectations about the mental states of these creatures as compared with children who had heard realistic tales. Although the kids in the former group seemed to understand that birds and rodents cannot talk, they were more likely than the latter group to extend humanlike characteristics to the way these animals could think and experience the world.

Nevertheless, the new findings hint at the fact that we have too long underestimated the power of a child's flights of fancy. And there could be educational contexts that are particularly ripe for the fantasy advantage. Much of physics, for instance, relies on testing the natural world's limits. Children and infants alike are captivated by an object's ability to seemingly defy gravity. And imaginative thinking is requisite for older students grappling with complex scenarios such as particles invisible to the naked eye that might travel at nearly the speed of light.

In fact, reality is often unintuitive, forcing scientists to grapple with unlikely possibilities for how the world works. Fictional worlds that bear less resemblance to reality may help throw reality into sharper relief, making it easier for children to understand and hence learn new information.

In the meantime, parents and teachers can encourage children's engagement with fantasy. If, as our research is finding, fantastical elements are especially helpful to learning, it could encourage children's fantasy-based play and provide them with stories that deliberately break the laws of reality. It may also be useful to nudge kids to notice the impossible aspects of these games and stories; getting them to understand what can and cannot happen in reality may set the stage for future learning. Children's attraction to superheroes, dragons and wizards offer perfect opportunities to ask young learners: “Could dragons be real?” or “What would happen if you could become invisible?”

It may be too soon to speculate on how fantasy's educational power plays out in older children or adults, but it certainly seems likely that the same advantage would remain to some degree. Literature that takes place in fantastic landscapes can help us think deeply about our own world. Consider the science fiction of Ursula K. Le Guin, whose book about a planet without gender prompts us to rethink our assumptions about men and women. And counterfactual history books can make us reconsider present circumstances by inviting us to reimagine the past. These texts demonstrate how fiction canbring unique insights and may even inspire new solutions. Ultimately a little fantasy could do us all a lot of good.