A new study from the University of British Columbia suggests babies as young as eight months old love to see bad guys get punished and good guys rewarded.

The researchers say that their findings suggest that even infants have the instinct to distrust those who might try to trick us or put us in danger.

For the study, Prof. Kiley Hamlin from the UBC department of psychology worked with a team that brought together 100 babies, breaking them into age groups and presenting them with scenarios using animal hand puppets.

The eight-month-olds watched one scene in which a yellow duck struggles to open a box that had a rattle inside. A friendly elephant wearing a yellow shirt helps out, and the duck then takes the toy.

The scene then plays out a second time, but this time, another elephant in a red shirt slams the lid of the box down as the duck struggles to open it.

The "good" and "bad" elephants were then either rewarded with a ball from a moose puppet, or punished by having a ball taken away from them.

The babies were then offered the moose puppets that doled out the reward and punishment. The babies seemed to prefer the puppets that mistreated the bad characters from the original scene, compared to those that treated them nicely.

It didn't matter if the babies were girls or boys; they preferred puppets that mistreated the "bad" puppets.

The researchers also looked at how older infants would themselves treat good and bad puppets. They tested 64 babies aged 21 months who were asked to give a treat to, or take a treat away from, one of two puppets. One of the puppets had previously helped another puppet, and the other one had harmed the other puppet. These older babies physically took treats away from the "bad" puppets, and gave treats to the "good" ones.

Hamlin says previous research has shown that babies uniformly prefer kind acts, but these new experiments suggest that even infants like it when bad guys are punished.

The research appears in the Proceedings of the National Academy of Sciences.

"We find that, by eight months, babies have developed nuanced views of reciprocity and can conduct these complex social evaluations much earlier than previously thought," Hamlin, who co-authored the study with colleagues from Yale University and Temple University, said in a news release.

Hamlin says the infant responses may be early forms of the complex behaviours and emotions that get expressed later in life, such as the relief people feel when movie villains get their due, and the phenomenon of people cheering at public executions.

While such tendencies are surely taught and learned as well, Hamlin says the fact that they are present so early in life suggests that they may be part of our innate makeup.