Goats may not deserve to be the butt of smart jokes after all. That's because a new study by researchers from Queen Mary University of London says the horned creatures are a lot more intelligent than many in the scientific community ever expected.

Writing in the journal Frontiers in Zoology, the scientists indicated goats showed an ability to learn how to solve complicated tasks quickly and then recall how to perform them for nearly a year afterward.

The research team set out to train a group of 12 goats to retrieve food from a box using a linked sequence of steps, first by pulling a lever with their mouths and then by lifting it to release the reward.

The study notes nine of the goats learned the task within 12 trials and then took less than two minutes to remember the challenge. The animals were tested on how much they retained, one month after the lesson and again at 10 months.

"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," study co-author Elodie Briefer, a research scientist with ETH Zurich in Switzerland, said in a news release.

Before each learning session, some of the goats were given the chance to watch another goat demonstrate the task, which didn't seem to affect the learning process, either way.

"We found that those without a demonstrator were just as fast at learning as those that had seen demonstrations," said Briefer. "This shows that goats prefer to learn on their own rather than by watching others."

The research marks the first time scientists have examined how goats learn the complex physical cognition tasks believed key in the way they adapt to harsh environments and are able to successfully forage for food in the often harsh wild.

"Our results challenge the common misconception that goats aren't intelligent animals. They have the ability to learn complex tasks and remember them for a long time," said Alan McElligott, another study co-author from Queen Mary's School of Biological and Chemical Sciences. "This could explain why they are so successful in colonizing new environments, though we would need to perform a similar study with wild goats to be sure."