In Aesop’s fable “The Crow and the Pitcher,” a thirsty crow finds a pitcher with water that is just out of reach of the bird’s beak. The crow drops stones into the pitcher until the water rises high enough for the bird to drink.

Scientists first used the fable as a guide for an experiment in 2009. With rooks, they tested if the birds could actually figure out the stone dropping trick to make a treat rise to within reach. The fable has since guided other experiments, including ones with human children. Most recently, researchers at the University of Wyoming used it to better understand how raccoons think.

The raccoons confirmed what researchers already suspected — the animals really are quite clever. But they surprised the scientists with their level of innovation and resourcefulness — especially when marshmallows are involved.

The results were published last week in the journal “Animal Cognition.”

It was the first time researchers have used the fable to assess if mammalian carnivores understand the principles of water displacement. There has been little scientific research to assess raccoon intelligence, said Sarah Benson-Amram, a co-author on the paper and professor in zoology and physiology at the University of Wyoming.

“We went in with a very open mind, but we weren’t sure how they would engage with the task,” she said.

Researchers presented eight raccoons each with a tube of water with floating pieces of marshmallow, a favorite treat, just out of reach, said Lauren Stanton, a doctoral student at the University of Wyoming and lead researcher on the project.

The animals also were given stones. As expected, based on the previous studies with birds and children, the raccoons didn’t immediately pick up the stones and drop them in the tube. It took training. Researchers balanced stones on the tube rim with a treat on top. When the raccoons went for the reward, it knocked the stones in the water, which rose and brought the marshmallow closer.

Two of the raccoons learned to pick up the stones and drop them in the water to bring the treats within reach, but one invented a whole new method to get its marshmallow.

The tubes were designed with an almost 25-pound flat base so the animals couldn’t tip them over. But one crafty critter discovered that if it climbed up the tube, wrapped its body around the contraption and rocked back and forth, it could eventually tip the whole apparatus over and easily get its marshmallow.

The two raccoons that figured out they needed to drop stones into the tube, also surprised researchers. The animals were given balls that floated and some that sank. Researchers figured the animals would realize the sinking balls brought the water levels up and the floating balls were useless. Instead, when the raccoons dropped a ball into the tube only to find it floated, the animal would push it up and down to create waves that propelled the marshmallow up the side of the tube where they could scrape it out.

“They figured out a way to make a nonfunctional object functional for them,” Stanton said.

It was a scenario she hadn’t expected because it hadn’t occurred in previous studies with kids and birds.

The unexpected problem-solving skills show how the animals engage with the world, Benson-Amram said.

“That is probably indicative of a level of intelligence,” she said.

Raccoons are adaptable, Stanton said. Many animals are struggling with increased urbanization and climate change. “But raccoons are actually thriving and seem really good at living alongside humans,” Stanton said.

Benson-Amram said she’d like to conduct the study on other animals closely related to raccoons and see how the results and behaviors differ, particularly with animals that aren’t as good at adapting to urban environments.

Stanton is now testing wild raccoons by leaving puzzle boxes with a food reward around Laramie. Night vision cameras surrounding the boxes will allow her to better understand how raccoons solve problems — like opening a box to get a treat — in the wild.

The current research, as well as the Aesop experiment is also meant to help people better understand and learn to live with raccoons, Stanton and Benson-Amram said.