I think you have it backwards. They probably didn’t code in pain so much as they created a basic AI with learning capacity, and over the generations of robots and the AI learning it started emulating the pain it observes in biological life. Then they just never bothered to block it out of the code. As an example, the…