Babies as young as 6-months-old have proven to know the difference between good and evil, and a sense of moral code may even be instilled in the brain at birth, according to psychologists, the Daily Mail reported.

The view of many psychologists and scientists for years has been that parenting and environmental factors are what determine a person’s morals. The experiments conducted by the psychology department at Yale University showed that babies may already have a sense of right and wrong before it is introduced to them by their family.

One trial used puppets, where the “naughty” and unhelpful characters were rejected by the 6-month-old babies, and the “good” characters were embraced. When babies were told to take away treats from the “bad” puppets, they not only took the treats away, but smacked the puppet on the head.

“A growing body of evidence suggests that humans do have a rudimentary moral sense from the very start of life,” said professor Paul Bloom, a psychologist at Yale University in New Haven, Conn. “Some sense of good and evil seems to be bred in the bones.”

The results of the experiments showed that the infants overwhelmingly preferred the “good” and helpful characters to the villain puppets.

“This wasn't a subtle statistical trend; just about all the babies reached for the good guy,” Bloom said.

Click here to read more from the Daily Mail.