<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Windsor Great Park, UK
$ langley@stanford.edu (P. Langley)
 http://www.isle.org/~langley/ (P. Langley)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Representing and Processing Emotions in a Cognitive Architecture</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pat Langley</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Center for Design Research, Stanford University</institution>
          ,
          <addr-line>Stanford, CA 94305</addr-line>
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>This paper briefly proposes a theory of emotions that clarifies their role in architectures for intelligent agents. The account posits that emotions take the form of symbolic cognitive structures, that generic emotional rules produce concrete instances of these relational concepts, that such rules underlie both generation and understanding of emotions, and that their results play a metacognitive role in influencing behavior. In this framework, emotions are central to high-level, human-like cognition.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Emotional representation</kwd>
        <kwd>Emotional processing</kwd>
        <kwd>Cognitive architectures</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>∙
∙
∙
∙</p>
      <p>Afect . The valence and intensity for some experience.</p>
      <p>Mood. A global variant of afect for the entire cognitive system.</p>
      <p>Emotion. A relation among goals and beliefs for an event or object.</p>
      <p>
        Feeling. An afective or hormonal response associated with an emotion.
        <xref ref-type="bibr" rid="ref10">Lin, Spraragen, and Zyda (2012</xref>
        ) introduce similar distinctions in their review of computational
models within this area. A complete account would relate each factor to cognition, but here
we focus on emotions, the most interesting from an architectural perspective. Many emotions
are important enough to name: frustrated, regretful, disappointed, relieved, and even
schadenfreude. Other mammals have emotions, but human variants are distinctive in their richness and
complexity, which further suggests a strong cognitive component.
      </p>
      <p>
        Elsewhere we discuss the need to incorporate emotions into cognitive architectures
        <xref ref-type="bibr" rid="ref3 ref6 ref7 ref9">(Langley
et al., 2009; Langley, 2017a)</xref>
        . The account presented here builds on PUG
        <xref ref-type="bibr" rid="ref6 ref7">(Langley et al. 2017)</xref>
        ,
an architectural theory for embodied agents. This separates knowledge into concepts (which
derive beliefs from perceptions), skills (which produce plans to achieve goals), and motives
(which assign values to goals). Diferent aspects of emotions fit naturally into this framework.
      </p>
      <p>One key question is whether emotions are better explained at the architectural level, and
thus require specialized structures and procedures, or at the knowledge level, and thus require
only the addition of content encoded in established representations. Another concerns what
functions emotions can serve in intelligent agents, and thus what capabilities they support. In
the sections that follow, we propose some tentative answers to these questions.</p>
    </sec>
    <sec id="sec-2">
      <title>Representing Emotions</title>
      <p>
        Before we can discuss processes that produce emotions, we must first consider how to represent
them.
        <xref ref-type="bibr" rid="ref12">Marsella et al. (2010)</xref>
        distinguish three frameworks: dimensional models (points in a
continuous space); anatomical models (activations in neural circuits); and appraisal models
(relations among cognitive structures). We focus here on the final framework, which lends itself
to incorporation into theories of the human cognitive architecture
        <xref ref-type="bibr" rid="ref9">(Langley et al., 2009)</xref>
        .
      </p>
      <p>
        Most dimensional models characterize emotions as points in a three-dimensional space:
pleasure (measure of valence); arousal (level of afective activation); and dominance (measure
of control). Synthetic characters often use such “PAD” models
        <xref ref-type="bibr" rid="ref17">(e.g., Wachsmuth, 2008)</xref>
        , but they
ignore the fact that emotions are about some event, person, or object, and we can have mixed
emotions about the same target. This suggests they involve much richer cognitive structures.
      </p>
      <p>
        Appraisal models view emotions as inferred relations among mental structures based on
situations.
        <xref ref-type="bibr" rid="ref14">Ortony, Clore, and Collins (1988</xref>
        ) describe 22 configurations that characterize emotions
organized around events, objects, and other agents. These serve as ‘elicitation’ patterns on
emotions that specify relations among an agent’s goals, intentions, expectations, and beliefs,
as well as inferences about others’ mental states. Such emotional structures are abstract and
domain independent, much like rules for dialogue
        <xref ref-type="bibr" rid="ref2">(e.g., Gabaldon et al., 2014)</xref>
        .
      </p>
      <p>
        Our framework maps such “appraisal frames” onto concepts that reside in the PUG
architectures’s long-term memory
        <xref ref-type="bibr" rid="ref8">(Langley et al., 2016)</xref>
        . Each conceptual rule defines some predicate
that relates its arguments, much as in the Prolog formalism. The theory also maps instances
of these generic structures onto beliefs, such as resents(John, passed(Sam, CompSci101)), that
appear in working memory. Thus, we can encode emotional concepts and instances at the
knowledge level, although they are atypical in that they can take other relations as arguments.
      </p>
      <p>As an example, consider the familiar emotional concept disappointed, which relates a person
P to some situation or event S. An instance of this emotion can arise when P wants S to become
true, P expected S to take place, and yet P believes that it did not actually occur:
∙ disappointed(P, R) :- wants(P, R), expected(P, R), believes(P not(R)) .</p>
      <p>Similarly, we say that a person P is jealous of another person Q if P wants to possess an object S,
believes that he does not possess S, and believes that Q does possess it. Complex emotions are
specializations of basic ones that involve more conditions.</p>
      <p>Although emotions have a clear structural element, their instances have an associated afective
score that includes a valence and intensity, with the latter changing over time. Similarly,
emotional concepts incorporate a value function that specifies this afect as a function of
matched elements. Most appraisal theories include these features, but they do not map onto
aspects of a cognitive architecture like PUG that includes them for other reasons.</p>
    </sec>
    <sec id="sec-3">
      <title>Emotional Processing</title>
      <p>Our theory also takes positions about how emotional structures are processed, which we can
separate into two high-level cognitive tasks. One is generation, which produces emotions for
the primary agent, such disappointed(John, failed(John, CompSci101)). The other is
understanding, which infers the emotions of other agents, such as belief(John, disappointed(Jane,
failed(John, CompSci101))). This maps onto the classic distinction between plan generation and
plan understanding. Both appear necessary for a full account of emotion’s relation to cognition.</p>
      <p>We maintain that a single PUG mechanism, conceptual inference, underlies both generation
of the primary agent’s emotions and inference about those of others. This uses a variety of
relational pattern matching like that in logic programming, although an alternative would use
abduction rather than deduction. This draws on processes available in the existing architecture,
which ofers further evidence that emotions are knowledge-level phenomena.</p>
      <p>However, this raises a question about why afective scores are more intense for our own
emotions than those inferred for others. Presumably, this diference results from coeficients in
the value function associated with each emotional concept, which will be higher for the primary
agent and lower for inferences about other agents. This may also explain why memories of
past emotions are typically less intense than the original experience. This suggests that the
distinction between ‘hot’ and ‘cold’ emotions is not a dichotomy but rather a continuum.</p>
      <p>A full theory should clarify not only how the architecture generates and infers emotions,
but also how they influence other cognitive processing. Thus, it should specify how emotional
instances impact the agent’s physical behavior (e.g., crying about loss or punching someone) or
its cognitive processing (e.g., changing goal priorities or invoking planning). This supports the
view that emotions are not evolutionary relics, but rather high-level regulators of cognition.</p>
      <p>
        We postulate that this relates to people’s ability to think about thinking – metacognition.
Recall that emotional concepts specify abstract relations among goals, beliefs, and expectations,
which are matched during conceptual inference. This suggests a promising hypothesis:
∙ Emotions play a metacognitive role that operates over and influences base-level cognition .
That is, emotional processing inspects traces of basic cognition and alters its course in response.
This view follows
        <xref ref-type="bibr" rid="ref15">Simon (1967)</xref>
        in claiming that emotions play a regulatory role in cognitive
attention, but it also suggests the need for additional mediating structures.
      </p>
      <p>
        The PUG architecture already incorporates long-term structures called motives that match
against domain-level beliefs, generate top-level goals, and compute the latters’ values. Elsewhere,
we have proposed motives that match against emotions and generate goals which may involve
changing emotions of the primary agent or others
        <xref ref-type="bibr" rid="ref6 ref7">(Langley, 2017b)</xref>
        . For instance, the rule
∙ disappointed(P, R)), believes(P, cause(Q, R)) → wants(P, disappointed(Q, )) .
encodes an ‘eye for an eye’ motive, so that if someone believes another agent caused something
that disappointed him, then he desires to reciprocate in kind. The priority of this goal will
depend on the motive’s value function. We also conjectured that such motives make up the
agent’s personality, reflecting stable, domain-independent regularities in cognition and behavior.
      </p>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>
        Our theory of cognition and emotion draws on ideas that have appeared elsewhere in the
literature, many of them discussed by Marsella, Gratch, and Petta (2010) and by
        <xref ref-type="bibr" rid="ref10">Lin, Spraragen,
and Zyda (2012</xref>
        ). Both
        <xref ref-type="bibr" rid="ref16">Sloman (2001)</xref>
        and
        <xref ref-type="bibr" rid="ref13">Minsky (2007)</xref>
        emphasize that emotion and cognition
are closely intertwined, but they ofer few details.
        <xref ref-type="bibr" rid="ref4">Gratch and Marsella (2004)</xref>
        ,
        <xref ref-type="bibr" rid="ref11">Marinier, Laird,
and Lewis (2009</xref>
        ), and
        <xref ref-type="bibr" rid="ref5">Hudlicka (2007)</xref>
        describe detailed appraisal models of emotions embedded
in cognitive architectures, including their modulation of cognition and their intensities.
      </p>
      <p>
        One notable diference is that their accounts assume a fixed set of appraisal frames, each
associated with a distinct emotion, whereas our theory allows an arbitrary number of
emotional concepts, some defined in terms of others. In this sense, it comes closer to
        <xref ref-type="bibr" rid="ref3">Gordon and
Hobbs’ (2017)</xref>
        analysis, which also defines emotions in relational logic. Our approach benefits
from PUG’s theoretical distinction between concepts and skills, as does its reliance on the
architecture’s motives to explain emotions’ metacognitive efects.
      </p>
      <p>In summary, our computational account of emotion brings together ideas from appraisal
theory and cognitive architectures. The most important claims of the framework, which it
shares with some other work that follows similar lines, are that:
∙ Emotions are symbolic cognitive structures with numeric annotations;
∙ Generic emotional rules generate specific instances of these concepts;
∙ These rules are used to generate emotions and to infer those of others;
∙ Emotions play a metacognitive role in influencing cognition and behavior;
∙ These influences are mediated by generic motives that assign values to goals.
In this theory, emotions are not irrational vestiges of evolution. Rather, they are linked directly
to structures and processes in the cognitive architecture, specifically ones in the PUG framework,
which should require only minor extensions to incorporate them.</p>
      <p>We maintain that PUG’s division of knowledge into concepts, skills, and motives makes it
especially suitable for explaining emotions and their relation to both cognition and personality.
However, we must still demonstrate the architecture’s ability to reproduce emotion-related
phenomena in realistic scenarios that are similar to ones humans encounter. We must also work
out details about how to calculate emotional intensities as a function of time, diferent agents,
and other factors, but we remain optimistic about the framework’s potential in this arena.
The research reported here was supported by Grant No. FA9550-20-1-0130 from the US Air
Force Ofice of Scientific Research, which is not responsible for its contents. We thank John
Laird and the reviewers for constructive comments that improved the paper.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Damasio</surname>
            ,
            <given-names>A. R.</given-names>
          </string-name>
          (
          <year>1994</year>
          ).
          <article-title>Descartes' error: Emotion, reason, and the human brain</article-title>
          . New York: Putnam.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Gabaldon</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Meadows</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Integrating meta-level and domain-level knowledge for task-oriented dialogue</article-title>
          .
          <source>Advances in Cognitive Systems</source>
          ,
          <volume>3</volume>
          ,
          <fpage>201</fpage>
          -
          <lpage>219</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Gordon</surname>
            ,
            <given-names>A. S.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Hobbs</surname>
            ,
            <given-names>J. R.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>A formal theory of commonsense psychology: How people think people think</article-title>
          ,
          <fpage>513</fpage>
          -
          <lpage>544</lpage>
          . New York: Cambridge University Press.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Gratch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Marsella</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2004</year>
          ).
          <article-title>A domain-independent framework for modeling emotion</article-title>
          .
          <source>Cognitive Systems Research</source>
          ,
          <volume>5</volume>
          ,
          <fpage>269</fpage>
          -
          <lpage>306</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Hudlicka</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          (
          <year>2007</year>
          ).
          <article-title>Reasons for emotions: Modeling emotions in integrated cognitive systems</article-title>
          . In W. Gray (Ed.),
          <article-title>Integrated models of cognitive systems</article-title>
          . New York: Oxford University Press.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2017a</year>
          ).
          <article-title>Progress and challenges in research on cognitive architectures</article-title>
          .
          <source>Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence</source>
          (pp.
          <fpage>4870</fpage>
          -
          <lpage>4876</lpage>
          ). San Francisco: AAAI Press.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2017b</year>
          ).
          <article-title>A cognitive systems analysis of personality and conversational style</article-title>
          .
          <source>Proceedings of the Fifth Annual Conference on Cognitive Systems</source>
          . Troy, NY.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barley</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meadows</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Choi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Katz</surname>
            ,
            <given-names>E. P.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Goals, utilities, and mental simulation in continuous planning</article-title>
          .
          <source>Proceedings of the Fourth Annual Conference on Cognitive Systems. Evanston</source>
          , IL.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laird</surname>
            ,
            <given-names>J. E.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Rogers</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2009</year>
          ).
          <article-title>Cognitive architectures: Research issues and challenges</article-title>
          .
          <source>Cognitive Systems Research</source>
          ,
          <volume>10</volume>
          ,
          <fpage>141</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Spraragen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Zyda</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Computational models of emotion and cognition</article-title>
          .
          <source>Advances in Cognitive Systems</source>
          ,
          <volume>2</volume>
          ,
          <fpage>59</fpage>
          -
          <lpage>76</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Marinier</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laird</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Lewis</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          (
          <year>2009</year>
          ).
          <article-title>A computational unification of cognitive behavior and emotion</article-title>
          .
          <source>Cognitive Systems Research</source>
          ,
          <volume>10</volume>
          ,
          <fpage>48</fpage>
          -
          <lpage>69</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Marsella</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gratch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Petta</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2010</year>
          ).
          <article-title>Computational models of emotion</article-title>
          . In K. R. Scherer,
          <string-name>
            <given-names>T.</given-names>
            <surname>Banziger</surname>
          </string-name>
          , &amp; E. B.
          <string-name>
            <surname>Roesch</surname>
          </string-name>
          (Eds.),
          <article-title>A blueprint for afective computing: A sourcebook and manual</article-title>
          . Oxford: Oxford University Press.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Minsky</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2007</year>
          ).
          <article-title>The Emotion Machine: Commonsense thinking, artificial intelligence, and the future of the human mind</article-title>
          . New York: Simon and Schuster.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Ortony</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clore</surname>
            ,
            <given-names>G. L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Collins</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>1988</year>
          ).
          <article-title>The cognitive structure of emotions</article-title>
          . New York: Cambridge University Press.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Simon</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          (
          <year>1967</year>
          ).
          <article-title>Motivational and emotional controls of cognition</article-title>
          .
          <source>Psychological Review</source>
          ,
          <volume>74</volume>
          ,
          <fpage>29</fpage>
          -
          <lpage>39</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>Sloman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2001</year>
          ).
          <article-title>Varieties of afect and the CogAf architecture schema</article-title>
          .
          <source>Proceedings of the AISB'01 Symposium on Emotion, Cognition, and Afective Computing</source>
          (pp.
          <fpage>39</fpage>
          -
          <lpage>48</lpage>
          ). York, UK.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Wachsmuth</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Knoblich</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          (
          <year>2008</year>
          ).
          <article-title>Embodied communication in humans and machines</article-title>
          . Oxford, UK: Oxford University Press.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>