<!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>Higher-order Logic Description of MDPs to Support Meta-cognition in Arti cial Agents</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vincenzo Cannella</string-name>
          <email>vincenzo.cannella26@unipa.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonio Chella</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roberto Pirrone</string-name>
          <email>roberto.pirrone@unipa.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Ingegneria Chimica</institution>
          ,
          <addr-line>Gestionale, Informatica, Meccanica, Viale delle Scienze, Edi cio 6, 90100 Palermo</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>manner. The presented formalism allows manipulating structures, which describe entire MDP classes rather than a speci c process.</p>
      </abstract>
      <kwd-group>
        <kwd>Markov Decision Process</kwd>
        <kwd>ADD</kwd>
        <kwd>Higer-order logic</kwd>
        <kwd>u-MDP</kwd>
        <kwd>meta-cognition</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        An arti cial agent acting in natural environments has to deal with uncertainty
at di erent levels. In a changing environment meta-cognitive abilities can be
useful to recognize also when two tasks are instances of the same problem with
di erent parameters. The work presented in this paper tries to address some
of the issues related to such an agent as expressed above. The rationale of the
work derives from the previous research of the authors in the eld of planning
in uncertain environments [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] where the \uncertainty based MDP" (u-MDP)
has been proposed. u-MDP extends plain MDP and can deal seamlessly with
uncertainty expressed as probability, possibility and fuzzy logic. u-MDPs have
been used as the constituents of the meta-cognitive architecture proposed in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
where the \meta-cognitive u-MDP" perceives the external environment, and also
the internal state of the \cognitive u-MDP" that is the actual planner inside the
agent. The main drawbacks su ered by MDP models are both memory and
computation overhead. For this reason, many e orts have been devoted to de ne a
compact representation for MDPs aimed at reducing the need for computational
resources. The problems mentioned above are due mainly to the need of
enumerating the state space repeatedly during the computation. Classical approaches
to avoid enumerating the space state are based on either numerical techniques or
propositional logic. The rst representations for the conditional probability
functions and the reward functions in MDPs were numerical, and they were based
on decision trees and decision graphs. These approaches have been subsequently
substituted by algebraic decision diagrams (ADD) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ][
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Numerical descriptions
are suitable to model mathematically a MDP but they fail to emphasize the
underlying structure of the process, and the relations between the involved
aspects. Propositional or relational representations of MDPs [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] are variants of the
probabilistic STRIPS [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]; they are based on either rst-order logic or situation
calculus [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ][
        <xref ref-type="bibr" rid="ref9">9</xref>
        ][
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In particular, a rst-order logic de nition of Decision
Diagrams has been proposed. In this work we propose a mixed representation that
combines both numerical and propositional formalisms to describe ADDs using
rst-, second- and third-order logic. The presented formalism allows
manipulating structures, which describe entire MDP classes rather than a speci c process.
Besides the representation of a generic ADD as well as the implementation of
the main operators as they're de ned in the literature, our formalism de nes
MetaADDs (MADD) as suitable ADD abstractions. Moreover, MetaMetaADDs
(MMADD) have been implemented that are abstractions of MADDs. The classic
ADD operators have been abstracted in this respect to deal with both MADDs
and MMADDs. Finally, a recursive scheme has been introduced in order to
reduce both memory consumption and computational overhead.
2
      </p>
      <p>
        Algebraic Decision Diagrams
A Binary Decision Diagram (BDD) is a directed acyclic graph intended for
representing boolean functions. It represents a compressed decision tree is. Given a
variable ordering, any path from the root to a leaf node in the tree can contain
a variable just once. An Algebraic Decision Diagram (ADD) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ][
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] generalizes
BDD for representing real-valued functions f : f0; 1gn ! R (see gure 1). When
used to model MDPs, ADDs describe probability distributions. The literature in
this eld reports the de nition of the most common operators for manipulating
ADDs, such as addition, multiplication, and maximization. A homomorphism
exists between ADDs and matrices. Sum and multiplication of matrices can be
expressed with corresponding operators on ADDS, and suitable binary operators
have been de ned purposely in the past. ADDs have been very used to
represent matrices and functions in MDPs. SPUDD is the most famous example of
applying ADDs to MDPs[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
3
      </p>
      <p>Representing ADDs in Higher-order logic
In our work ADDs have been described in Prolog using rst-order logic as a fact
in a knowledge base to exploit the Prolog capabilities of managing higher-order
logic. An ADD can be regarded as a couple hS; vi where S is the tree's structure,
which is made up by nodes, arcs, and labels, and v is the vector containing the
values in terminal nodes of the ADD. Let's consider the ADD described in the
previous section. Figure 1 shows its decomposition in the structure-vector pair.
Terminal nodes are substituted with variables, and the ADD is transformed into
its structure. Each element of the vector v is a couple made up by a proper
variable inserted into the i-th leaf node of the structure, and a probability value
that was stored originally into the i-th leaf node.</p>
      <p>In general, ADDs can be represented compactly through a recursive de nition
due to the presence of isomorphic sub-graphs. At the same manner, a structure
can be de ned recursively. The gure 2 shows an example.</p>
      <p>high v low
S= p
left
A
right left
B C
p right v=</p>
      <p>D</p>
      <p>A 0.1
B 0.2
C 0.3</p>
      <p>Following this logic, we can introduce the concept of MetaADD (MADD),
which is a structure-vector pair hS; vi where S is the plain ADD structure, while
v is an array of variables that are uni ed with no value (see gure 3). A MADD
expresses the class of all the di erent instances of the same function, which
involve the same variables but can produce di erent results.</p>
      <p>An operator op can be applied to MADDs just like in the case of ADDs.
In this way, the de nition of the operator is implicitly extended. The actual
implementation of an operator op applied to MADDs can be derived by the
corresponding operator de ned for ADDs. Given three ADDs, add1, add2, and add3,
and their corresponding MADDs madd1, madd2, and madd3, then add1 op add2 =
add3 ) madd1 op madd2 = madd3.</p>
      <p>The de nition of the variables in madd3 depends on the operator. We will
start explaining the implementation of a generic operator for ADDs. Assume
that the structure-vector pairs for two ADD's are given: add1 = hS1; v1i, add2 =
hS2; v2i. Running the operator will give the following result:</p>
      <p>add1 op add2 = hS3; v3i</p>
      <p>Actual execution is split into two phases. At rst, the operator is applied to
both structures and vectors of the input ADDs separately, then the resulting
temporary ADD is simpli ed.</p>
      <p>Stemp = S1 op S2
vtemp = v1 op v2
simplify(Stemp; vtemp) ! hS3; v3i</p>
      <p>Here op is the \expanded" form of the operator where the structure-vector
pair is computed plainly. The equations above show that Stemp depends only
on S1 and S2, and it is the same for vtemp with respect to v1 and v2.The
simplify( ; ) function represents the pruning process, which takes place when
all the leaf nodes with the same parent share the same value. In this case, such
leaves can be pruned, and their value is assigned to the parent itself. This process
is repeated until there are no leaves with the same value and the same parent in
any location of the tree (see gure 4). Such a general formulation of the e ects
produced by an operator on a couple of MADDs can be stored in memory as
Abstract Result (ABR). ABRs are de ned recursively to save both memory and
computation too. An ABR is a t-uple hM1; M2; Op; M3; F i, where M1, M2 and
M3 are MADDs, Op is the operator that combines M1, M2 and returns M3,
while F is a list of relationships between the variables in M1, M2 and M3, which
in turn depend on Op. We applied the abstraction process described so far, to
MADDs also by replacing its labels with non uni ed variables. The resulting
structure-vector pairs have been called MetaMetaADDs (MMADD) (see gure
left
v1
p
right left
v2
v3
p</p>
      <p>+
right left
p
right left</p>
      <p>p
v4
w1
w2
w3
=
right left
w4
s1
p
5). We called such computational entity meta-structure M S. It has neither values
nor labels: all its elements are variables. M S is coupled with a corresponding
vector v, which contains variable-label couples (see Figure 5). The de nition of
MetaMetaStructure
operators, their abstraction, and the concept of ABR remain unchanged also at
this level of abstraction.
4</p>
      <p>Discussion of the Presented Formalism and Conclusions
The generalizations of ADDs to second- and third-order logic that were
introduced in the previous section, allow managing MDPs in a more e cient way than
a plain rst-order logic approach. Most part of MDPs used currently, share many
regularities in either transition or reward function. As said before, such functions
can be described by ADDs. If these regularities appear, ADDs are made up by
sub-ADDs sharing the same structures. In these case, computing a plan involves
many times the same structure with the same elaboration in di erent steps of
the process. Our formalism allows to compute them only once and save it in a
second- and third-order ABR. Every time the agent has to compute structures
that have been used already, it can retrieve the proper ABR to make the whole
computation faster. Computation can be reduced also by comparing results in
di erent MDPs. In many cases, two MDPs can share common descriptions of the
world, similar actions, or goals, so the results found for a MDP could be suitable
for the other one. A second-order description allows comparing MDPs that
manage problems de ned in similar domains, with the same structure but di erent
values. Finally, a third-order description allows to compare MDPSs, which
manage problems de ned in di erent domains but own homomorphic structures. In
this case, every second- and third- order ABR computed for the rst MDP can
be useful to the other one. This knowledge can be shared by di erent agents.
Adding ABRs to the knowledge base enlarges the knowledge of the agent, and
reduces the computational e ort but implies a memory overhead. Our future
investigation will be devoted to devise more e cient ways for storing and retrieving
ABRs thus improving the overall performances of the agent.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>R.I.</given-names>
            <surname>Bahar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.A.</given-names>
            <surname>Frohm</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.M.</given-names>
            <surname>Gaona</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.D.</given-names>
            <surname>Hachtel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Macii</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pardo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Somenzi</surname>
          </string-name>
          .
          <article-title>Algebraic decision diagrams and their applications</article-title>
          .
          <source>In ComputerAided Design</source>
          ,
          <year>1993</year>
          . ICCAD-
          <volume>93</volume>
          . Digest of Technical Papers.,
          <year>1993</year>
          IEEE/ACM International Conference on, pages
          <volume>188</volume>
          {
          <fpage>191</fpage>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Craig</given-names>
            <surname>Boutilier</surname>
          </string-name>
          , Raymond Reiter, and
          <string-name>
            <given-names>Bob</given-names>
            <surname>Price</surname>
          </string-name>
          .
          <article-title>Symbolic Dynamic Programming for First-Order MDPs</article-title>
          . In IJCAI, pages
          <volume>690</volume>
          {
          <fpage>700</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Vincenzo</given-names>
            <surname>Cannella</surname>
          </string-name>
          , Antonio Chella, and
          <string-name>
            <given-names>Roberto</given-names>
            <surname>Pirrone</surname>
          </string-name>
          .
          <article-title>A meta-cognitive architecture for planning in uncertain environments</article-title>
          .
          <source>Biologically Inspired Cognitive Architectures</source>
          ,
          <volume>5</volume>
          :
          <issue>1</issue>
          {
          <issue>9</issue>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Vincenzo</given-names>
            <surname>Cannella</surname>
          </string-name>
          , Roberto Pirrone, and Antonio Chella.
          <article-title>Comprehensive Uncertainty Management in MDPs</article-title>
          . In Antonio Chella, Roberto Pirrone, Rosario Sorbello, and Kamilla R. Johannsdottir, editors,
          <source>BICA</source>
          , volume
          <volume>196</volume>
          <source>of Advances in Intelligent Systems and Computing</source>
          , pages
          <volume>89</volume>
          {
          <fpage>94</fpage>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Richard</given-names>
            <surname>Dearden</surname>
          </string-name>
          and
          <string-name>
            <given-names>Craig</given-names>
            <surname>Boutilier</surname>
          </string-name>
          .
          <article-title>Abstraction and approximate decisiontheoretic planning</article-title>
          .
          <source>Artif</source>
          . Intell.,
          <volume>89</volume>
          (
          <issue>1-2</issue>
          ):
          <volume>219</volume>
          {
          <fpage>283</fpage>
          ,
          <year>January 1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Charles</given-names>
            <surname>Gretton</surname>
          </string-name>
          and
          <string-name>
            <given-names>Sylvie</given-names>
            <surname>Thiebaux</surname>
          </string-name>
          .
          <article-title>Exploiting rst-order regression in inductive policy selection</article-title>
          .
          <source>In Proceedings of the 20th UAI Conference, UAI '04</source>
          , pages
          <fpage>217</fpage>
          {
          <fpage>225</fpage>
          ,
          <string-name>
            <surname>Arlington</surname>
          </string-name>
          , Virginia, United States,
          <year>2004</year>
          . AUAI Press.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Jan</given-names>
            <surname>Friso</surname>
          </string-name>
          Groote and
          <string-name>
            <given-names>Olga</given-names>
            <surname>Tveretina</surname>
          </string-name>
          .
          <article-title>Binary decision diagrams for rst-order predicate logic</article-title>
          .
          <source>J. Log. Algebr. Program.</source>
          ,
          <volume>57</volume>
          (
          <issue>1</issue>
          {2):1 {
          <fpage>22</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Jesse</given-names>
            <surname>Hoey</surname>
          </string-name>
          ,
          <article-title>Robert St-aubin, Alan Hu, and Craig Boutilier</article-title>
          . Spudd:
          <article-title>Stochastic planning using decision diagrams</article-title>
          .
          <source>In In Proceedings of the Fifteenth Conference on Uncertainty in Arti cial Intelligence</source>
          , pages
          <fpage>279</fpage>
          {
          <fpage>288</fpage>
          . Morgan Kaufmann,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Saket</given-names>
            <surname>Joshi</surname>
          </string-name>
          , Kristian Kersting, and
          <string-name>
            <given-names>Roni</given-names>
            <surname>Khardon</surname>
          </string-name>
          .
          <article-title>Generalized rst order decision diagrams for rst order markov decision processes</article-title>
          . In Craig Boutilier, editor,
          <source>IJCAI</source>
          , pages
          <year>1916</year>
          {
          <year>1921</year>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Saket</given-names>
            <surname>Joshi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Roni</given-names>
            <surname>Khardon</surname>
          </string-name>
          .
          <article-title>Stochastic planning with rst order decision diagrams</article-title>
          . In Jussi Rintanen, Bernhard Nebel, J. Christopher Beck, and Eric A. Hansen, editors,
          <source>ICAPS</source>
          , pages
          <volume>156</volume>
          {
          <fpage>163</fpage>
          . AAAI,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>