There’s nothing quite like coming home to a wagging tail and dog smooches after a long day of work, but what makes our dogs love us so?

» RELATED: 7 dog hacks for pet parents in the city

According to a new study published in the journal Science Advances, it's literally programmed into their genes.

Researchers at Princeton University compared the sociability of 18 domesticated dogs with the sociability of 10 wolves raised by humans and found dogs to be more social, though both were good at problem-solving.

» RELATED: Couple reunited with lost dog nearly 3 years later

After examining the genetic makeup of both the dogs and wolves, along with data of other dogs and wolves, the researchers found genetic variants may explain why Fido has so much love to give.

In humans, the deletion of genes GTF21 and GTF2IRDI causes Williams syndrome, a developmental disorder of the mind that can alter facial features, lead to intellectual disability and cardiovascular problems.

» RELATED: Dog turns hero, rescues fawn

Humans with Williams syndrome also have a tendency to be more outgoing and overtly friendly to everyone.

And hypersocial dogs in the study that carried the same mutation leading to Williams syndrome in humans appeared to pay more attention to humans than those without.

» RELATED: Atlanta labradoodle named one of America’s ‘dogs who change the world’

The research supports the hypothesis of the “survival of the friendliest,” according to Bridgett vonHoldt, lead author and evolutionary geneticist at Princeton University.

“This is another piece of the puzzle suggesting that humans did not create dogs intentionally, but instead wolves that were friendliest toward humans were at an evolutionary advantage as our two species began to interact,” she said.

» RELATED: 7 ways to protect your dog from heat stroke and hyperthermia

"We're not saying we have found the mutation that controls sociability," vonHoldt told the Verge.

There are a multitude of genes in the genome and there are probably several that contribute to dog behavior, she said. And genes aren’t deterministic, meaning a huge factor in determining dog behavior (including friendliness) is how it was raised.

“The story is far from complete,” she said.

Read the full study at advances.sciencemag.org.