They may have a reputation as barnyard garbage disposals, but goats are intelligent animals, researchers say.

Goats are members of a diverse group of mammals called ungulates that includes several species known for their brainpower such as dolphins and elephants.

Goats recently proved they're worthy of such intelligent company, according to a joint study by scientists at Queen Mary University of London and the Institute of Agricultural Science in Switzerland.

Researchers suspected goats could be smarter than they seem for several reasons.

Goats live in complex social groups much like other intelligent animals, and they live an average of 15 to 18 years, giving them time to develop memories and skills.

And despite the misconception that they munch on tin cans, goats are fairly picky eaters. They eat around thorns and are selective about the plants they consume.

They're also experts problem-solvers when it comes to food. For example, in Morocco, goats are known to climb trees in search of a snack.

Researchers tested goats' abilities to solve puzzles for food by presenting the animals with the "artificial fruit challenge," a test where fruit is placed inside a box and can be reached only by completing a multistep task.

In the goats' experiment, the animals had to use their teeth to pull on a rope to activate a lever, and then lift the lever with their muzzles.

If they properly completed the task, they were rewarded with food that dropped out of the box.

Researchers attempted to teach 12 goats how to solve this puzzle, and nine of them mastered the task after just four attempts.

Ten months later, researchers presented the same nine goats with the food-box puzzle, and all of the animals were able to complete the task in under a minute.

"The speed at which the goats completed the task at 10-months compared to how long it took them to learn indicates excellent long-term memory," Elodie Briefer, lead author of the paper, said in a news release.

Researchers also tested a group of untrained goats to see if they could solve the food-box puzzle simply by observing the nine trained goats as they completed the task.

However, when given the opportunity to solve the problem themselves, the goats performed just as poorly as the goats who hadn't been trained at all.

In their paper, which was recently published in Frontiers in Zoology, researchers write that this could indicate that goats prefer to learn on their own, or it could mean the animals lack the ability to learn by observing others.

Related on MNN: