Teaching dogs to become the best guard dogs