One of the biggest problems in studying animal communication is figuring out whether the animals know what they are doing. A bird may screech and another bird may understand that the screech is a response to danger. But that doesn’t prove the screecher intended to warn others. It might have been a predictable but involuntary response to something scary, like a scream at a horror movie.

So scientists spend a lot of time testing animals in ingenious ways to figure out what might be going on. Three scientists testing wild chimpanzees in Uganda reported Wednesday in the journal Science Advances that chimpanzees can do something that previously had only been known in human beings. They change the way they are communicating to take into account what their audience knows.

Humans do this all the time. To a fellow baseball fan you might say, “So, there’s a runner on third, one out, bottom of the ninth, and McAfee hits a sac fly.” To someone from another planet, you might say, “There was a really exciting moment in a sporting event I was attending last night.” Or you might just forget it.

Catherine Crockford and Roman M. Wittig of the Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany, and Klaus Zuberbühler of the University of St. Andrews in Scotland were studying wild chimpanzees in Uganda, so the subject of their communication was snakes, not baseball. When a chimp saw a realistic model of a snake, the animal would make more sounds — called hoos — and make a greater effort to show where the snake was if it seemed that other chimps in the area were unaware of the danger. If it seemed other chimps already knew about the snake, it would make fewer calls and stay a shorter time at the danger.