<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Survey and perspectives, Evol. Comput.</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1016/0010-0277(83</article-id>
      <title-group>
        <article-title>Epistemic Planning in a Fast and Slow Setting</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Francesco Fabiano</string-name>
          <email>francesco.fabiano@unipr.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marianna Bergamaschi Ganapini</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lior Horesh</string-name>
          <email>lhoresh@us.ibm.com</email>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Loreggia</string-name>
          <email>andrea.loreggia@unibs.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Keerthiram Murugesan</string-name>
          <email>keerthiram.murugesan@ibm.com</email>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vishal Pallagani</string-name>
          <email>vishalp@mailbox.sc.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesca Rossi</string-name>
          <email>francesca.rossi2@ibm.com</email>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Biplav Srivastava</string-name>
          <email>biplav.s@sc.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Artificial Intelligence Institute, University of South Carolina</institution>
          ,
          <addr-line>Columbia</addr-line>
          ,
          <country country="US">United States</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Information Engineering, University of Brescia</institution>
          ,
          <addr-line>Brescia</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Department of Mathematical, Physical and Computer Sciences, University of Parma</institution>
          ,
          <addr-line>Parma</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Philosophy Department, Union College</institution>
          ,
          <addr-line>New York</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff4">
          <label>4</label>
          <institution>Thomas J. Watson Research Center</institution>
          ,
          <addr-line>Yorktown Heights, New York</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <volume>27</volume>
      <issue>2019</issue>
      <fpage>9</fpage>
      <lpage>34</lpage>
      <abstract>
        <p>AI applications are by now pervading our everyday life. Nonetheless, most of these systems lack many capabilities that, we humans, naturally consider to be included in a notion of “intelligence”. In this paper we present a multi-agent system, inspired by the cognitive theory known as thinking fast and slow by D. Kahneman, to solve Multi-agent Epistemic Planning (MEP) problems. This is an instance of a general AI architecture, referred to as SOFAI (for Slow and Fast AI). This paradigm exploits multiple solving approaches (referred to as fast and slow solvers) and a metacognition module to arbitrate between them and enhance the reasoning process, that, in this specific case, is concerned with planning in epistemic settings. The behavior of this system is then compared to a state-of-the-art MEP solver, showing that the newly introduced system presents better results in terms of generality, solving a much wider set of problems with an acceptable trade-of between solving times and solution accuracy.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Fast and Slow AI</kwd>
        <kwd>Epistemic Planning</kwd>
        <kwd>Metacognitive Reasoning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The AI community has formalized and developed several techniques that permit to model agents
which can solve intricate problems in autonomy. These techniques range from the use of various
formal logics to the creation of neural-based structures. The former is an area of study that
tries to define rational behavior for our systems while the latter, imitating the physiology of
our brain, aims to emulate (to some degree) the human behavior.</p>
      <p>
        In this work we present an architecture that aims to allow multiple techniques to be exploited
and we show its behavior on solving multi-agent epistemic planning problems (MEPs). This
architecture is inspired by the well-know cognitive theory Thinking Fast and Slow by Kahneman
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], since it includes both “fast” and “slow” solvers and a metacognitive module to arbiter between
the two. Slow (or System 2, System-2) solvers are solving problems by reasoning and (usually)
exploiting symbolic techniques, while fast (or System 1, System-1) solvers just employ past
experience to identify the solution to a given problem. A metacognitive module provides a
centralized governance and chooses the best solver for the problem at hand [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>In this work, we consider the planning domain and we employ an instance of this architecture
that includes an existing epistemic planner as the slow solver and three case-based plan selectors
as fast solvers. Experimental results on a widely used planning problem domain show that the
behavior of our architecture is better than using the existing planner alone, both in terms of
solved instance and average solving time.</p>
      <p>Summarizing, the main contributions of this paper are:
• The definition of an architecture, inspired by the thinking fast and slow theory, to tackle
epistemic planning problems;
• The characterization of fast and slow planners/solvers for the architecture, as well as the
metacognitive module;
• Experimental results on an epistemic planning domain, showing the behavior of the
architecture when using each of three diferent fast planners.</p>
      <p>The paper is structured as follow. After this brief introduction, we introduce the background
knowledge on the thinking fast and slow theory and multi-agent epistemic planning. We
then describe how to unify the main concepts of the thinking fast and slow theory in the
epistemic planning environment and we give a complete characterization of the architecture,
with special emphasis on the metacognitive module and the two kinds of solvers. We follow
with a description of the experimental setting, tables and graphs providing the experimental
results showing the behavior of our system on planning problems, and a discussion of such
results. We conclude the paper summarizing the main contribution and hinting at ongoing
work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <sec id="sec-2-1">
        <title>2.1. Thinking Fast and Slow</title>
        <p>
          Thanks to improved algorithms, techniques, computational power, and dedicated hardware [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ],
the various automated reasoning tools are becoming more and more eficient and reliable in
dealing with their areas of interest. However, all of these tools still lack capabilities that, we
humans, naturally consider to be included in a notion of “intelligence” as, for example,
generalizability, robustness, and abstraction. For these reasons, a growing segment of the AI community
is attempting to address these limitations and is trying to create systems that display more
“human-like qualities”. One of the central strategies to tackle this problem, adopted by various
research groups [
          <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7 ref8">4, 5, 6, 7, 8</xref>
          ], envisions tools, usually referred to as cognitive architectures [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ],
that exploit a combination of both the aforementioned approaches. In particular, in this paper,
we explore multi-agent epistemic planning in the context of one of these architecture that stems
from a modern cognitive theory, i.e., the well-known Thinking Fast and Slow paradigm proposed
by D. Kahneman [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
        <p>Kahneman’s theory states that humans’ reasoning capabilities are categorized into two diverse
“Systems”, called System-1 (S1) and System-2 (S2). In particular, S1 identifies the intuitive
and imprecise decision-making processes (“thinking fast”), while S2 provides tools to tackle
all those situations where complex decisions need to be taken following logical and rational
thinking (“thinking slow”). Other than problem dificulty, S1 and S2 discern which problem
they should tackle based on the experience accumulated on the problem itself. That is, when
a new non-trivial problem has to be solved, it is handled by S2. However, certain problems
that initially can be solved only by S2, can later be solved by S1 after having accumulated a
certain amount of experience. The reason is that the procedures used by S2 to find solutions to
such problems also accumulate examples that S1 can later use readily with little efort. We note
that S1 and S2 are not systems in the multi-agent sense, but rather they encapsulate two wide
classes of information processing.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Multi-agent Epistemic Planning</title>
        <p>
          Automated planning is a branch of artificial intelligence where the objective is to find plans, that
is, sequences of actions, that can lead the agent to achieve desired goals. Epistemic planning is
a specific form of planning where the agent must additionally deal with the epistemic notions
of knowledge and beliefs. In the Multi-agent Epistemic Planning (MEP) problem, there are at
least two planning agents. In what follows, we will only give an overview of MEP, referring the
readers to Fagin et al. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], Baral et al. [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], Van Ditmarsch et al. [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], Bolander [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] for details.
        </p>
        <p>
          The idea of representing knowledge and beliefs has always been central in many research
areas such as logics, philosophy, and computer science, e.g., see Hintikka [14]. In this setting, we
are concerned with finding the best series of action that modifies the information flows to enable
the agents to reach goals that (might) refer to physical objects or agents’ knowledge/beliefs [15].
We will use the term “knowledge” to encapsulate both the notions of an agent’s knowledge
and their beliefs. These concepts are distinct in Dynamic Epistemic Logic (DEL), which is the
underlying basis of the MEP problem, but for simplicity in our high level introduction we will
treat them as one. More details on the actual diferences on these concept can be found in Fagin
et al. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>While completely presenting DEL and the multi-agent epistemic setting background is not in
the scope of this paper, let us quickly introduce some fundamental concepts that would allow
to provide an intuitive meaning to this area of study. In particular, in a MEP problem we are
concerned with the knowledge of the agents about the world or about others’ knowledge. This
information is expressed through belief formulae, i.e., formulae that can express: i) physical
properties of the worlds; ii) knowledge of some agent (or group of agents) about these properties;
and iii) nested knowledge about others’ knowledge.</p>
        <p>
          The semantics of DEL formulae is traditionally expressed using pointed Kripke structures [16].
The epistemic action language that we used in our work implements three types of action and
three observability relations following the standard proposed by Baral et al. [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. In particular,
each agent is assumed to be able to perform one of the following types of action: 1) World-altering
action: used to modify certain properties (i.e., fluents) of the world; 2) Sensing action: used by
an agent to refine her beliefs about the world; and 3) Announcement action: used by an agent to
afect the beliefs of other agents. Moreover, each agent is associated to one of the following
observability relations during an action execution: 1) Fully-observant: the agent is aware of the
action execution and also knows the efect of the action; 2) Partially-observant: the agent is
aware of the action execution without knowing the efects of the action; and 3) Oblivious: the
agent is not even aware of the action execution. Each type of action defines a diverse transition
function and alters an epistemic state in diferent ways.
        </p>
        <p>
          Let us note that the amount of information carried within a single epistemic state (i.e., a Kripke
structure) and the high degree of liberty derived by complex transition functions (e.g. Baral
et al. [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], Fabiano et al. [17, 18]) make planning in the multi-agent epistemic planning a very
heavy-resource process that often brings unfeasibility to the planning task itself [19].
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Thinking Fast and Slow in MEP</title>
      <p>Two of the prominent lines of work in AI, i.e., data-driven approaches and symbolic reasoning,
seem to embody (even if loosely) the two Systems presented above. In particular, data-driven
approaches shares with S1 the ability to build (possibly imprecise and biased) models from past
experience, often represented by sets of data. For example, perception activities, such as seeing,
that in humans are handled by S1, are currently addressed with machine learning techniques in
AI. Similarly, S2’s capability to solve complex problems using a knowledge-based approach is
somewhat emulated by AI techniques based on logic, search, and planning, that make use of
explicit and well-structured knowledge. While the parallelism data-driven–S1 and symbolic
–S2 represent a starting point in developing an automated fast and slow AI, we should not
assume these two techniques to be the exclusive representative of the respective System.</p>
      <p>In this paper, we transpose the concepts derived by the thinking fast and slow paradigm into
the MEP setting. We will start by presenting a general definitions for S1 and S2 solvers and
then describe the actual implementations of S1 and S2 reasoners in the epistemic setting. We
will make use of three models to represent key modules of our architecture, that from now on
we will call Plan-SOFAI. In particular, the model of self is used to store the experience of the
architecture, the model of the world contains the knowledge accumulated by the system over the
external environment and the expected tasks, while the model of others contains the knowledge
and beliefs about other agents who may act in the same environment. Finally, the model updater
acts in the background to keep all models updated as new knowledge of the world, of other
agents, or new decisions are generated and evaluated.</p>
      <p>The general characterization of a S1 solver, triggered immediately when the problem is
presented to the Plan-SOFAI, does not require many factors.</p>
      <p>• These solvers are assumed to rely on the past experience of the Plan-SOFAI itself.
• Moreover, we assume that the running time for S1 approaches to be independent of the
input and, instead, to depend on the experience accumulated by the overall architecture,
in the model of self.
• Finally, we consider a S1 solver to be an entity that relies on “intuition” (with a slight
abuse of notation).</p>
      <p>Considering these characteristics, the next question that naturally arises is can MEP ever be
considered as a S1 task, considering that epistemic planners, in literature, always rely on look-ahead
strategies? We considered some ideas that could help us develop a S1 epistemic planner. Among
those, only a few were not using search methods (intensively) but rather mostly relied on
experience. Finally, we identified a feasible, yet functional, way to exploit experience in the
epistemic planning setting. The idea is to make use of pre-computed plans; that is, S1 can be
used to determine which of the plans already generated by past experiences is the one that
“fits the best” the current problem. Of course, determining if an already computed plan is a
good choice or not for the current problem is a dificult research question on its own. Since the
focus of this work is to devise a fast and slow architecture for epistemic planning rather than
optimizing its internal components, we decided to use a simple, yet efective, criterion to select
the best fitting plan. In particular, S1 selects, among past solutions for the same domain, the
pre-computed plan that is the closet in term of Levenshtein Distance and Jaccard Similarity [20],
as we will see in more detail later.</p>
      <p>Our Plan-SOFAI is a S1-by-default architecture: whenever a new problem is presented,
a S1 solver with the necessary skills to solve the problem starts working on it, generating a
solution and a confidence level. This allows to minimize the resource consumption making use
of the much faster S1 solving process when there is no need for S2—that is when the solution
proposed by S1 is “good enough”. Nevertheless, as for the human brain, S1 may encounter
problems that it cannot solve, either due to its lack of experience or the inherent intricacy
of the problem itself. These situations require, then, the use of more thought-out resolution
processes, generally provided by S2 approaches. Notice that we do not assume S2 solvers to be
always better than S1 solvers: given enough experience, some tasks could be better solved by
S1 solvers. This behavior also happens in human reasoning [21]. In the particular case of MEP,
we can consider as S2 solving procedures the tools that employ traditional planning strategies.
These can be, for example, the planner RP-MEP [22] or EFP 2.0 [17]. While these two solvers
adopt diferent strategies to solve a Multi-agent Epistemic Planning problem, they both explore
the search space and do not rely on experience. In particular, as we will see later, in this work
we will make use of EFP 2.0 by Fabiano et al. [17].</p>
    </sec>
    <sec id="sec-4">
      <title>4. The Fast and Slow MEP Architecture</title>
      <sec id="sec-4-1">
        <title>4.1. The SOFAI Architecture</title>
        <p>
          As main contribution of this paper, we present an architecture inspired by cognitive theories
to solve the multi-agent epistemic planning problem. In particular, our tool is heavily based
on a recent architecture called SOFAI [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] that is, in turn, inspired by the dual-system proposed
by Kahneman [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Following the ideas of Kahneman, the architecture is equipped with two
types of Systems dedicated to computing a solution to an incoming task, and a third agent in
charge of orchestrating the overall reasoning task.
        </p>
        <p>In this architecture, incoming problems are initially handled by S1 solvers that have the
required skills to tackle them. S1 solvers compute a solution relying on the past experience
collected by the architecture. The computation is not afected by the size of the input problem
and thus S1 solvers provide a solution in constant time. Past experience is maintained in the
model of the self. A model updater agent is in charge of keeping all models updated as new
something happens (e.g., new decisions are generated). Let us note that, in our case, the updater
agent is in charge of storing each new solution found by S2.</p>
        <p>The solution computed by the S1 solver (from now on for the sake of simplicity, let us
assume it is just one S1 solver) and the corresponding confidence level is made available to the
metacognitive (MC) module which can now choose between the proposed solution or engaging
a S2 solver. An S2 agent is typically a reasoning model that is able to deal with the current
problem, this kind of solver are more demanding in terms of time and other types of resources.
For this reason, only MC agent can decide to activate an S2 solver.</p>
        <p>MC agent assessment is based on several checks that are devoted to establishing whether it
is worth adopting the solution proposed by S1 or engaging S2 for a more accurate solution.
This allows for minimizing time to action when there is no need for S2 processing.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. The Metacognitive Module</title>
        <p>
          For our MEP solver, following the SOFAI architecture Ganapini et al. [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], we also defined a
metacognition process. This means that we want our Plan-SOFAI to be equipped with a set
of mechanisms that would allow it to both monitor and control its own cognitive activities,
processes, and structures. The goal of this form of control is to improve the quality of the
system’s decisions [23]. Metacognition models have been largely studied [
          <xref ref-type="bibr" rid="ref9">24, 25, 9, 26</xref>
          ] in the
past years. Among the various proposed modalities, we envisioned our Plan-SOFAI to have a
centralized metacognitive module that exploits both internal and external data and arbitrates
between S1 and S2 solvers. Let us note that this module is structurally and conceptually
diferent from an algorithm portfolio selection [27, 28].
        </p>
        <p>We propose a metacognitive module that itself follows the thinking fast and slow paradigm.
This means that our MC module is comprised of two main phases: the first one takes intuitive
decisions without considering many factors, while the second one is in charge of carefully
selecting the best solving strategy, considering all the available elements whenever the first
phase did not manage to return an adequate solution. We will refer to the former with MC-1 and
to the latter with MC-2. MC-1 is in charge of deciding whether to accept the solution proposed
by the S1 solver or to activate MC-2. MC-1 takes this decision considering the confidence ,
among others few factors, of the S1 solver: if the confidence, which usually depends on the
amount of experience, is high enough, MC-1 adopts the S1 solver’s solution.</p>
        <p>If MC-1 decides that the solution of the S1 solver is not “good enough”, it engages MC-2.
Intuitively, this module needs to evaluate whether to accept the solution proposed by the S1
solver or which S2 solver to activate for the task. To do this, MC-2 compares the expected
reward for the S2 solver with the expected reward of the S1 one: if the expected additional
reward of running the S2 solver, compared to the S1 one, is large enough, then MC-2 activates
the S2 solver. MC-2, following the human reasoning model [29], is designed to avoid costly
reasoning processes unless the additional cost is compensated by an even greater expected
reward for the solution that the S2 solver will devise.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Metacognition at Work</title>
      <p>In what follows, we provide a “concrete” view of the S1/S2 framework for the multi-agent
epistemic planning setting. To do so, we will make use of Algorithms 1–3.</p>
      <p>Before going into detail, let us briefly comment on the input and on the parameters of these
algorithms. The process requires the domain description (D), a particular instance (I ) that we
want to solve on such domain, and the time limit (TL) within which the instance needs to
be solved. The parameters, instead, represent some internal values that capture some sort of
“inclination” of the architecture towards employing S1. In particular, we have that:
i) the acceptable correctness (A) represents the minimum ratio of solved goals, w.r.t. the
total number of them, that defines an acceptable solution. Let us note that this measure
can also be changed to depend on other factors or to account for goals importance, for
example. Its default value is 0.5;
ii) T1 represents the minimal amount of experience required by the Plan-SOFAI to consider
a solution proposed by S1. Its default value is set to 20;
iii) T2 represents the minimum number of S1 usages after which it will consider S1
accountable for its mistakes. This threshold allows the architecture to initially try to employ S1
more freely, to augment its experience. Conversely, after the minimum number T2 of
solutions, the metacognition actually uses the previous performances of S1 to check for
S1 accountability. Its default value is set to 20;
iv) T3 is a value between 0 and 1 and it is used to represents the risk-aversion of the
architecture: the higher the value the more incline the Plan-SOFAI is to use S2. The default
value is set to 0.9;
v)  is a factor that is used to scale the probability that S1 solution may actually be employed
even if it was not considered convenient. This is added to increase the number of S1
usages, and consequently its experience, in those situations where the low confidence of
S1 itself may limit it too aggressively. Let us note that the solution proposed by S1 needs
to be validated before being accepted in any case (Line 2 of Algorithm 2). Its default value
is 0.1;
vi) (M) represents the experience of the Plan-SOFAI. Every time a solution for a problem is
found, this is stored in the memory with a series of useful information, e.g., the correctness
value, the employed system (i.e., S1 or S2), the dificulty of the instance, the required
time, and so on.</p>
      <p>We are now ready to describe in more detail Algorithms 1–3. Let us start by presenting
Algorithms 1. In particular, we can identify MC-1 in Lines 1–16, and MC-2 in Lines 17–39.
As already mentioned, to better emulate the thinking fast and slow paradigm, we assume
System-1 to automatically start and provide a solution at the beginning of MC-1. That is why
we start the metacognitive process by storing the results of such process in the variables p and
cx, that represent the solution found by S1 and the confidence that S1 has about this solution
appropriateness, respectively. The metacognitive process then proceeds to check whether the
experience accumulated by the architecture is enough to consider S1 reliable (Line 3). If the
architecture has enough experience, the metacognition considers the confidence of S1, adjusted
to take into account the previous solutions proposed by S1 itself (Lines 4–12), and determines
whether S1’s confidence is within the tolerated risk, identified by T3 (Line 13). If the confidence
of S1 is enough, then the Plan-SOFAI tries to employ S1’s solution (line 14).</p>
      <p>If, at any point, S1’s solution is considered not appropriate by the metacognitive process—
because it violates some checks—then MC-2 starts. This part of the procedure begins by
determining a value that represents the dificulty of the problem instance (derived by various
factors such as the number of agents, possible actions, fluents, and so on) at Line 17. This
measure is then used to determine the average solving time for a given dificulty and to estimate
the cost of solving the given problem (Line 18–20). If the cost exceeds 1 then there is not enough
time to call S2 and Plan-SOFAI tries to employ S1. The system can also adopt S1 with a
probability that is related with the risk aversion T3 and a parameter  , this is done in Lines
24–26, to improve the exploration skill of the architecture itself. The Plan-SOFAI evaluates
the solution proposed by S1 and, if it is acceptable (Line 29), whether the extra time required
by S2 counterbalanced the cost (Line 30). If the solution is not acceptable or the increase in
correctness is big enough S2 is called (Line 36 and 31, respectively), otherwise the solution
proposed by S1 is used (Line 33).</p>
      <p>Algorithm 2 try_S1 function
Input: Plan (p), Domain (D), Instance (I ), Time Limit (TL)
Parameter: Acceptable Correctness (A)
Output: Plan (S), Correctness (C)
1: C = |I.solved_goals(p)|</p>
      <p>|I.tot_goals()|
2: if C ≥ A then
3: return ⟨S = p, C⟩
4: else
5: return ⟨S, C⟩ = solve_with_S2(null,D,I,TL)
6: end if</p>
      <p>Algorithms 2 and 3 are instead used to try and adopt the solution proposed by S1 and to
try and solve the problem with S2, respectively. In particular, Algorithms 2 takes the solution
proposed by S1 and checks whether it has an acceptable degree of correctness. If it does then
the solution is employed, otherwise Algorithm 3 is called. This function simply calls the planner
EFP 2.0 on the instance of the problem to solve and, if it terminates before the available time
ends, it returns the plan found by the S2 planner with confidence equal to 1. If EFP 2.0 cannot
4:
5: else
6: OPT-OUT
7: end if
Algorithm 3 solve_with_S2 function
Input: Plan (p), Domain (D), Instance (I ) Time Limit (TL)
Output: Plan (S)
1: if EFP 2.0 (D,I ) terminates within TL then
2: return ⟨S = EFP 2.0.get_plan(), C = 1⟩
3: else if p ! = null then
return ⟨S = p, C = |I.solved_goals(p)|</p>
      <p>|I.tot_goals()| ⟩
ifnd the solution within the time limit then the solution from
otherwise Plan-SOFAI returns no solution and terminates.</p>
      <sec id="sec-5-1">
        <title>S1, if acceptable, is adopted;</title>
        <sec id="sec-5-1-1">
          <title>5.1. MEP S1 and S2 solvers</title>
          <p>While in the previous paragraph, we described how our architecture decides which solving
approach is the most appropriate, here we will provide an high level overview of solving
processes themselves. In particular, we designed our S1 solver to solely rely on past experience,
accumulated by using either S1 itself or S2. The S1 solver analyzes the memory and looks,
through the various solved instances, which one is the closest to the problem that is being
tackled. Once the closest instance is identified, S1 returns the plan associated to it as a solution
and the distance value as measure for confidence.</p>
          <p>This distance can be calculated in two diferent ways, generating efectively two diferent S1
solvers1. The first measure of distance considers the problems as a set of formulae, i.e., the ones
that comprise the initial and goal states, and adopts the well-known Jaccard Similarity [20],
that is the ratio between the union and the intersection of the two sets we are considering, as a
metric for finding similarity between the input problem and the instances existing in the case
library. The second metric is calculated by transforming the two instances into two distinct
strings, once again comprised of all the initial and goal states information (separated by the
special characters “|”), that are then compared using the Levenshtein distance [30] to determine
the actual distance measure. Let us note that since we are considering only instances of the
same domain, there is no need to incorporate other information. Nonetheless, if we would like
to compare also instances of diferent domains, the domains’ description could easily be added
to the representative of each instance.</p>
          <p>While MEP S1 solvers did not exists in literature and, therefore, we needed to implement
ad-hoc solutions, the same is not true for S2 planners. In fact, as mentioned we employed the
state-of-the-art comprehensive epistemic planner EFP 2.0 as our S2 solver. Given that explaining
how this planner works is beyond the scope of this paper, we can safely assume this approach to
be a black-box that returns the best solution possible to a MEP problem, if exists. Nonetheless,
we refer the interested readers to Fabiano et al. [17] for a detailed explanation on the internal</p>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>1We compare the performances of these two S1 solvers later in the paper.</title>
        <p>mechanisms of EFP 2.0.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Experimental Results and Discussion</title>
      <sec id="sec-6-1">
        <title>6.1. Experimental Setup</title>
        <p>In this section, we compare the new multi-agent epistemic planning architecture introduced as
main contribution of this paper with EFP 2.0 [17] that, to the best of our knowledge, is the
stateof-the-art comprehensive multi-agent epistemic solver. All the experiments were performed on
3.00GHz Intel Core i7-5500U machine with 16GB of memory.</p>
        <p>
          As benchmark, we used a small variation of the standard epistemic planning domain known
as Coin in the Box (CB) [
          <xref ref-type="bibr" rid="ref11">31, 32, 11</xref>
          ]. In this domain  ≥ 2 agents are in one of two rooms,
one of which contains a box with a coin inside. In the initial configuration, everybody knows
that: i) none of the agents know whether the coin lies heads or tails up; ii) the box is locked;
iii) only one agent has the key that opens the box; iv) each agent might be attentive or not
w.r.t. to certain actions execution; Moreover, we know that each agent can execute one of the
following actions: i) move: an agent can move to the other room; ii) open: an agent, if it has the
key, can open the box; iii) peek: to learn whether the coin lies heads or tails up, an agent can
peek into the box, but this requires the box to be open; iv) announce: this will result in all the
listening (i.e., attentive) agents to believe that the coin lies heads or tails up depending on the
announced value; v) distract/signal another agent: these actions will make an attentive
agent no more attentive or vice-versa, respectively. The goals usually consist in some agents
knowing whether the coin lies heads or tails up while other agents know that it knows, or are
ignorant about this.
        </p>
        <p>The experiments consists of a set of 240 diferent instances of the CB domain that difer on the
initial configurations, the goals, and in the number of acting agents. Regarding the various input
and parameters of the architecture (used in Algorithms 1, 2, 3) we imposed: (i) a Time Limit
(TL) of 90 seconds to solve each instance; (ii) an Acceptable Correctness (A) of 0.5, meaning that
at least half of the goals must be satisfied for a S1 solution to be considered; (iii) the various
thresholds (i.e., T1, T2, T3) and  to have they default values; and (iv) the Memory (M) to be
empty at the beginning of the overall solving procedure.</p>
      </sec>
      <sec id="sec-6-2">
        <title>6.2. Results</title>
        <p>As baseline for our experiments, we used the solver EFP 2.0 [17]. As mentioned, we let the solver
tackle all the 240 instances with a time-out of 90 second per instance. The main idea is that the
results of the execution of EFP 2.0 represents the current capabilities of the MEP community
and are comparable to a solely S2-based architecture. While this approach is guaranteed to find
the best solution, if this exists (as it makes use of Breadth-First Search), it is not flexible enough
to adapt to situations where the resources, namely time, are limited.</p>
        <p>We then compared the results of EFP 2.0 with four diferent configurations of the architecture
presented in this paper (Table 1). To avoid unnecessary clutter, let us identify the various
configurations, with the following abbreviations:</p>
        <p>• Jac: the configuration of the architecture where the S1 makes use of the Jaccard similarity
as notion of distance;
• Lev: the configuration where the metric for distance between problem is defined through</p>
        <p>Levenshtein distance;
• Mix: the configuration where S1 chooses the most similar instance in the memory, w.r.t.
the given problem, by selecting the highest (normalized) score between the ones calculated
with both the Jaccard similarity and the Levenshtein distance;
• Rng: the configuration where the S1 randomly picks one of the instances in memory as
“most similar” without even considering a notion of distance. This approach was inserted
as a baseline to outperform with a well-thought S1.</p>
        <p>Solved
Time (avg)
Corr (avg)
S1 calls</p>
        <p>EFP 2.0</p>
        <p>149</p>
        <p>Table 1 shows that Jac is the best all-round configuration, with the most number of solved
instances, the lowest average solving times and the highest average correctness. In fact, all
configurations solved more problems (ranging from 21-49% more) and took less time on an
average to find the plan. To provide further analysis we present, in Figure 1, a plot that shows
the resulting times of this configuration against EFP 2.0. In this, the instances (x-axis) are sorted
w.r.t. the time employed by Jac to solve them. As we can see, all the solving time of Jac
outperforms EFP 2.0 (equal or lower height on the y-axis). Let us note that the instances which
are placed exactly on the top of the plot, i.e., on the 90 seconds line, are the ones that have
timed-out.</p>
      </sec>
      <sec id="sec-6-3">
        <title>6.3. Discussion</title>
        <p>Table 1 and Figure 1 highlight some interesting results about our architecture. In particular,
thanks to its ability to “adapt” to resources constraints, our architecture can provide a flexible
tool to solve instances even for those settings where the inherit complexity of the problems (i.e.,
multi-agent epistemic planning) brings, most of the time, unfeasibility to the solving process.
Our proposal can be seen as a way to exploit the accumulated experience, in a human fashion,
to quickly solve known problems that otherwise would require a lot of eforts.</p>
        <p>Moreover, the trade-of ofered by allowing not-fully correct, but sound, plans is also a way
to produce a solution that, even if partial, can be more useful than no solution at all. Let us
note that some of the solved problem by S1, and not by EFP 2.0, do not have a solution that can
satisfy all the goals. While the planning process of EFP 2.0 cannot detect these situations given
the undecidability of MEP [19], our architecture simply reports a plan to reach some of the
subgoals, providing once again a better alternative to no plan at all. Nonetheless, the parametric
nature of the architecture allows also to tweak it so that it only accept fully correct plans. This
can be done by setting the value of the acceptable correctness (A) to 1. With this small change
the architecture will only return plans that reach the goal state while still taking advantage of
the S1 capabilities of the architecture (albeit S1 solutions would be adopted less times). The
same goes for the other internal parameters that easily allow the user to modify the architecture
so that it is more prone to accept less accurate solution in favor of saving time, and vice-versa.</p>
        <p>Another interesting result that we can deduce from Table 1 is that the employment of Mix is
worse than both Jac and Lev. While, at first glance, this might seem a contradictory result it
actually shows that the balance between the usage of S1 and S2 need to be preserved by the
architecture. In fact, as Mix uses the combination of Jac and Lev, the number of time that a
solution of S1 is employed is higher than the two approaches (115 against 86 and 74). This
makes it so that the architecture has fewer opportunities to increase its experience that can
be re-used later to solve diferent problems. While it is not easy to find the best trade-of for
limiting the employment of S1, it is our intention to define ways to automatically tune the
internal parameters of the architecture so that it can exploits at maximum its capabilities.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusions and Ongoing Work</title>
      <p>
        In this work, we presented an architecture to solve multi-agent epistemic planning problems that
is heavily inspired by the well-known cognitive theory Thinking Fast and Slow by Kahneman
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This tool builds on the SOFAI architecture [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], which makes use of a metacognitive process
to arbitrate the solving processes, and two solvers referred to as System-1 and System-2.
While S2 is directly derived from the literature, that is the comprehensive MEP solver known
as EFP 2.0 [17], the S1 solver (and its variations) have been designed ad-hoc for the proposed
architecture to exploit past experience by selecting a plan for a given planning instance. The
SOFAI-inspired approach showed very promising results outperforming the state-of-the-art
epistemic planner EFP 2.0 in terms of both solved instance and average solving times, on a set
of 240 diferent planning problems. Another advantage of the proposed architecture is that it
can be used to incorporate new solving techniques developed by the MEP community. In fact,
our tool can be easily modified to employ diferent S1 or S2, or multiple versions of them. We
are currently working on a version of the architecture that allows for multiple S2, in particular
both EFP 2.0 and RP-MEP [22].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Kahneman</surname>
          </string-name>
          , Thinking, Fast and Slow, Macmillan,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>G.</given-names>
            <surname>Booch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Fabiano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Horesh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kate</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lenchner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Linck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Loreggia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Murugesan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Mattei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Rossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          ,
          <article-title>Thinking fast and slow in AI</article-title>
          ,
          <source>in: Proceedings of the 35th AAAI conference</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>15042</fpage>
          -
          <lpage>15046</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>G. Marcus,</surname>
          </string-name>
          <article-title>The next</article-title>
          decade in
          <source>ai: Four steps towards robust artificial intelligence</source>
          ,
          <year>2020</year>
          . arXiv:
          <year>2002</year>
          .06177.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Newell</surname>
          </string-name>
          ,
          <article-title>SOAR as a unified theory of cognition: Issues and explanations</article-title>
          ,
          <source>Behavioral and Brain Sciences</source>
          <volume>15</volume>
          (
          <year>1992</year>
          )
          <fpage>464</fpage>
          -
          <lpage>492</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Friedlander</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Franklin</surname>
          </string-name>
          ,
          <article-title>Lida and a theory of mind</article-title>
          ,
          <source>Frontiers in Artificial Intelligence and Applications</source>
          <volume>171</volume>
          (
          <year>2008</year>
          )
          <fpage>137</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J. G.</given-names>
            <surname>Trafton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Hiatt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. M.</given-names>
            <surname>Harrison</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. P.</given-names>
            <surname>Tamborello</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. S.</given-names>
            <surname>Khemlani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Schultz</surname>
          </string-name>
          ,
          <string-name>
            <surname>ACT-R/E:</surname>
          </string-name>
          <article-title>An embodied cognitive architecture for human-robot interaction</article-title>
          ,
          <source>Journal of Human-Robot Interaction</source>
          <volume>2</volume>
          (
          <year>2013</year>
          )
          <fpage>30</fpage>
          -
          <lpage>55</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>G.</given-names>
            <surname>Goel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wierman</surname>
          </string-name>
          ,
          <article-title>Thinking fast and slow: Optimization decomposition across timescales, in: 2017 IEEE 56th Annual Conference on Decision and Control (CDC)</article-title>
          , IEEE,
          <year>2017</year>
          , pp.
          <fpage>1291</fpage>
          -
          <lpage>1298</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M. B.</given-names>
            <surname>Ganapini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Campbell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Fabiano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Horesh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lenchner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Loreggia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Mattei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Rossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. B. Venable</surname>
          </string-name>
          ,
          <article-title>Thinking fast and slow in AI: the role of metacognition</article-title>
          ,
          <source>CoRR abs/2110</source>
          .
          <year>01834</year>
          (
          <year>2021</year>
          ). URL: https://arxiv.org/abs/2110.
          <year>01834</year>
          . arXiv:
          <fpage>2110</fpage>
          .
          <year>01834</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>I.</given-names>
            <surname>Kotseruba</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. K.</given-names>
            <surname>Tsotsos</surname>
          </string-name>
          ,
          <article-title>40 years of cognitive architectures: core cognitive abilities and practical applications</article-title>
          ,
          <source>Artificial Intelligence Review</source>
          <volume>53</volume>
          (
          <year>2020</year>
          )
          <fpage>17</fpage>
          -
          <lpage>94</lpage>
          . doi:
          <volume>10</volume>
          .1007/ s10462-018-9646-y.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>R.</given-names>
            <surname>Fagin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Moses</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. Y.</given-names>
            <surname>Halpern</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. Y.</given-names>
            <surname>Vardi</surname>
          </string-name>
          ,
          <source>Reasoning About Knowledge</source>
          , MIT press,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>C.</given-names>
            <surname>Baral</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          , E. Pontelli,
          <string-name>
            <surname>T. C. Son,</surname>
          </string-name>
          <article-title>An action language for multi-agent domains</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>302</volume>
          (
          <year>2022</year>
          )
          <article-title>103601</article-title>
          . URL: https://www.sciencedirect.com/science/article/ pii/S0004370221001521. doi:https://doi.org/10.1016/j.artint.
          <year>2021</year>
          .
          <volume>103601</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>H.</given-names>
            <surname>Van Ditmarsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. van Der</given-names>
            <surname>Hoek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kooi</surname>
          </string-name>
          , Dynamic Epistemic Logic, volume
          <volume>337</volume>
          ,
          <string-name>
            <surname>Springer</surname>
            <given-names>Netherlands</given-names>
          </string-name>
          ,
          <year>2007</year>
          . doi:
          <volume>10</volume>
          .1007/978-1-
          <fpage>4020</fpage>
          -5839-4.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>T.</given-names>
            <surname>Bolander</surname>
          </string-name>
          ,
          <article-title>A gentle introduction to epistemic planning: The del approach</article-title>
          ,
          <source>arXiv preprint arXiv:1703.02192</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>