<!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>A Calculus for Robot Inner Speech and Self-Awareness</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>C.N.R., Institute for High-Performance Computing and Networking (ICAR)</institution>
          ,
          <addr-line>Palermo</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Dept. of Engineering, University of Palermo</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The inner speech is the common mental experience the humans have when they dialogue with themselves. It is widely acknowledged that inner speech is related to awareness and self-awareness. The inner speech reproduces and expands in the mind social and physical sources of awareness. In this preliminary work, a calculus based on a rst-order modal logic to automate inner speech is presented. It attempts to make the existing inner speech theories suitable for robot. By making robot able to talk to itself, it is possible to analyze the role of inner speech in robot awareness and self-awareness, opening new interesting research scenarios not yet investigated.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The dialogue with the self plays a fundamental role in human's consciousness [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], and is linked to self-awareness: by talking to himself, someone accesses to
self-information, or extends existing self-knowledge [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        Morin [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] stated three main causal directions between inner speech and
selfawareness: (i) inner speech always precedes (causes) self-awareness, (ii) inner
speech accompanies a state of awareness, and (iii) inner speech is triggered by
self-focus, that is the attention on the self.
      </p>
      <p>
        When analyzing the robot awareness and self-awareness, it seems desirable
to provide the robot with a kind of self dialogue. Few works investigate this
scenario. The authors proposed a cognitive architecture [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] for inner speech,
that is modeled as the rehearsing process between a working-memory and a
motor module wich produces language. Same authors suggested to integrate
their architecture into the IDyOT system [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Other works [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] demonstrated
that the language re-entrance, that is a form of inner speech, allows to re ne the
emergent grammar shared by a population of agents.
      </p>
      <p>
        We attempt to automate the Morin's causal directions by de ning a calculus
couched in rst-order modal logic. The Deontic Cognitive Event Calculus
(DCE C) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] underlies the proposed one which includes some of the DCE C's
elements while adding new propositions and terms for formalizing inner speech.
      </p>
      <sec id="sec-1-1">
        <title>DCE C subsumes in turn the Event Calculus (EC) [8], and it was proposed to for</title>
        <p>
          malize thorny situations, such as akrasia [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] and the Doctrine of Double E ect
(DDE ) [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
        <p>Copyright © 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution</p>
        <p>We show that our formalization may a ect the execution by robot of a simple
task when a self-perception stimuli occurs and triggers inner speech. The idea we
propose lays the groundwork for new investigations related to the robot's inner
speech ability, and for testing its e ects on robot awareness and self-awareness.</p>
      </sec>
      <sec id="sec-1-2">
        <title>The paper is organized as follow: a brief overview about DCE C is presented</title>
        <p>at section 2. Then, how we think to encode inner speech and self-awareness by
EC is explained at section 3. The syntax of our calculus (with sorts, functions
and axioms de nitions) is detailed at section 4. Inference schemata and formal
conditions, that allow to make deduction and to reason on the syntax, are
discussed at section 5. The section 6 shows a simple simulation for reasoning by
the proposed calculus. Future works and implications are discussed at 7.
2</p>
        <p>
          The Deontic Cognitive Event Calculus (DCE C)
The common Event Calculus (EC) [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] is a sorted logic analogous to a typed
programming language. It allows to formalize intuitive reasoning about actions
and the changes which occur in the universe after doing these actions. The notion
of `action a ecting' arises, meaning the causal in uences of actions on the states
of the universe.
        </p>
        <p>
          DCE C [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] is a calculus that subsumes EC, by adding new operators and
functions to enable intensional reasoning processes. The intensional property is
necessary when modeling the typical arti cial agent's states (such as knowledge,
belief and intention), which are intensional (i.e. it is not possible to declare and
to know all the values of these states). The models based on extensional property,
which attempt to list all values, was demonstrated [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] generate inconsistencies
for these states.
        </p>
        <p>
          The DCE C's intensional processes was successfully used to automate the
falsebelief task [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], the akrasia situation [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] (which represents the temptation to
violate moral principle) and the DDE situation [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] (which arises when a dilemma
with positive or negative e ects has to be solved by an autonomous agent). The
intensional property of the model is achieved by the inclusion in the formalization
of intensional modal operators. For example, the intensional modal operator for
modeling the knowledge of a fact has the typical form K(a; t; ), which means
that agent a knows the proposition at time t. An instance of this operator
allows to model an intentional knowledge state of the agent.
        </p>
        <p>Involving same kinds of states, the calculus for inner speech and self-awareness
is an intensional model, and we inspired to DCE C for our work.
3</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Encoding Inner Speech and Self-Awareness</title>
      <p>
        As shown, Morin's theory [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] claims the causal directions between inner speech
and self-awareness. Because of this causality property, EC is suitable to automate
such directions.
      </p>
      <p>Since a uent represents a state (or fact) of the world, we can de ne inner
and external uents. An inner uent represents an internal agent state, eg: an
emotion, its intensity value, the status of an its physical component (on, o ,
functioning,...). An external uent is related to the external context, and
represents a fact of the environment, that is the typical de nition of EC's uent. Thus,
how a typical uent is initiated or terminated by an action which changes the
environmental set (named reactive action), similarly an internal uent is initiated
or terminated by an internal action (named inner action, i.e. a self-regulation
action, the perception of an entity, the rehearse of inner voice,...) which changes
the internal set.</p>
      <p>We think that awareness and self-awareness of an arti cial agent could be
computationally modeled as all the uents (both inner and external) the agent
knows to be active at a time. A uent is active at time t when it holds at t.
The active uents that are not in the knowledge of the agent are not in the set
modeling awareness and self-awareness: the agent does not know them, and it is
not aware of them.</p>
      <p>Now, let suppose that the object x at the instant t1 is at the location l1. The
native EC function</p>
      <p>holds(location(x; l1); t1)
models the state of the world related to that fact, that is the active state of the
uent location(x; l1) at the instant t1.</p>
      <p>The action a = move x to l2 at the instant t2 with t1 &lt; t2, causes the end of
the previous uent</p>
      <p>terminates(a; location(x; l1); t2)
and the beginning of the new</p>
      <p>uent location(a; l2) by
initiates(a; location(a; l2); t2)
and for the inferential logic of EC, the creation of a new function holds related
to such a new uent.</p>
      <p>
        When such an action has to be performed by an autonomous agent, it may
involve inner uents and statements beyond the previously seen ones. The agent
will use inner speech as a cognitive tool [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] to accomplish the task a = move x to
l2. For example, it has to evaluate its abilities to solve the problem, the position
of the object in respect to its position, the form of the object, the feasibility of the
action, the state of its physical components for making the action. To answer to
the questions it makes to itself, the robot has to retrieve useful self-information
and information from the environment.
      </p>
      <p>
        Kendall et. al [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] proposed four categories of self-questions emerging during
the problem-solving process: (1) the questions for a clear formulation of the
problem (`What's the problem?', `What's I'm supposing to do?'), (2) the questions
for proposing a possible solution (`I have to nd a strategy'), (3) the questions
for focusing on relevant aspects for the solution (`It's important', `It's not
important, I discard it'), (4) the statements for praising oneself when the solution
is reached (`Good! I nd the solution!) or for readjusting the approach when
someone fails (`Oh, no! It's no ok').
      </p>
      <p>All these evaluations will modify the set of active uents, and hence the state
of awareness and self-awareness of the agent.</p>
      <p>The calculus we propose attempt to model such evaluations. It could be
extensible by adding uents representing further internal or external facts.
4</p>
    </sec>
    <sec id="sec-3">
      <title>The Proposed Calculus</title>
      <p>
        Commonly used functions, sorts and relation symbols from EC and some ones
from DCEC are included in our formalization. The resulted calculus has a unique
syntax and a proof calculus for reasoning and theorem proving. In particular,
the natural deduction by Gentzen [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] is used as prover, as shown at section 6.
4.1
      </p>
      <p>Modal Fragment
The modal fragment speci es the modal operators of the calculus.</p>
      <p>While DCEC includes the standard modal operators for common-sense
knowledge C and domain knowledge Kd, in our formalization we include other two
types of knowledge by adding two new modal operators, representing:
{ the self-knowledge Kself , that is the knowledge the robot owns about itself,
(i.e. inner world ). Then, Kself (a; t; ) means that the agent a knows the
proposition representing an inner fact at time t;
{ the contextual-knowledge Kcx, that is the knowledge about the physical
environment in which the robot is plunged, (i.e. external world ). The
contextualknowledge we considered is not equal to the general one K, because it may
include some new objects the robot does not know (it has never seen them).
Moreover, the contextual knowledge may not include some concepts of the
general one because these concepts could not be in the environment at a
time. Kcx(a; t; ) means that agent a knows the proposition representing
an external fact at time t.</p>
      <p>The general knowledge we refer to becomes</p>
      <p>K = Kself _ Kd _ Kcx
The standard intensional operators for belief B, desire D, intention I are
included too, and have the same semantics from DCEC.</p>
      <p>Other DCEC modals operators we include are P for perceiving a state, and S
for agent-to-agent communication or public announcement. But the S operator
we de ne crucially di ers from those of DCEC because we consider the possibility
to have the same agent (the robot) in its agent-to-agent arguments, leading to
the inner speech formalization. The single argument means public announcement
as for DCEC. Formally:
{ S(a; b; t; ) means that the agent a sends the message related to proposition
to the agent b at time t;
{ S(a; a; t; ) means that the agent a rehearses the message related to
proposition it sends to itself at time t;
{ S(a; t; ) means that the agent a makes a public announcement related to
proposition at time t.</p>
      <p>Finally, we add the modal operator M for producing a message related to a
speci c proposition . Then, M(a; t; ) means that the agent a produces the
message related to the proposition at time t. We have to specify that M
regards the action \to produce a message" which can be in turn sent to another
agent or rehearsed according to S.
4.2</p>
      <p>Sorts Speci cation</p>
      <sec id="sec-3-1">
        <title>We de ne new sorts upon the native EC and DCE C ones. Moreover, we changed</title>
        <p>the typical Agent and Entity sorts de nitions because we consider the agent as
a part of the universe, hence the Agent sort becomes a sub-type of the Entity
sort. The abstract sorts are instantiated at particular times by an actors.</p>
        <p>The following table shows all the sorts we de ned. The highlighted sorts are
the new ones introduced or modi ed by our calculus.</p>
        <sec id="sec-3-1-1">
          <title>Sort</title>
          <p>Entity
Object
Agent
Percept
Moment
Event</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Description</title>
          <p>An entity in the universe, including agent.</p>
          <p>A subtype of Entity, representing a physical object
in the environment that is not an actor.</p>
          <p>A subtype of Entity, representing human and arti cial
actors.</p>
          <p>A perception from the environment; it can be a concrete
Entity (an Agent or an Object), or a generic concept
meaning an event.</p>
          <p>A time in the domain.</p>
          <p>An event in the domain.</p>
          <p>ActionType</p>
          <p>An abstract reactive action, i.e. an action that a ects
the state of the external environment.</p>
          <p>An abstract inner action, i.e. an action that a ects
SelfActionType the inner state of the agent.</p>
          <p>Examples: keep calm, evaluate, feel.</p>
          <p>Action
SelfAction</p>
          <p>A subtype of Event that occurs when an agent performs
a concrete ActionType action.</p>
          <p>A subtype of Event that occurs when an agent
performs a SelfActionType action.</p>
          <p>Fluent
Aware
Message</p>
          <p>A state of the universe, that can be inner or external.</p>
          <p>A subtype of Fluent, representing a uent the agent knows.</p>
          <p>The set of active Aware uents forms the agent
awareness and/or self-awareness.</p>
          <p>A message of an agent-to-agent, agent-to-itself,
agent-to-public communication.
4.3</p>
          <p>De ning the message m
EC and DCEC have not any operators or functions to de ne the message of a
communication. We take a modal approach for modeling such a situation without
de ning speci c axioms. We assume that a message is related to a speci c fact,
represented by a proposition. Given a proposition , we de ne by the operator
the set of all constants and names of not native function expressions in . For
example:
(happens(action(Bob; loves(M ary))); t) = fBob; loves; M aryg
(holds(located(apple; table)); t) = flocated; apple; tableg
A message is the set returned by the
operator, that is:
:
! m
So, given the corresponding message m will be m = ( ).</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>A content of the message is an element in the set. So, the content pi 2 m is</title>
        <p>the i-th element in m.
4.4</p>
        <p>The Syntax
The whole syntax of the calculus is formalized by the formulas in the
following table, where S represents the sorts, f represents the functions, the term
represents the possible variables and nally are the propositions.</p>
        <p>S :: =</p>
        <p>Entity jAgent v Entity j Object v Entity j Percept v Entity j
Percept = Agent t Object t Action t SelfAction j Fluent j
ActionType j SelfActionType j Event j SelfAction v Event j
Action v Event j Boolean j Moment j Message
f :: =
&gt;8action : Agent ActionType ! Action
&gt;
&gt;&gt;initially : Fluent ! Boolean
&gt;
&gt;
&gt;&gt;&gt;&gt;holds : Fluent Moment ! Boolean
&gt;
&gt;&gt;&gt;&gt;happens : Event Moment ! Boolean
&gt;
&gt;&gt;&gt;&gt;clipped : Moment Fluent Moment ! Boolean
&gt;&gt;&gt;&gt;&gt;initiates : Event Fluent Moment ! Boolean
&gt;&gt;&lt;terminates : Event Fluent Moment ! Boolean
&gt;selfaction : Agent SelfActionType ! SelfAction
&gt;
&gt;
&gt;&gt;focuses : Percept ! SelfActionType
&gt;
&gt;
&gt;&gt;&gt;&gt;aware : Agent Percept ! Fluent
&gt;
&gt;&gt;&gt;contenti : Message ! Percept
&gt;
&gt;
&gt;&gt;&gt;comprehends : Message ! SelfActionType
&gt;
&gt;
&gt;&gt;produces : Message ! SelfActionType
&gt;
&gt;
:&gt;innerspeaks : Message ! SelfActionType
term :: = var : S j const : S j f (term1; term2; :::termn)
:: =
&gt;8&gt;term:Boolean j : j ^ j _ j P(a; t; ) j K(a; t; ) j
&gt;&gt;&gt;C(t; ) j B(a; t; ) j D(a; t; ) j I(a; t; )
&gt;
&gt;
&gt;
&lt;
&gt;S(a; b; t; ) j S(a; a; t; ) j S(a; t; )
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;:M(a; t; )</p>
        <p>The functions in bold are purposely de ned for formalizing inner speech,
awareness and self-awareness, while the others are native from EC.</p>
        <p>These new functions are :
{ selfaction(a, at)! as: that returns the concrete self action as of type at the
agent a performs; it is the self-version of native action function of EC;
{ focuses(p)! at: that represents the selfaction type the agent a performs
when it focuses on the percept p. Intuitively, self action(a; f ocuses(p)) means
the action by a of focusing on the percept p;
{ aware(p)! f : that states the awareness about the percept p. The activation
of that uent by holds(aware(p); t) means that an agent is aware of the
percepts p at t. Let's notice that the aware uents may be a sub-set of the
all active uents at a time. They are not the whole robot awareness and
self-awareness, but are the robot awareness about the percepts.</p>
        <p>{ contenti(m)! pi: that returns the i-th percept pi in the message m;
{ comprehends3 (m)! at: that states the comprehension of the message.
Intuitively, self action(a; comprehends(m)) means the action by a of
comprehending the message m;
{ produces4(m) ! at: that states that the agent a is producing the message m.</p>
        <p>Intuitively, self action(a; produces(m)) means the action by a of producing
the message m.</p>
      </sec>
      <sec id="sec-3-3">
        <title>The typical truth-functional connectives ^, _, :, ! are applied to propositions</title>
        <p>and they have the standard rst-order semantics.
4.5</p>
        <p>Axioms
As for DCE C, the standard axioms of EC are considered as common-knowledge,
that is:
[A1] C(8 f; t : initially(f ) ^ :clipped(0; f; t) ) holds(f; t))
[A2] C(8 e; f; t1; t2 : happens(e; t1) ^ initiates(e; f; t1) ^ t1 &lt; t2 ^
:clipped(t1; f; t2) ) holds(f; t2))
[A3] C(8 f; t1; t2 : clipped(t1; f; t2) () [ 9 e; t : happens(e; t) ^ t1 &lt; t &lt;
t2 ^ terminates(e; f; t)])
[A4] C(8 a; d; t : happens(action(a; d); t) ) K(a; happens(action(a; d); t); t))
The axioms from [A1] to [A3], that are native of EC, state general and innate
understanding human capacity about the causality of events. [A4] is native of</p>
      </sec>
      <sec id="sec-3-4">
        <title>DCE C and postulates that an agent knows the action it performs, that is it means</title>
        <p>the event which occurs by doing such an action.</p>
        <p>
          We postulate one more axiom pertains the inner speech triggering. It
expresses that when an agent rehearses a message it produces, the inner speech
happens. That is:
[A5] C(8 a; m; t1; t2 : happens(self action(a; produces(m)); t1) ^
happens(self action(a; comprehends(m)); t2) ^ t1 &lt; t2
, happens(self action(a; innerspeaks(m)); t2))
We de ne three more axioms that, according to Morin's theory, state the three
main causal directions between inner speech and self-awareness. Considering that
inner speech is an unconscious activity [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] despite it triggers self-awareness, we
do not model these axioms as common-knowledge.
        </p>
        <p>
          As result:
[A6] 8 a; ; m; (8 pi 2 m); t : initiates(self action(a; innerspeaks(m));
aware(a; pi); t)
3 The term comprehends is the name of the function de ned in the Fluid Construction
Grammar engine [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] for parsing an input utterance. Such a function returns the
meaning of the sentence.
4 The term produces is the name of the function de ned in the Fluid Construction
Grammar engine [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] for producing an output sentence given a set of meanings.
Such a function returns the syntactic form of the conjunctions of the meanings.
[A7] 8a; t1; t2; m; pi 2 m : clipped(t1; aware(a; pi); t2) )
9 t 2 [t1; t2] ; happens(self action(a; innerspeaks(m)); t)
[A8] 8a; t; m; pi 2 m : happens(self action(a; f ocuses(pi)); t) )
happens(self action(a; innerspeaks(m)); t)
[A6] postulates that inner speech precedes (causes) awareness. The formula
means that when the self-action related to the comprehension of a message
produced by itself (i.e. rehearsed) has taken place at time t (happens(e,t)), the
corresponding event has the aware uent about the content of the message as
an e ect. More speci cally, [A6] formalizes that 1 precedes 2 in the following:
[A7] postulates that inner speech accompanies a state of awareness.
That is:
1. If the robot is aware of the percept pi, and if the corresponding uent:
aware(a, pi)
has not been made false in the time interval [t1; t2]:
clipped(t1, aware(a, pi), t2)
2. the inner action to rehearse itself has taken in the meanwhile:
9 t 2 [t1; t2]
happens(selfaction(a, innerspeaks(m)), t)
with m related to pi, i.e. pi 2 m.
        </p>
        <p>Finally, [A8] states that inner speech is triggered by focus, that is a speci c
inner action. Then:
1. If the agent a focuses on a percept p at time t:</p>
        <p>happens(selfaction(a, focus(p)), t)
2. the inner speech action starts, begin m the message whose content is p:
selfaction(a, innerspeaks(m))
with p 2 m
The following axiom states that is common-knowledge that when an agent
perceives a fact, it is focusing almost one percept which will be related to that
fact:</p>
        <p>[A9] C(8a; t; 9 ( ; p) : P(a; t; ) , happens(self action(a; f ocuses(p))))
Considering that the action to formulate a message generates the corresponding
message m, we also postulate the axiom [A10]:</p>
        <p>[A10] C(8a; t; 9 ( ; m) :M(a; t; ) ) happens(self action(a; produces(m)))).
Finally, the awareness about itself, leads to the self-knowledge of the proposition
triggering it, so:
[A11] C(8a; t : holds(aware(a); t) , [9
: Kself (a; t; )]).</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5 Inference Schemata</title>
      <p>Some of the inference rules we de ne for reasoning by the calculus are:
[R1] SM(a(;aa;;tt;; ))
[R2] MP((aa;;tt;; ))
The generation of a message M about leads to rehearse it.
The perception of leads to a message about .</p>
      <p>Kself (a;t; )
[R3] Kself (a;t; Kself (a;t; ))
It captures an essential property of self-awareness: the knowledge of self
about leads to the knowledge about such a knowledge. That is \I know to
know".
[R4] K(a;t; )</p>
      <p>The knowledge of implies .
6</p>
    </sec>
    <sec id="sec-5">
      <title>Simulation</title>
      <p>
        A concrete example allows us to clarify and to show the application of the
calculus we propose. The scenario we consider is inspired to those described
at [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]: inner speech is conceived as a cognitive tool the individual uses for
selfre ection. In this case, the self is the object of the questions (`Who am I?', `What
am I doing?'), and the self-knowledge and information from the environment are
the answers. A person engaged in a task might self-re ect by this kind of inner
dialogue, and it was demonstrated it facilitates the task execution.
      </p>
      <p>Therefore, we describe the method for reasoning by the proposed calculus
about self-re ection during task execution. The knowledge of the robot changes
by self-re ection in respect to the knowledge of the typical reactive behavior,
putting the robot in the conditions to make more inferences than the case without
self-re ection.</p>
      <p>At this step, our goal is to demonstrate how the robot awareness and
selfawareness grow by modeling inner speech by the proposed calculus implementing
self-re ection. How the questions emerge, and the answers are produced are out
of the scope of this paper, and regard important future works.
6.1</p>
      <p>Encoding self-re ection
We suppose that the robot is engaged in a simple task, that is to remove an
object from its locations and to put it in a di erent location. In the reactive
behavior, the robot runs a set of routines which allow: to identify the object o,
to move to the location l, to grasp the object o from the location l, to place the
object o in the location l.</p>
      <p>Let suppose that at a certain time during task execution, the robot perceives
itself by a mirror, and it sees itself to perform one of the described actions. In
particular, it sees itself to grasp the object.</p>
      <p>It will be engaged in the following soliloquy: \What am I doing? Did I perform
yet this task?".</p>
      <p>We introduce the sort Location, and the following function symbols for
reasoning about this situation:</p>
      <p>grasp : Object ! ActionType
remember : ActionType</p>
      <p>Moment ! Boolean
The set of questions will generate a set of corresponding propositions:
\What am I doing?" ) \I grasp the object o"
) happens(action(a, grasp(o)),t)
\Did I perform this task?" ) \Yes, I do!"
) remember(grasp(o), t)</p>
      <p>We consider two temporal lines which allow to specify the narrative of
selfre ection, that are the times before inner speech and the time after inner speech.
Begin t1 the limit point, for all times before t1 (i.e. t &lt; t1), the robot performs
the task in reactive way, i.e. without self-re ection. At t = t1, the inner speech
triggers. For all times after t1 (i.e. t &gt; t1), the robot is provided with
selfre ection ability by inner speech. Therefore, the robot upon t1 will know that
until this moment it was not aware of the task: then it will be conscious that it
has carried out the speci c action.
6.2</p>
      <p>Reasoning
Now, let suppose that an event triggers inner speech. The robot perceives itself
by a mirror.
1. The starting premise is that the robot a sees itself by mirror to perform the
action at time t:
2. As consequence, from A9 it focuses on itself:</p>
      <p>P(a; t; happens(action(a; ); t))
happens(self action(a; f ocuses(a); t))</p>
      <p>Other kinds of percepts may activate the focus, as the object to take.
3. Given A9, from A8 the inner speech starts:</p>
      <p>happens(self action(a; innerspeaks( (happens(action(a; )))); t)
4. Hence, from A5 the following events take place:</p>
      <p>e1 = happens(self action(a; produces( (happens(action(a; ))))))
e2 = happens(self action(a; comprehends( (happens(action(a; ))))))
5. From A6, the uents of awareness start:
8pi 2</p>
      <p>(happens(action(a; ))) ! initiates(e; aware(pi))); t)
6. Form A10 the previous uents extend the knowledge about the self because
involves a:
7. From R4:</p>
      <p>Kself (a; t; happens(action(a; )))</p>
      <p>Kself (a; t; Kself (a; t; happens(action(a; ))))
By invoking the process with</p>
      <p>related to the rst question, that is
= happens(action(a; grasp(o); t1);
the message becomes = fa; grasp; og. The nal conclusion of an iteration of
the reasoning process is the following: the robot talks to itself upon t1, and it
becomes aware of itself, of the object o, and that it is performing the action grasp.
Moreover, it knows that it knows it. All these knowledge are not considered under
t1.</p>
      <p>If in the meanwhile the agent focuses on the new proposition</p>
      <p>(remember(grasp(o); t1))
the reasoning process iterates by starting from the new message = fremember,
grasp, og and new uents extent the agent awareness and self-awareness set.</p>
      <p>The proposed method is general-purpose, and allows to reason on inner
speech and self-awareness generically: it can be reused in any context that
requires reasoning by self-talking, not only for self-re ection.</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>In this paper, a preliminary version of a sorted-calculus to automate inner speech
and its links to awareness and self-awareness is proposed. The idea is to consider
the robot awareness and self-awareness as the set of uents the robot knows
as active at a time. The calculus allows to reason by natural deduction, and
extents the robot general knowledge by including uents representing internal
and external conditions. The inner speech allows to activates such uents. A
simple scenario is described for demonstrating how the calculus works. Many
other aspects have to be considered: the way the inner queries emerge, and
the ability to formulate answers are fundamentals. The processes underling the
composition of queries and answers may be automated by the same calculus by
adding further axioms, functions and sorts, or by considering models of
questionanswering systems. The work opens new challenges and research scenario not yet
investigated for robot awareness and self-awareness.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Fernando</given-names>
            <surname>Martinez-Manrique</surname>
          </string-name>
          ,
          <article-title>Agustin Vicente The activity view of inner speech Front Psychol</article-title>
          .
          <year>2015</year>
          ;
          <volume>6</volume>
          :
          <fpage>232</fpage>
          .
          <article-title>Published online 2015 Mar 9</article-title>
          . doi:
          <volume>10</volume>
          .3389/fpsyg.
          <year>2015</year>
          .00232
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Clowes</surname>
          </string-name>
          , Robert. (
          <year>2007</year>
          ).
          <article-title>A Self-Regulation Model of Inner Speech and Its Role in the Organisation Of Human Conscious Experience</article-title>
          .
          <source>Journal of Consciousness Studies</source>
          .
          <volume>14</volume>
          .
          <fpage>59</fpage>
          -
          <lpage>71</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Mirolli</surname>
          </string-name>
          ,
          <string-name>
            <surname>Marco</surname>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Towards a Vygotskyan Cognitive Robotics: The Role of Language as a Cognitive Tool</article-title>
          . New Ideas in Psychology 29:
          <fpage>298</fpage>
          -
          <lpage>311</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Morin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>Possible Links Between Self-Awareness and Inner Speech: Theoretical Background, Underlying Mechanism, and Empirical Evidence</article-title>
          .
          <source>Journal of Consciousness Studies</source>
          ,
          <volume>12</volume>
          (
          <issue>4-5</issue>
          ),
          <fpage>115</fpage>
          -
          <lpage>134</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Pipitone</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Lanza</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Seidita</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Chella</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Inner speech for a selfconscious robot</article-title>
          .
          <source>In CEUR Workshop Proceedings. CEUR-WS.</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Chella</surname>
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Pipitone</surname>
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2019</year>
          )
          <article-title>The inner speech of the IDyOT: Comment on "Creativity, information, and consciousness: The information dynamics of thinking" by Geraint A. Wiggins</article-title>
          .
          <source>Phys Life Rev.</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Govindarajulu</surname>
            <given-names>N.S.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Bringsjord</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>On Automating the Doctrine of Double E ect</article-title>
          .
          <source>Proceedings of the Twenty-Sixth International Joint Conference on Arti - cial Intelligence</source>
          .
          <source>(IJCAI-17)</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Shanahan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2000</year>
          ).
          <article-title>The Event Calculus Explained</article-title>
          .
          <source>In Arti cial Intelligence LNAI. 1600. 10.1007/3-540-48317-9 17</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>McIntyre</surname>
            ,
            <given-names>A. Relevance</given-names>
          </string-name>
          <string-name>
            <surname>Logic</surname>
          </string-name>
          . In Edward Zalta, editor,
          <source>The Standford Encyclopedia of Philosophy. September</source>
          ,
          <year>2014</year>
          edition,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>S.</given-names>
            <surname>Bringsjord</surname>
          </string-name>
          ,
          <string-name>
            <surname>N. Sundar G.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Thero</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Si</surname>
          </string-name>
          , `
          <article-title>Akratic robots and the computational logic thereof'</article-title>
          2014
          <source>IEEE International Symposium on Ethics in Science, Technology and Engineering</source>
          , Chicago, IL,
          <year>2014</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          . doi:
          <volume>10</volume>
          .1109/ETHICS.
          <year>2014</year>
          .6893436
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Morin</surname>
          </string-name>
          ,
          <string-name>
            <surname>Alain</surname>
          </string-name>
          (
          <year>1995</year>
          ).
          <article-title>Characteristics of an e ective internal dialogue in the acquisition of self-information</article-title>
          .
          <source>Imagination, Cognition and Personality</source>
          <volume>15</volume>
          (
          <issue>1</issue>
          ):
          <fpage>45</fpage>
          -
          <lpage>58</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Kendall</surname>
            ,
            <given-names>P. C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Hollon</surname>
            ,
            <given-names>S. D.</given-names>
          </string-name>
          (
          <year>1981</year>
          ).
          <article-title>Assessing self-referent speech: Methods in the measurement of self-statements</article-title>
          . In P. C. Kendall and
          <string-name>
            <given-names>S. D.</given-names>
            <surname>Hollon</surname>
          </string-name>
          (Eds.),
          <article-title>Assessment strategies for cognitive-behavioral interventions</article-title>
          . New York: Academic Press.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Arkoudas</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Bringsjord</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2008a</year>
          ),
          <article-title>Toward Formalizing Common-Sense Psychology: An Analysis of the False-Belief Task</article-title>
          , in T.-
          <string-name>
            <given-names>B.</given-names>
            <surname>Ho</surname>
          </string-name>
          &amp;
          <string-name>
            <surname>Z.-H. Zhou</surname>
          </string-name>
          , eds,
          <source>`Proceedings of the Tenth Paci c Rim International Conference on Arti cial Intelligence (PRICAI</source>
          <year>2008</year>
          )
          <article-title>'</article-title>
          ,
          <source>number 5351 in `Lecture Notes in Arti cial Intelligence (LNAI)'</source>
          , Springer-Verlag, pp.
          <fpage>1729</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Steels</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Language Re-Entrance and the `Inner Voice</article-title>
          .
          <source>' Journal of Consciousness Studies</source>
          <volume>10</volume>
          (
          <issue>4-5</issue>
          ),
          <volume>173185</volume>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Bringsjord</surname>
            ,
            <given-names>S</given-names>
          </string-name>
          ; Govindarajulu,
          <string-name>
            <surname>N.S.</surname>
          </string-name>
          (
          <year>2012</year>
          )
          <article-title>Given the Web</article-title>
          , What is Intelligence, Really? Metaphilosophy,
          <volume>43</volume>
          (
          <issue>4</issue>
          ):
          <fpage>361532</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Gentzen</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          (
          <year>1969</year>
          )
          <article-title>Investigations into Logical Deduction in M. E</article-title>
          . Szabo (ed.),
          <source>The Collected Works of Gerhard Gentzen</source>
          , Amsterdam.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Steels</surname>
          </string-name>
          , Luc.
          <source>Basics of uid construction grammar Journal Article Constructions and frames</source>
          ,
          <volume>9</volume>
          (
          <issue>2</issue>
          ), pp.
          <fpage>178</fpage>
          -
          <lpage>255</lpage>
          ,
          <year>2017</year>
          , ISBN:
          <fpage>1876</fpage>
          -
          <lpage>1933</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>