<!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 />
    <article-meta>
      <title-group>
        <article-title>Extending an Embodied Cognitive Architecture with Spatial Representation and Reasoning</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>
        <contrib contrib-type="author">
          <string-name>Edward P. Katz</string-name>
          <xref ref-type="aff" rid="aff1">1</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>
        <aff id="aff1">
          <label>1</label>
          <institution>Stanford Intelligent Systems Laboratory, Stanford University</institution>
          ,
          <addr-line>Stanford, CA 94305</addr-line>
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we review the PUG cognitive architecture for embodied agents, which posits grounded and graded concepts, integration of symbolic planning with continuous control, and mental simulation to evaluate candidate trajectories. We also describe extensions that will let the framework represent spatial knowledge about places and use this content to move an agent through its environment. Research on cognitive architectures aims to develop unified theories of intelligent systems (Langley, Laird, &amp; Rogers, 2009; Langley, 2017). This paradigm incorporates many ideas from cognitive psychology and focuses on agents that operate over time. Common assumptions include: short-term memories are distinct from long-term stores; both memories contain modular symbolic structures; relational pattern matching accesses long-term content; processing occurs in recognize-act cycles; and cognition dynamically composes mental structures as needed. The architecture community has reported many successes, ranging from demonstrations of human-level performance on complex tasks, such as piloting simulated jet fighters (Jones et al., 1999), to explanations of key psychological phenomena, such as driver behavior (Salvucci, 2006). However, an emphasis on generality has led researchers to avoid making commitments about the representation and processing of spatial content. The field needs additional work that addresses this critical omission and here we report some initial progress in this direction.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Cognitive architectures</kwd>
        <kwd>Spatial cognition</kwd>
        <kwd>Planning and control</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>and processing to support a unified account of discrete planning and continuous control. Key
theoretical commitments of the PUG architecture include:
∙ Symbolic concepts are grounded in constituent physical objects and their associated numeric
attributes. Beliefs are always instances of these defined concepts.
∙ Symbolic concepts are graded, in that they match to diferent degrees based on constituent
objects’ attributes. Thus, derived beliefs have greater or lesser veracity.
∙ Symbolic skills incorporate equations for control attributes that are functions of mismatch
between associated target concepts and the environment.
∙ Execution involves the iterative, reactive use of skill instances to compute values for skills’
control attributes based on the degree of their target concepts’ mismatches.
∙ To determine values for control attributes, execution takes the vector sum of results from
active skill instances, much as in potential field approaches to continuous control.
∙ Processes specify equations that predict changes to state attributes based on state and control
attributes. The agent can afect the environment only indirectly through such processes.
∙ Mental simulation uses skills and processes to predict trajectories in the state space over
time as a function of anticipated situations and the agent’s responses.
∙ Motion planning involves search through a space of sets of skill instances that, taken together,
will achieve high-utility goals (desired beliefs) and avoid low-utility ones.
∙ Task planning involves search through a space of sequences of possible motion plans that,
again, will achieve high-utility goals and avoid low-utility ones.
∙ Trajectories produced by mental simulation are used to evaluate both candidate motion plans
and task plans in terms of their summed expected utilities over time.</p>
      <p>
        PUG provides a high-level programming language, which we have used to create simple robot
agents that operate in simulated two-dimensional environments. Demonstrations have included
tasks in which robots must move to static objects or pursue mobile ones, in both cases avoiding
obstacles along their paths, as depicted in Figure 1. We have also developed an extended
framework, PUG/X, that integrates generation, execution, and monitoring of task and motion
plans to let agents detect and respond to unexpected events
        <xref ref-type="bibr" rid="ref5 ref7">(Langley et al., 2017)</xref>
        .
      </p>
    </sec>
    <sec id="sec-2">
      <title>Adding Spatial Cognition to the PUG Architecture</title>
      <p>The architecture supports agents that operate in dynamic physical environments and it unifies
symbolic approaches to planning with continuous approaches to control, but, like other cognitive
architectures, it does not incorporate strong theoretical commitments about how to encode or
reason over spatial content. In response, we have devised extensions to the framework that will
address these representational and processing limitations. These include a number of generic
claims, which we illustrate with examples from the diagram in Figure 2:
∙ Agents encode their spatial relations to nearby objects in the environment in terms of
continuous attributes that are represented in egocentric polar coordinates. In the diagram, the
robot R perceives its distance and angle to the object X and to the object Y.
∙ A place P is a virtual object defined by a set of other objects, either observable or defined, along
with distances to them. In the figure, place P is defined by its distances to the reference objects
X and Y. Two landmarks sufice because the agent’s pose provides additional constraints.
∙ An instance I of the place P is an inferred belief that includes the place name along with the
derived distance and angle to this virtual object. In the diagram, the robot R’s distances to X
and Y are 6.0 and 10.0 units, whereas its angles are 85.0 and 60.0 degrees, respectively.
∙ To describe an instance I of place P on a given time step, the inference process calculates the
distance (10.57 units) and angle (7.17 degrees) to P from the distances and angles to X and Y
using the equations given below. The two values change as the agent moves relative to P.
∙ Inference uses the description of instance I to calculate the degree of match for relations like
(at Robot P) and (facing Robot P). E.g., the match function for at might be 1 − /5 if  &lt; 5
and zero otherwise, where  is the distance  to P. The match score can also vary over time.
∙ Skill execution uses degree of mismatch for relations like (at Robot P) and (facing Robot P) as
error signals for skill instances that let it move and turn toward P by setting relevant control
values. This process continues until the beliefs match to a suficiently high degree.
∙ A map is a collection of places that include not only distances to their constituent objects but
also distances to other places. E.g., the definition of P might include the distance to another
virtual object, Q. Such connections specify a topological network of distinct places.
∙ Skill execution and motion planning can use a place definition Q that references place P to
move the agent from a position at P to one that is near Q. As before, it infers the agent’s
distances and angles to Q in order to calculate control values and thus guide movement.
These theoretical postulates difer markedly from those adopted by many research eforts on
mobile robotics, where it is common to encode space as discretized, world-centric grids rather
than in continuous, ecocentric, object-oriented terms.</p>
      <p>We should clarify a few details about the extended architecture. First, each place is defined as
a virtual object in a Prolog-like rule, but the predicate is not the place name itself. Rather, it
is the same unary predicate (e.g., object) that identifies perceived entities. The place name is a
constant argument of this predicate, while the body includes the reference objects and their
ifxed distances. On perceiving these landmarks, the agent infers the presence of the virtual
object, its distance, and its angle. This is just another belief, so PUG can infer other beliefs from
it, like (at Robot P), and their match scores, then use them to drive skill execution and planning.</p>
      <p>R</p>
      <p>RX
9.17</p>
      <p>P</p>
      <p>6.0
R
60.0º</p>
      <p>5.22
11.0</p>
      <p>Second, the rule that defines each place P includes equations which specify the agent’s
distance and angle to P as a function of its distances and angles to two reference objects and to
constants for the latter’s distances to P. Using labels from Figure 2, the distance equation is
 = ( , |( ,  ,   ) − ( , ,  )|,   ) ,
where  = (, |∠ −</p>
      <p>∠ |,  ) and the equation for the angle is
∠ = |∠ − ( ,   ,  )| .</p>
      <p>Here the function (, , ) = ([(2 + 2) − 2]/[2 ·  · ]) and the other function
(, , ) = ([2 + 2] − [2 ·  ·  · ()]), based on the standard ‘Side Side Side’ and
‘Side Angle Side’ formulae from trigonometry. These let the agent compute its distance and
angle to the virtual object from its egocentric relations to the reference objects. This analysis
assumes exactly two such landmarks, but larger numbers would be useful with noisy sensors.</p>
    </sec>
    <sec id="sec-3">
      <title>Discussion</title>
      <p>
        In this paper, we reviewed PUG, an architecture for embodied agents that combines symbolic
concepts with numeric descriptors and that joins discrete planning with continuous control. We
also outlined extensions that should let the framework represent and use spatial knowledge. The
design adapts ideas on feedback control, potential fields
        <xref ref-type="bibr" rid="ref3">(Khatib, 1986)</xref>
        , egocentric encodings
        <xref ref-type="bibr" rid="ref14 ref15 ref4">(Kuipers &amp; Byun, 1991; Yamauchi &amp; Langley, 1997; Yeap, 2011)</xref>
        , and topological networks
        <xref ref-type="bibr" rid="ref10 ref13">(Remolina &amp; Kuipers, 2004; Thrun, 1998)</xref>
        , but it embeds them in a unified agent architecture.
      </p>
      <p>
        We are incorporating these ideas about spatial cognition into the PUG architecture and we
plan to demonstrate them in the same simulated robotic environment as our earlier experiments
        <xref ref-type="bibr" rid="ref8">(Langley &amp; Katz, 2021)</xref>
        . We also intend to elaborate the framework to handle more complex
shapes and use formalisms like RCC8
        <xref ref-type="bibr" rid="ref1">(Cohn et al., 1997)</xref>
        to reason about their relations.
Experiments will test PUG on agent localization, inter-place navigation, and other tasks that require
reasoning about places rather than only about individual, perceivable objects.
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 Mohan
Sridharan and the reviewers for constructive comments. A briefer version of this material
appeared in the Report of the Dagstuhl Seminar on Representing and Solving Spatial Problems.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Cohn</surname>
            ,
            <given-names>A. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bennett</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gooday</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Gotts</surname>
            ,
            <given-names>M. M.</given-names>
          </string-name>
          (
          <year>1997</year>
          ).
          <article-title>Qualitative spatial representation and reasoning with the Region Connection Calculus</article-title>
          .
          <source>GeoInformatica</source>
          ,
          <volume>1</volume>
          ,
          <fpage>275</fpage>
          -
          <lpage>316</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Jones</surname>
            ,
            <given-names>R. M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laird</surname>
            ,
            <given-names>J. E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nielsen</surname>
            <given-names>P. E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Coulter</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kenny</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Koss</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          (
          <year>1999</year>
          ).
          <article-title>Automated intelligent pilots for combat flight simulation</article-title>
          .
          <source>AI Magazine</source>
          ,
          <volume>20</volume>
          ,
          <fpage>27</fpage>
          -
          <lpage>42</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Khatib</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          (
          <year>1986</year>
          ).
          <article-title>Real-time obstacle avoidance for manipulators and mobile robots</article-title>
          . In I. J.
          <string-name>
            <surname>Cox</surname>
          </string-name>
          &amp; G. T. Wilfong (Eds.), Autonomous robot vehicles. New York: Springer.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Kuipers</surname>
            ,
            <given-names>B. J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Byun</surname>
          </string-name>
          , Y.-T. (
          <year>1991</year>
          ).
          <article-title>A robot exploration and mapping strategy based on a semantic hierarchy of spatial representations</article-title>
          .
          <source>Journal of Robotics and Autonomous Systems</source>
          ,
          <volume>8</volume>
          ,
          <fpage>47</fpage>
          -
          <lpage>63</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2017</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="ref6">
        <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="ref7">
        <mixed-citation>
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Choi</surname>
            ,
            <given-names>D.</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>
          , &amp;
          <string-name>
            <surname>Katz</surname>
            ,
            <given-names>E. P.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Generating, executing, and monitoring plans with goal-based utilities in continuous domains</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>
          , &amp;
          <string-name>
            <surname>Katz</surname>
            ,
            <given-names>E. P.</given-names>
          </string-name>
          (
          <year>2021</year>
          ).
          <article-title>A cognitive systems approach to continuous control</article-title>
          .
          <source>Unpublished manuscript</source>
          ,
          <source>Center for Design Research</source>
          , Stanford University, Stanford, CA.
        </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>Remolina</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Kuipers</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2004</year>
          ).
          <article-title>Towards a general theory of topological maps</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <volume>152</volume>
          ,
          <fpage>47</fpage>
          -
          <lpage>104</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Salvucci</surname>
            ,
            <given-names>D. D.</given-names>
          </string-name>
          (
          <year>2006</year>
          ).
          <article-title>Modeling driver behavior in a cognitive architecture</article-title>
          .
          <source>Human Factors</source>
          ,
          <volume>48</volume>
          ,
          <fpage>362</fpage>
          -
          <lpage>380</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Schlieder</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          (
          <year>1993</year>
          ).
          <article-title>Representing visible locations for qualitative navigation</article-title>
          . In N. Piera
          <string-name>
            <surname>Carreté &amp; M. G. Singh</surname>
          </string-name>
          (Eds.),
          <article-title>Qualitative reasoning and decision technologies</article-title>
          ,
          <fpage>523</fpage>
          -
          <lpage>532</lpage>
          . Barcelona: CIMNE.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Thrun</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>1998</year>
          ).
          <article-title>Learning metric-topological maps for indoor mobile robot navigation</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <volume>99</volume>
          ,
          <fpage>21</fpage>
          -
          <lpage>71</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Yamauchi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Langley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>1997</year>
          ).
          <article-title>Place recognition in dynamic environments</article-title>
          .
          <source>Journal of Robotic Systems</source>
          ,
          <volume>14</volume>
          ,
          <fpage>107</fpage>
          -
          <lpage>120</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Yeap</surname>
            ,
            <given-names>W. K.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>How Albot0 finds its way home: A novel approach to cognitive mapping using robots</article-title>
          .
          <source>Topics in Cognitive Science</source>
          ,
          <volume>3</volume>
          ,
          <fpage>707</fpage>
          -
          <lpage>721</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>