Whether or not a dog likes you cannot be truly proven, and is more of a subjective query. A dog cannot really like or dislike a person. They can trust or not, they can be loyal or not, dominating or not, and such things, but “like” is an extremely opinionated term.
There are four principles at work in evolution—variation, inheritance, selection and time. These are considered the components of the evolutionary mechanism of natural selection.