<!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>The Mirror Self-recognition for Robots</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrej Lucny</string-name>
          <email>lucny@fmph.uniba.sk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Applied Informatics FMFI, Comenius University Bratislava</institution>
          ,
          <country country="SK">Slovakia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2016</year>
      </pub-date>
      <fpage>46</fpage>
      <lpage>47</lpage>
      <abstract>
        <p>-We introduce a simple example of artificial system which aims to mimic the process of the mirror self-recognition ability limited to very few species. We assume that evolution of the species is reflected in the structure of the underlying control mechanism and design modules of the mechanism, concerning its incremental development. On this example, we also demonstrate modular architecture suitable for such task. It is based on decentralization and massive parallelism and enables incremental building of control system which is running in real-time and easily combines modules operating at different pace.</p>
      </abstract>
      <kwd-group>
        <kwd>the mirror self-recognition</kwd>
        <kwd>robot iCubSim</kwd>
        <kwd>Agentspace architecture</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        Seeing in the mirror, we recognize ourselves. However
child less than eighteen months old is rather looking for
another person behind the mirror. In nature, the mirror
selfrecognition is present only in exceptional cases, for instance
chimpanzees recognize themselves in the mirror, while cats do
not. Can a robot recognize itself in the mirror? And what is the
origin of the self-recognition ability? We follow Scassellati and
Hart [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], who suppose that a robot should recognize itself in the
mirror due to perfect correlation between body movement and
the image seen in the mirror. Unlike them and like Takeno [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
we use a very simplified body model.
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. TESTBED</title>
      <p>
        Using the simulator of the humanoid robot iCub [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] we
added a camera shooting the area in the front of the monitor
with the robot rendered image, we create a control system on
which we can examine how the mirror self-recognition
emerges from basic mechanisms. This enables us to establish
interaction between the virtual robot and human sitting at the
monitor and later between the robot and its image reflected to
the camera by the mirror. The simulator has almost perfect
model of the robot body. However for our purposes we intend
to simplify it, thus we move a single joint – the joint moving
head from side to side. In this way the body model is simplified
to a single number – the angle of the robot head inclination.
      </p>
    </sec>
    <sec id="sec-3">
      <title>III. ARCHITECTURE</title>
      <p>
        For examination of mechanisms underlying the mirror
selfrecognition process, we employ a modular framework
(AgentSpace Architecture [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) which enables us to let the control
system emerge from the parallel course of simpler modules and
from their mutual interactions. Agent-Space Architecture is a
software tool for building modular control systems of robots,
running in real-time. It is strongly based on ideas of Brooks'
subsumption architecture [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Minsky's society model of
mind [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Within the framework we define operation of
individual modules and connect various module outputs to
various module inputs (many:many) regardless the fact that
each module can operate at different pace. Such combining of
either really slow or really fast processes is possible due to all
data produced by a module (producer) being written onto a
blackboard (called space) and processed later, when another
module (consumer) is ready to process them. These written
data remain on the blackboard until they are rewritten by the
same or another producer, or their time validity expires. Finally
the data exchange supports also hierarchical control and its
incremental development, e.g. module has to define sufficient
priority for written data – otherwise it would not be able to
rewrite their previous value already written on the blackboard.
      </p>
    </sec>
    <sec id="sec-4">
      <title>IV. MECHANISMS</title>
      <p>Now we can try to implement the system, using which we
are able to evaluate correlation between own body movement
and the seen image movement. We aim to implement a
working demo following biological relevancy of our approach,
based on knowledge about the above-mentioned species.</p>
      <sec id="sec-4-1">
        <title>A. Body model (proprioception)</title>
        <p>The body model is provided by the iCubSim simulator, thus
we need to implement just its control and monitoring from the
blackboard. We implement a module motor which reads an
intended joint position intention from the blackboard,
communicates with the simulator (via yarp rpc protocol) and as
a result, it writes proprioception to the blackboard which
represents a real joint position (Fig. 1). In parallel, the added
camera regularly provides a new image to the blackboard.</p>
      </sec>
      <sec id="sec-4-2">
        <title>B. Mirroring</title>
        <p>As we aim to compare the body model (i.e. value
proprioception) with the image captured by the camera, we
need to get an analogical model from the image. This approach
is still biologically relevant since several species are proven to
obtain such ability (mirror neurons). (How such ability has
emerged and evolved, is not the subject of our exploration – it
is only limited to the implementation of this ability.) Since we
take into account both interaction between the robot and human
and interaction between the robot and its image in the mirror,
we combine two specific methods which output the same data
onto the backboard – the model of the seen image (the model
value in Fig. 1).</p>
        <p>For the iCubSim image processing (we rotate a printed
picture of iCubSim in front of the camera) we employ the
SURF method. SURF provides projection of given template to
the image seen from which we can easily calculate inclination
of the template. For the processing of human image (interacting
person is moving his head in front of the camera) we use
combination of Haar face detector and CamShift tracking: the
Haar detector detects face in the upright position and sets up
template for CamShift to track. The projection of the template
to the seen image calculated by CamShift provides us with the
required head inclination. All algorithms employed are
available in OpenCV library (www.opencv.org).</p>
      </sec>
      <sec id="sec-4-3">
        <title>C. Imitation</title>
        <p>The correlation of these two comparable models can only be
evaluated by their changes through time therefore both robot
and human have to be put in motion. One of the mechanisms,
that can provide it, is imitation. Due to the utilized mirroring,
a passive imitation can be implemented by direct copying of
values of the body model seen (i.e. the model value) into the
robot’s body model (i.e. the intention value). As a result,
iCubSim imitates side to side movement of one’s head when
moving in front of the camera. Optionally we can also
implement the active part of imitation, which can be called the
invitation to imitation and obtains a higher priority than the
passive imitation and occasionally generates side to side
movement of the robot’s head when the body seen does not
move. However we found out that even slight inaccuracies in
the model evaluation are sufficient to induce the imitation
process.</p>
      </sec>
      <sec id="sec-4-4">
        <title>D. Social modelling</title>
        <p>Imitation process provides us with the data of correlation
between the body owned and the body seen. When an
individual lives within a society, it is important for him to
categorize the data and associate them with the image seen.
When such individual meets the mirror, it possibly creates a
new category and finds out that the corresponding correlation
is unusually high. In fact, it is so high that the image seen can
not only be associated with the body model seen, but also with
its own body, meaning that it sees itself. Instead of modelling
the society, for our purposes, it is sufficient to record the data
produced by the two models since the aim of the study is to
differentiate the data created when robot encounters human
and when robot sees its own image in the mirror.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>V. CONCLUSION</title>
      <p>As a result of implementation of the above mentioned
mechanisms, when iCubSim's image is reflected into the
external camera by a mirror, robot invites himself to imitation
and it stays in an interaction with itself for certain amount of
time (Fig. 2). Thus correlation between the body model
(proprioception) and the model of the image seen (model) can
be evaluated and its unusually high value indicates that the
robot sees itself in the mirror. Thus the designed structure of
the mirror self-recognition process is partially verified.</p>
    </sec>
    <sec id="sec-6">
      <title>As a teaser video can be viewed here:</title>
      <p>http://www.agentspace.org/mirror/iCubSimAtTheMirror.mp4</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Brooks</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          (
          <year>1999</year>
          ).
          <article-title>"Cambrian Intelligence"</article-title>
          . The MIT Press, Cambridge, MA
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Gallup</surname>
            ,
            <given-names>G. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jr.</surname>
          </string-name>
          (
          <year>1970</year>
          ).
          <source>Chimpanzees: Self Recognition. Science</source>
          ,
          <volume>167</volume>
          ,
          <fpage>86</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Hart</surname>
            ,
            <given-names>J. W.</given-names>
          </string-name>
          <string-name>
            <surname>Scassellati</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Mirror Perspective-Taking with a Humanoid Robot</article-title>
          .
          <source>In Proceedings of the 26th AAAI Conference on Artificial Intelligence (AAAI-12)</source>
          . Toronto, Canada.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Kelemen</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2001</year>
          ).
          <article-title>"From statistics to emergence - exercises in systems modularity"</article-title>
          .
          <source>In: Multi-Agent Systems and Applications</source>
          , (Luck,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Marik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Stepankova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Trappl</surname>
          </string-name>
          , R.), Springer, Berlin, pp.
          <fpage>281</fpage>
          -
          <lpage>300</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Lucny</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2004</year>
          ).
          <article-title>"Building complex systems with Agent-Space architecture"</article-title>
          .
          <source>Computing and Informatics</source>
          , Vol.
          <volume>23</volume>
          , pp.
          <fpage>1001</fpage>
          -
          <lpage>1036</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Minsky</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>1986</year>
          ).
          <source>The Society of Mind. Simon&amp;Schuster</source>
          , New York
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Sandini</surname>
          </string-name>
          , G. - Metta, G.
          <article-title>-</article-title>
          <string-name>
            <surname>Vernon</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          (
          <year>2007</year>
          ).
          <article-title>The iCub cognitive humanoid robot: an open-system research platform for enactive cognition</article-title>
          .
          <source>In: 50 years of artificial intelligence</source>
          , pp.
          <fpage>358</fpage>
          -
          <lpage>369</lpage>
          , SpringerVerlag, Berlin
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Takeno</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2008</year>
          ).
          <article-title>A Robot Succeeds in 100% Mirror Image Cognition</article-title>
          .
          <source>INTERNATIONAL JOURNAL ON SMART SENSING AND INTELLIGENT SYSTEMS</source>
          , Vol.
          <volume>1</volume>
          , No.
          <issue>4</issue>
          ,
          <string-name>
            <surname>December</surname>
            <given-names>2008</given-names>
          </string-name>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>