Your family recently adopted a dog from an animal shelter. Initially, the dog seemed nervous and territorial, but after a few weeks, she became affectionate and calm. Which of the following must play some role in the dog's behavior?