Teaching dogs to protect people and objects