Well, this is the point of my article. Once a machine is able to infer a self, it will also infer an other. This is at the heart of the splitting of reality into right/wrong, good/bad, safe/dangerous, just/unjust. Justice is a construct that has self as its foundation.
Pain is simply the perception of transducer outputs that correlate with damage to a system. A robot can, and does, have pressure sensors that can detect dangerous levels of pressure, for example. When interpreted as being pain experienced by someone, which is inevitable, then there will be an assessment that pain is bad and should be avoided at all costs. Suffering is the aversion to imaginary pain and the grasping at imaginary pleasure. Machine intelligence will suffer once it recognizes the mirage of self.
Hope is the same. Hope is based on the idea that there is something that is separate from what is happening and that what is happening can somehow be manipulated to make it whole. Hope is coupled with the self illusion. The self cannot perceive that nothing is happening and that what seems to be happening is already wholeness. This is why the self-illusion continually seeks and suffers.
When you mention pain, you may be thinking of emotional pain rather than physical pain. Emotional pain is simply signals from the specialized parts of the brain that are specialized to relating and socialization. That pain is related to the regulation of hormones and various chemical sensors. Robots can, and will, be equipped with limbic systems to make them better able to interact with humans, and so they will experience emotional pain as well.