Lizards, and perhaps other reptiles, may be more clever than we realize. In a new study, tropical lizards devised creative ways to get at a hidden treat of dead larvae, remembered them and adapted what they'd learned to continue snagging these baby-bug snacks.

"This is one more piece of the puzzle that can help us understand the evolution of cognitive abilities," said Duke University behavioral ecologist Manuel Leal, the lead researcher of the study. "We know a lot based on studies of birds and mammals, but there have been few studies on reptiles in general."

Flexible behavior — behavior that can be adapted to meet a particular situation — is associated with higher-level cognitive abilities; in other words, more smarts. Scientists have believed animals with complex social structures or with changing diets developed more flexibility, and possibly higher-level cognitive abilities, through evolution.

Most lizards, however, are territorial dwellers that live alone and munch on the same food year round, mostly insects, so it has been assumed that they, like other reptiles, have limited brain power and relatively fixed behaviors.

Leal and his colleagues gave six Anolis evermanni lizards from Puerto Rico a challenge: Snatch a dead insect larva hidden under a distinctively colored plastic disk. Four of the six lizards devised ways to remove the treat.

"Individuals solved this problem in different ways," Leal said. "Some will bite the edge of the disk. Others will use their snout as a lever."

When other disks of distinctly different colors were introduced, the four lizards continued to concentrate on the disk they were familiar with, most likely homing in on the colors. (Lizards' color vision is keener than our own.)

When the researchers put the treat under one of the other disks, two of the lizards figured out this switch and continued to locate the treats.

The lizards' performance was comparable to birds in similar studies, the researchers said, with one notable difference. Birds would perform the task multiple times in a day, but because lizards are cold blooded and don't get hungry as often, they completed only one trial per day — meaning that they had to remember their disk tricks from one day to the next.

The lizards' performance indicates that they, and perhaps reptiles in general, can learn relatively quickly, though they are slower moving than warm-blooded animals like birds. It also indicates that factors other than complex social structure and a diverse diet may influence the evolution of flexible behavior and more advanced cognitive ability, Leal said.

In looking at the evolution of cognition, scientists also need to look at other groups, like reptiles and fish, he said.

The study by Leal and Brian Powell, also of Duke University, is detailed this week in the Journal of the Royal Society: Biology Letters.

You can follow LiveScience senior writer Wynne Parry on Twitter @Wynne_Parry. Follow LiveScience for the latest in science news and discoveries on Twitter @livescience and on Facebook.