Everybody’s got that one friend who just keeps making terrible choices. You can see the consequences a mile off; unfortunately, they can’t, and you know it. This concept—that we can anticipate other people’s beliefs or behaviors, even when we know they’re mistaken—seems uniquely human. Now Japanese researchers say apes can do it, too, albeit on a much simpler scale. They published their findings in the journal Science.

Your recognition of your friend’s thoughts, beliefs, and feelings is what’s called the Theory of Mind (ToM). Possessing an awareness of other people’s inner lives is a complex mental task, and for a very long time, scientists believed we were the only ones who could manage it.

But the more we learn about other animals’ brains, the more our certainty in our own supremacy unravels. The last few decades have shown us that other animals are indeed capable of all kinds of sophisticated thinking, from reading MRIs to fashioning tools. The idea that other animals might use ToM began to seem a little less far-fetched. Still, how would you test it?

Testing animal intelligence is tricky for a lot of reasons. First, it’s very hard for humans—even scientists—to set aside their human-centric perspective. This results in experiments that measure how well animals can act like people, which is definitely not the same as measuring their intelligence. Second, well, animals can’t talk, and while we’ve gotten pretty good at interpreting certain behaviors, that doesn’t mean we understand one another.

Fortunately, many of us have pretty good chimp and orangutan substitutes living right in our homes: little kids. Studies have found similar levels of intelligence in small children and non-human apes, which means that experiments that work with babies may translate well for our hairier cousins.

Because babies can’t tell us what they’re thinking, researchers let them show us instead, often using a technique called gaze tracking. Researchers show a baby something, whether that’s a puppet or her mom or a scary mask, then videotape the baby’s response to track where her eyes move. The idea is that the more strongly the baby feels about something, the longer she’ll look at it. Babies have no poker faces.

Animal behavior researchers have adopted gaze tracking for use with their own subjects and have taken it in some pretty interesting directions. Last year, Kyoto University’s Fumihiro Kano created the world’s first horror movies for apes, then watched the apes watching them. After repeated viewings, the apes apparently developed “favorite” moments and would pay even closer attention when they knew those parts were coming up.

For the latest study, Kano teamed up with researchers from the U.S., the UK, and Germany to determine if other primates could use ToM. They produced another series of short films featuring a human and an “ape,” King Kong (KK, actually a person in a gorilla suit), essentially messing with each other’s heads.

In one movie, the “person” hid an object in one place. Then KK came in and moved the object to a new hiding spot. In one version of the film, the person was there and watched KK hiding their stuff; in the other, KK was unobserved. Would apes who watched the second version of the movie expect the person to look for the treasure in their original hiding spot? In other words, could they anticipate that this deceived person would act like someone who’d been deceived?

Yep. This sneaky version of the story was shown to 22 different apes (a mixture of chimpanzees, orangutans, and bonobos). Of those 22, 17 stared at the original hiding spot when the person came onscreen to start searching. They could guess what the poor sucker was about to do.

Frans de Waal is a primatologist and a legend in the field of animal behavior. He was unaffiliated with the study, but praised it in an editorial in the same issue of Science. “This nonverbal paradigm is a genuine breakthrough not only because it avoids an undue reliance on language skills required to understand narrative and questions in theory of mind testing in children,” he wrote, “but also because it highlights the mental continuity between great apes and humans.”

Know of something you think we should cover? Email us at tips@mentalfloss.com.