After years of living around humans, goats may have learned to read and respond to facial expressions, a new study said -- and they seem to like happy people better.

That kind of emotional intelligence is often talked about with cats and dogs, but the researchers in this study, published in the Royal Open Society, wanted domesticated goats to live their best lives, too.

"There are hundreds of millions of these animals and they deserve to get the best possible care that we can give them," lead researcher Alan McElligott, professor at University of Roehampton, told ABC News.

The research team initially started working with 35 goats, but some didn't want to follow the plan. Fifteen of the goats could not be trained to walk across their enclosure for the facial recognition tests. The remaining 20 goats used in the study were able to go from one side of their enclosures to the other.

The researchers introduced photographs for the goats to view, McElligott said, then recorded their reactions.

'If they have animals like that, that they will realize that they are not stupid,' he said. 'These animals are interesting. They are quite clever and hopefully [they

They measured three things: The kind of faces that the goats viewed, how they interacted with the faces and the amount of time the goats spent looking at the faces.

"We tested the goats with photographs, black and white photographs, either a woman or a man with an angry face or a happy face," McElligott said. "And the goats were released on one side of a small enclosure a few meters across and they had to go across the enclosure."

About 52 percent of the goats studied went to the happy face and about 30 percent first looked at the angry faces and some didn't choose either expression. There didn't appear to be any distinction between the men and women.

"Not only can they distinguish them, but they also generally prefer happy faces, regardless of the gender of the human faces or the sex of the goats,” read the study published on Royal Society Open Science.

"These findings suggest that the ability of animals to perceive human facial cues is not limited to those with a long history of domestication as companions, and therefore may be far more widespread than previously believed,” the study said.

McElligott, who has been studying goats for more than eight years, hopes that the research can improve public perceptions about animals "by showing that these animals are really sensitive to information around them, whether it be human faces [or something else]."

"If they have animals like that, that they will realize that they are not stupid," he said. "These animals are interesting. They are quite clever and hopefully [they] give them better conditions in which to live."

The research team is continuing further research, they said, to find "other ways that goats might communicate with humans."