Using a brain-inspired approach, scientists from Nanyang Technological University, Singapore (NTU Singapore) have developed a way for robots to have the artificial intelligence (AI) to recognize pain and to self-repair when damaged.
source https://techxplore.com/news/2020-10-scientists-mini-brains-robots-pain-self-repair.html