Artificial intelligence learns to spot pain in sheep