But an octopus is almost nothing like a person. So how much can anyone really say with accuracy about what Heidi was doing?

When our two branches of the animal family tree diverged, backbones hadn’t been invented. Yet octopuses, cuttlefish and squid, on their own evolutionary path, developed impressive intelligence. They came up with their own way to build big brains. Much of an octopus’s brain is spread throughout its body, especially its arms. It makes sense to be cautious when we guess what’s going on in these animals’ minds.

Looking at a behavior like Heidi’s is “a bit like going to a crime scene,” said Nicola Clayton, a psychologist at the University of Cambridge who studies comparative cognition.

“You’ve got some evidence in front of you, but you’d need to know so much more to understand better what’s causing the behavior.”

It’s only conjecture to say the octopus is dreaming without more data, she said. Does the sequence of Heidi’s color changes match an experience she had while awake? Dreaming in humans mostly happens during rapid-eye movement, or R.E.M., sleep. Could we observe something similar in octopuses? Dr. Clayton points out that a human sleeper might flush red because she’s overheated.