Earlier this month, under the cover of night, an octopus named Inky hauled his basketball-sized body out of the tank he shared with a companion at the National Aquarium of New Zealand, heaved himself across the floor, and squeezed his gelatinous mantle into a narrow drain leading to the Pacific Ocean. It was an escape story fit for a Pixar film, and the Internet responded with corresponding glee. One Twitter user hailed Inky as “the world’s greatest hero,” while another warned that “we're about to be slaves to our new great leader, #Inky.” Comparisons to El Chapo and “The Shawshank Redemption” were made. At Vice’s Motherboard, one writer even created a work of Inky fan fiction, imagining the cephalopod free but heartbroken at being separated from his tank mate, Blotchy. “He felt the joy of a mollusc reborn,” the story goes, imagining the moment when Blotchy escapes to meet Inky in the ocean. “They would live out their days in briny bliss, free from the tank that bound them!”

Part of the fun of the Inky story, like that of the Pizza Rat and the escaping llama duo before him, is indulging in a bit of knowing anthropomorphizing: animals, they’re just like us! In the case of octopuses, this pleasure is especially pronounced, because the creatures’ great intelligence comes packaged in bodies so vastly different from our own. How is it that an eight-tentacled sea alien can open jars and recognize faces? Octopuses have been observed moving around the ocean floor carrying cracked coconut shells, which they close around themselves as portable armor. They exhibit sophisticated play behavior, blowing objects around in the water and even fiddling with Legos.

Attributing human-like behaviors to animals is often thought of as unscientific, but in a new book on animal behavior, “Are We Smart Enough to Know How Smart Animals Are?,” the Dutch primatologist Frans de Waal argues that it is not, in fact, anthropomorphizing but its opposite—an unwillingness to recognize the human-like traits of animals, or what he terms “anthropodenial”—that has too often characterized our attitudes toward other species. Analyzing decades of animal-cognition research, he shows that, with the exception of full-fledged language, animals have been shown to exhibit many of the key behaviors that were thought to distinguish humans from animals: the ability to consider the past and the future, to demonstrate empathy and self-awareness, and to anticipate the motives of others. Crows can recognize human faces and even hold grudges against the biologists who capture and tag them; orcas use highly coördinated synchronized swimming to push seals off ice floes and into the water; a sea lion at a Santa Cruz lab learned, like a fledgling math student, to associate symbols, figuring out that if A goes with B and B goes with C, then A and C belong together as well. Animals, in other words, are far smarter than we’ve been giving them credit for.

Anthropodenial, in de Waal’s view, is a relatively modern phenomenon. In medieval and early modern Europe, the animal mind was considered sophisticated enough that errant dogs, pigs, and other domesticated animals could be put on trial for crimes. In one famous case, in fifteenth-century France, a sow and several piglets were charged with killing a child; the piglets were acquitted, but their mother was sentenced to death and hanged. As recently as the nineteenth century, many naturalists sought out the connections between human and animal intelligence. “The difference in mind between man and the higher animals, great as it is, certainly is one of degree and not of kind,” one Victorian-era naturalist wrote. And this was no pig-prosecuting crackpot; it was Charles Darwin.

The advent of behaviorism, in the twentieth century, with its Pavlovian emphasis on conditioning through reward and punishment, shifted public views of animal intelligence. “I love the history of my field,” de Waal writes in his book’s prologue, but, for most of the twentieth century, “the two dominant schools of thought viewed animals as either stimulus-response machines or robots endowed with useful instincts.” Anyone who thought about animals having internal lives was dismissed as “anthropomorphic, romantic, or unscientific.” It is perhaps no accident that this shift occurred during the same century that saw humans blazing through animal habitats at unprecedented rates, polluting the land and water, and developing farming methods remarkable in their cruelty and efficiency. Thinking of animals as insentient automatons may make it easier to stomach breeding chickens so breast-heavy that they can’t stand up, or keeping social animals, such as orcas, isolated in tiny corrals.

Happily, de Waal believes that we are starting to emerge from this dark period and learning to think of animal intelligence on a continuum with that of humans. “The times are changing,” he writes. “Everyone must have noticed the avalanche of knowledge emerging over the last few decades, diffused over the Internet. Almost every week there is a new finding regarding sophisticated animal cognition.” The most effective tests of animal intelligence, he argues, are designed according to a species’ particular traits and skills. Squirrels may fail at memory tasks that are important to humans, but, whereas we need apps to help us find our misplaced cell phones, they can remember where they’ve hidden tiny caches of nuts. In her 2015 book “The Soul of an Octopus,” the naturalist Sy Montgomery points out that if an octopus were to measure human intelligence, it might test us on the number of color patterns we can produce on the skin of our (pathetically few) appendages. Seeing us flunk the test, it might conclude that we are pretty stupid.

In the course of her investigations, Montgomery spent years visiting the octopuses of the New England Aquarium and learned to scuba dive so that she could observe their cousins in the wild. In the process, she became positively smitten. She writes of being dazzled by the animals’ strength and strange beauty; she wants to commune with them, longs for them to recognize her when she visits their tanks, and lets them “taste” her skin with their chemoreceptive suckers. The octopuses she meets and learns about have personalities—they are shy or playful, cantankerous or sneaky. They crave attention; they play with toys; their skin, when petted, “relaxes into a caress.” One was discovered to be creeping out of his tank in the night to hunt and eat the flounder in a nearby tank, only to return home by morning. At times, Montgomery seems far out in her identification with the creatures: “If I have a soul—and I think I do—an octopus has a soul too,” she writes. But, like de Waal, she’s more concerned about the consequences of anthropodenial. “It’s easy to project our own feelings onto animals—and that’s a mistake,” she told me, “but it’s a worse mistake to think that we are up on some kind of pedestal and that animals can’t also think, feel, and know.”

One can remain agnostic on the question of cephalopod souls and still feel awed by the wherewithal involved in Inky’s jailbreak. De Waal, who directs the Yerkes National Primate Research Center, at Emory University, told me that he remains “a bit skeptical” of the story’s happy ending. It’s not uncommon for an octopus to escape from its tank. But to figure out how to make it to a drain leading to the ocean? “That would be wonderfully intelligent, if he knew what he was doing,” he said. He wonders if perhaps aquarium spin doctors are being overly optimistic in assuming that Inky made it back to the ocean. But he is aware of the power of viral stories like Inky’s to fuel appreciation of animal intelligence. More than a decade ago, he and his team ran an experiment to test whether capuchin monkeys can experience envy. When the researchers rewarded their subjects with either cucumbers (a well-liked monkey food) or grapes (an even better one), the animals given cucumbers shrieked and raged at seeing their peers get the superior treat. The study was published in Nature, in 2003, presenting the team’s carefully collected and compiled data. But what really convinced people of the findings was a video of the monkey subjects, produced ten years later. “It’s just a one-minute clip, but it shows the emotions, and the body language, and people are much more convinced by the emotions than by the actual data,” de Waal said. Just one of the oddities of our particular kind of animal mind.