The role of emotion in self-explanations by cognitive agents