I have placed small aluminum foil tabs on various lego bricks in my lego NXT robot. When the bricks are properly seated the tabs make good contact. When two bricks pull sufficiently far apart the tabs lose electrical contact and this signals a pain to the Asa H brain. This sort of pain sensor allows for the robot's action or an external agent to reseat the bricks and cure the pain. Asa can learn which pains are correlated with any given robot malfunctioning.