Why play? Childhood and play go together, and most parents and teachers have a vague intuition that play is a Good Thing. But if play really makes you smarter, or more focused, or more empathic, why not just aim to be smarter or more focused or more empathic directly? Why go through the elaborate detour of play?

So in spite of this intuition, time to play is increasingly under pressure, especially when parents and policymakers lean on children to “perform” even in preschool. And, in fact, there is not much evidence that play makes children do better on IQ measures or academic tests.

Young human beings play, but so do young chimps, wolves, and dolphins, rats, crows, and even octopuses. From an evolutionary perspective, play is ubiquitous; surely it must be doing something important. Play is especially common in social animals with relatively long childhoods, lots of parental investment, and large brains—animals like us. Almost any animal with a long childhood spends a lot of that childhood playing.

What exactly is play, anyway? Biologists who try to define animal play point to five distinctive characteristics. Play is not work. It may look like fighting or hunting, digging or sweeping, but it doesn’t actually accomplish anything. The kitten doesn’t really eat the string, the fledgling crow who plays with a twig doesn’t dig out any insects, and the wrestling rat doesn’t actually hurt his brother, just as playing house doesn’t leave the living room any neater—quite the opposite, in fact.

But play isn’t just incompetent work; it also has special characteristics that let you distinguish it from the real thing. When rats play fight, they nuzzle each other’s necks; when it’s for real, they bite each other’s flanks. When children pretend to pour tea, they make big exaggerated sloshing movements.

Play is fun, even for animals. Babies giggle contagiously over peek-a-boo and rats laugh when they play fight, making a distinctive ultrasonic chirp.

Play is voluntary. It’s something that an animal does for its own sake, not because it’s instructed to do it or rewarded for doing it. In fact, young rats will actually work in order to get to play—they will learn to press a bar that lets them play. But play is not like other basic drives. Animals only play freely when their other basic needs are satisfied. When an animal is starved or stressed, play diminishes.

Play has a special structure, a pattern of repetition and variation. When rats play fight, they try different patterns of offense and defense against each other. When a six-month-old plays with a rattle, she tries shaking it louder or softer, banging it against the table with more or less vigor.

What does this distinctive activity do for animal minds and brains? Robotics may have an answer. Suppose you’re trying to make a robot that will be able to adjust to an ever-changing world, the way that animals and people do. What should you do?

Designing a robot that does just one thing, like walking, is relatively easy. Designing a resilient robot that can adapt to new circumstances is much harder. What happens if you turn the walking robot on its side, or even take off a limb? Living things can fluidly adjust to changes like these. Think about how a wounded soldier can learn to walk and even run on an artificial leg. But it’s much harder for robots.

The computer scientist Hod Lipson at Cornell gives his robots a chance to play—to randomly try out different movements and work out the consequences. A Lipson robot started out by dancing around in a silly, random way before it tried to do anything useful. But, afterward, it could use the information about its own body that it collected in the playful dancing phase to decide how to act when unexpected things happened. It could still walk even when the engineers removed one of its robotic limbs. That first apparently useless playful dance made the robot more robust later on.

The same picture emerges from studies of rat brains. Sergio Pellis and his colleagues compared rats who got a chance to play when they were pups, and those who didn’t.  The play-deprived rats could perform the same actions as the other rats. But they didn’t know when to do what. Whether they were fighting or courting, they couldn’t react in the swift, flexible, and fluid fashion of the roughhousing rats. And their brains were less “plastic,” less able to rewire with new experiences.

The robots and rats may give us a clue about child’s play, too. Play lets the young learn by randomly and variably trying out a range of actions and ideas, and then working out the consequences. It might be a young rat trying different modes of attack and defense, a fledgling crow turning the stick upside down and right-side up, or a baby banging her rattle in many different ways. The positive consequence is that animals who play are better at generating new possibilities.

In the distinctively human activity of pretend play, the experimentation is more internal. Children who pretend, and grown-ups who immerse themselves in the imaginary realms of fiction and drama, are considering what would happen if the world were different, and working out the consequences. My former student Daphna Buchsbaum, now at the University of Toronto, and I, along with several colleagues, found that preschoolers who pretended more were better at “counterfactual” reasoning–figuring out what could have happened, but didn’t.  They were no smarter overall and no better at an “executive-function” task, but they were more likely to imagine other ways the world might be.

The very silliness of play, the apparently random weirdness of it all, is what makes it so effective. Lipson could have tried to anticipate what his robot offspring should do in every situation, as we are tempted to do with children. But that would only give them information about what to do when the expected happens. The gift of play is the way it teaches us how to deal with the unexpected.

That may also help explain another puzzling fact about play. Why is play fun? It’s easy to learn that a goal-directed action is worth doing—after all, we reach the goal and get rewarded. But how do you ensure that an animal or a child will be able to deal with a situation that evolution hasn’t anticipated beforehand? We all perpetually face the unexpected, whether it’s a busted knee, like the robot, a new wrestling move, like the rat, or any of the psychological surprises our fellow humans throw at us. Motivating a robot or an animal or a child to play— giving them a chance to explore widely, act randomly, be silly, and do things for no reason at all—is the solution. But to do that, you need to make exploration enjoyable for its own sake, independent of any particular outcomes. We don’t play because we think that eventually it will give us robust cognitive functions—although that may be the evolutionary motivation for play. We play because it is just so much fun, just as the evolutionary imperative of reproduction leads us to enjoy sex for its own sake.

There is a notoriously Puritan streak in American culture. We have a knack for taking what are simple pleasures in other cultures, from food to walks to sex, and turning them into strenuous work projects. We follow a Mediterranean diet instead of just eating spaghetti and tomatoes, take aerobic hikes instead of after-dinner promenades, and practice The Joy of Sex instead of, well, the joy of sex. So American parents often act as if play is only valuable if it will produce predictable outcomes.

This isn’t just true about our attitude toward child’s play. We also tend to treat adult play—sport or art or science—as a disguised form of work, something that only has value because it eventually leads to some practical end—physical health or moral uplift.

The irony is that over the long term, both children’s and adults’ play does lead to practical benefits. But it does this precisely because the people who play, whether they are children or adults, aren’t aiming at those practical benefits. The fundamental paradox of play is that in order to be able to reach a variety of new goals in the long run, you have to actively turn away from goal seeking in the short run.

Just as we should give children the resources and space to play, and do so without insisting that play will have immediate payoffs, we should do the same for scientists and artists and all the others who explore human possibilities.

There is good reason to think that play helps us learn. But another part of the evolutionary story is that play is a satisfying good in itself—a source of joy for parents as well as children. Caring for children is hard work, getting the chance to play again is one compensation. If it had no other rationale, the sheer pleasure of play would be justification enough.

This article is excerpted from Alison Gopnik’s book, The Gardener and the Carpenter.