Just look at that clever critter, nose-diving into a city dumpster to scavenge for food. While that habit may have earned raccoons their “trash panda” nickname, it also indicates that they’re scrappy and adaptive—and those are traits that have intrigued researchers for decades.

Raccoons are very successful creatures; populations are growing even in the face of environmental change. That’s why Lauren Stanton, a Ph.D. candidate at the University of Wyoming, and the Animal Behavior and Cognition Lab, devised a series of experiments to test the cognition of these tricky trash pandas.

Remember the crow and the pitcher from Aesop’s Fables? In it, a thirsty crow happens upon a pitcher with water in the bottom. The crow can’t reach the water, so it drops pebbles in the pitcher to displace the water and bring it to the top. Stanton and her colleagues decided to try a version of the experiment with raccoons.

[In the urban jungle, it’s adapt or die.]

In order to test causal understanding, the researchers gave the critters different choices: Big or small stone; Solid object or hollow; Heavy or light. Stanton suspected the raccoons would act like other animals, but instead they simply picked up as many objects as they could, and dumped them into the tub all at once. “The raccoons were very flexible in the choices they made and I think that really speaks to the character of the raccoons,” says Stanton.

In another experiment, researchers observed how the creatures reacted when they encountered a puzzle box with several different latch mechanisms and food trapped inside. Researchers wanted to get an idea about the animals’ behavior flexibility, so they placed the box outside and waited to see how long it would take for them to open each of the different latches. Some raccoons chose not to participate, and some gave up after a few attempts. But one tenacious raccoon named Lemongrass not only figured out the puzzles, but would return to the puzzle box night after night and open every door. “It was pretty clear that she had solved this problem,” says Stanton.

In a third experiment that just launched last month, researchers tempted the raccoons with an automated feeder that dispenses food when the animals push the correct button. Researchers then switch which button dispenses the food and track how long it takes for raccoons to abandon their initial “correct” choice before changing tactics.

“Raccoons always seem to behave in ways that I don’t expect,” says Stanton. “I don’t know if I would call a raccoon a trash panda or a bandit perhaps. To a raccoon, they’re not being mischievous. They’re just being raccoons, they are just surviving and they’re thriving in these new environments that we’ve made.”

So, next time you encounter a raccoon rifling around in a dumpster, remember that it’s cognition, adaptability, and scrappiness at play—not just a pest.

Get science images that will blow your mind with our newsletter, Picture of the Week. Leave this field empty if you're human:

Credits Produced by Luke Groskin

Music by Audio Network

Article written by Johanna Mayer

Additional Footage ands Stills by Lauren Stanton, Rachel Fanelli, Wyoming Raccoon Project,

University of Wyoming Animal Behavior and Cognition Lab, Pond5, Lawrence W. Cole,

Yu-Yuan Chen (CC BY 2.0.),Brian Crockford (CC BY 2.0.), Youtube User Iv D. A. (CC BY 2.0.),

Youtube User Kings of the Road (CC BY 2.0.), Benjamin Ballerstein (CC BY 2.0.),

David Edgar Stahl (CC BY 2.0.), SMM Exhibits (CC BY 3.0),

Jelbert SA, Taylor AH, Cheke LG, Clayton NS, Gray RD (CC. BY 2.0)

Special Thanks to Lauren Stanton, Sarah Benson-Amram, Volcano, Hudson, Paprika, and Tarragon.