<!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>Compiling Planning Problems with Non-deterministic Events into FOND Planning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lukas Chrpa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martin Pilat</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jakub Gemrot</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Faculty of Electrical Engineering, Czech Technical University in Prague</institution>
          ,
          <country country="CZ">Czech Republic</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Faculty of Mathematics and Physics, Charles University</institution>
          ,
          <addr-line>Prague</addr-line>
          ,
          <country country="CZ">Czech Republic</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Automated Planning seeks to nd a sequence of actions, a plan, transforming the environment from its initial state to some goal state. In real-world environments, however, exogenous events might occur and might modify the environment without agent's consent. Besides disrupting agent's plan, events might hinder agent's pursuit towards its goals and even cause damage (e.g. destroying the robot). In this paper, we present how planning problems with non-deterministic events can be translated into Fully-Observable Non-Deterministic (FOND) planning problems and hence we can exploit FOND planning engines to solve them (i.e., nd strong cyclic plans). Speci cally, we will consider two cases in a single agent scenario { at most one event can occur after agent's action or a set of independent events can occur after agent's action. We compare the FOND-based approach with a traditional planning/execution/replanning one to highlight the performance gap as well as success rate of the latter approach.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Planning and acting in real-world scenarios [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] encounters numerous challenges.
For example, non-deterministic events (e.g. failure to establish communication,
or a blocked passage) that might (or might not) happen under speci c
circumstances can change the environment without the consent of the actor.
      </p>
      <p>
        The concept of events in planing is not new [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and was used in some systems
such as Circa [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. These systems, however, reason with a very small state space.
MDP-based approaches consider events [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] as well as Monte Carlo Tree Search
based approaches [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. They, however, focus on selecting the most promising
action in a current state. Fully-Observable Non-Deterministic (FOND) planning
considers non-deterministic action e ects [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] that we can leverage for problems
with non-deterministic events.
      </p>
      <p>
        In this paper, we focus on a single-agent planning in fully observable
environment with deterministic action e ects and non-deterministic exogenous events
Copyright c 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
where, roughly speaking, the task is to nd policies such that the agent
eventually reaches its goal (i.e., strong cyclic plans) under the fairness assumption
that each event when applicable has a chance to occur. We consider two
assumptions such that in the rst one after agent's action at most one event can
occur, while in the second one after agent's action a set of independent events
can occur. We show how planning problems with events under both
assumptions can be compiled to FOND planning that focuses on a di erent challenge {
non-deterministic action e ects (note that, for example, problems with partially
observable environment can also be compiled to FOND [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]). Solutions of the
compiled FOND problems (strong cyclic plans) can be translated to solutions
of problems with non-deterministic events. Such an approach guarantees
completeness under the fairness assumption, in other words, solutions of problems
with events are \safe" to execute and the agent eventually reaches its goal.
Consequently, solutions are \robust" even for problems with dead-ends which, on
the other hand, are problematic for the planning/execution/replanning (PER)
approach (e.g. FF-Replan [17]) that interleaves planning and execution phases
while replanning if the next action becomes inapplicable, or events change the
environment. We experimentally compare the FOND-based approach with a
traditional planning/execution/replanning one to highlight the performance gap as
well as success rate of the latter approach.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>Classical planning, in particular, assumes a static, deterministic and fully
observable environment; a solution plan amounts to a sequence of actions.
Technically, a classical planning domain model is a tuple D = (L; A), where
L is the set of propositional atoms used to describe the state of the
environment (set of propositions from L that are true), and A is the set of actions
over L. An action is a tuple a = (pre(a); del (a); add (a)), where pre(a); del (a)
and add (a) are sets of atoms from L representing a's precondition, delete, and
add e ects, respectively. We assume that del (a) \ add (a) = ;. An action a
is applicable (or executable) in a state s if and only if pre(a) s. If
possible, application (or execution) of a in s, denoted as (s; a), yields the
successor state of the environment (s n del (a)) [ add (a), otherwise (s; a) is
undened. The notion of applicability can be extended to sequences of actions, i.e.,
(s; ha1; : : : ; ani) = (: : : (s; a1) : : : ; an).</p>
      <p>A classical planning problem is a tuple P = (D; I; G), where D is a
planning domain model, I is the initial state of the environment, and G is the
goal, generally in the form of a set of propositions. A solution plan (for a
planning problem) is a sequence of actions such that their consecutive application
starting in the initial state results in a state satisfying the goal (i.e., a goal state).
2.1</p>
      <sec id="sec-2-1">
        <title>FOND Planning</title>
        <p>
          Fully Observable Non-Deterministic (FOND) planning assumes fully observable
and static environment but in contrast to classical planning actions have
nondeterministic e ects [
          <xref ref-type="bibr" rid="ref3 ref6">3, 6</xref>
          ]. In particular, the result of application might be one
of the sets of e ects. Formally a non-deterministic action is a tuple a =
(pre(a); del 1(a); add 1(a); : : : ; del k(a); add k(a)), where pre(a) its precondition,
and del 1(a); add 1(a); : : : ; del k(a); add k(a) its delete and add e ects respectively.
Action applicability is the same as for classical planning. The result of applying
a in s (if possible) is one of the states from fs0 j s0 = (s n del i(a)) [ add i(a); 1
i kg. The FOND planning problem de nition is analogous to the classical
planning problem de nition. The task in FOND planning is to nd a strong
(a)cyclic plan , which forms an (a)cyclic graph such that its nodes are states
(including the initial state) and directed edges go from each state where a (single)
non-deterministic action can be applied to all possibly resulting states, and from
all states there is a path to a goal state. In plain words, strong cyclic plans
guarantee that under the fairness assumption, i.e., each action outcome has a
chance to occur, the agent will eventually achieve its goal [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Events</title>
        <p>Similarly to the de nition of an action, an event is a tuple e = (pre(e); del (e);
add (e)), where pre(e), del (e) and add (e) are sets of atoms representing e's
precondition, delete, and add e ects, respectively. We assume that del (e)\add (e) =
;. Applicability of an event in a state as well as the result of an application (or
execution) of an event is de ned in the same way as for actions. In contrast
to actions that are executed by agents, events can occur regardless of agent's
consent. Technically, an event can (but does not necessarily have to) occur in a
state where event's precondition is met modifying the state of the environment
according to event's e ects. A planning domain model , in this case, is a triple
D = (L; A; E), where L is the set of propositions, A and E is the set of actions
and events over L, respectively. A planning problem, P = (D; I; G), is de ned
analogously to the classical planning case.</p>
        <p>We de ne a noop action/event that represents that no action has been
taken by agent, or event has occurred. Formally, pre(noop) = del (noop) =
add (noop) = ;.</p>
        <p>We say that events ei, ej are independent if and only if del (ei) \ (pre(ej ) [
add (ej )) = ; and del (ej ) \ (pre(ei) [ add (ei)) = ;.</p>
        <p>The following assumption simpli es the reasoning by considering a
singleagent scenario such that actions of the agent and events of the environment
alter like in a two-players game. The process hence follows the pattern in which
the agent can apply an action (not necessarily has to), then the environment can
trigger (apply) an event (not necessarily has to), and so on. Formally:
Assumption 1. Let D = (L; A; E) be a planning domain model. In a current
state s 2 2L, the agent can apply an action a 2 A [ fnoopg such that a is
applicable in s. After that, a (arbitrarily selected) event e 2 E[fnoopg, applicable
in (s; a), is applied resulting in a state s0 = ( (s; a); e) which will become a
new current state. We say that s0 is a successor state of s; a.</p>
        <p>The following assumption extends the previous assumption by considering
the pattern in which the agent can apply an action (not necessarily has to), then
the environment can trigger (apply) a set of independent events (not necessarily
has to), and so on. Formally:
Assumption 2. Let D = (L; A; E) be a planning domain model. In a current
state s 2 2L, the agent can apply an action a 2 A [ fnoopg such that a is
applicable in s. After that, a (arbitrarily selected) set of independent events Ei
E [ fnoopg, applicable in (s; a), is applied resulting in a state s0 = ( (s; a); Ei)
which will become a new current state. We say that s0 is a successor state of
s; a.</p>
        <p>Let D = (L; A; E) be a planning domain model. We say that a state s0 2
2L is reachable from a state s 2 2L with respect to D and Assumption 1
(Assumption 2) if and only if there exists a sequence of actions and events (sets
of independent events), including noops, such that its consecutive application in
s results in s0. Otherwise, we say that s0 is unreachable from s.</p>
        <p>Let P = (D; I; G) be a planning problem. Atoms p; q for which it is the
case that there does not exist a state s reachable from I such that p; q 2 s are
mutually exclusive , or shortly mutex .</p>
        <p>Solutions in non-deterministic planning are in the form of policies, mappings
from states to actions (similarly to probabilistic or FOND planning, for example).
Policies, in plain words, provide information about which action the agent has
to apply in a current state of the environment. As we assume events might
be triggered between actions the agent executes, the policy execution interleaves
agent's actions (including \noop") and environment's events (including \noop").
De nition 1. Let D = (L; A; E) be a planning domain model and P = (D; I; G)
be a planning problem. We say that : 2L ! A [ fnoopg is a policy for P
such that for each s 2 2L reachable from I, (s) is applicable in s.</p>
        <p>In analogy to FOND planning, we can de ne a strong cyclic plan that
represents a policy that, roughly speaking, has to guarantee that the agent will
eventually achieve its goal under the fairness assumption that each applicable
event/set of independent events (including \noop") in each (reachable) state has
a chance to be applied. The strict variant, i.e., a strong acyclic plan, guarantees
that the agent always reaches a goal state in a nite number of steps (no state
can be visited more than once).</p>
        <p>De nition 2. Let D = (L; A; E) be a planning domain model and P = (D; I; G)
be a planning problem. Let be a policy for P. We construct a directed graph
G such that its nodes are states S 2L, I 2 S, for each s 2 S and each its
successor state s0 of s; (s) there is an edge from s to s0.</p>
        <p>A strong cyclic plan for P is a policy (for P) such that for each state s
in G there is a path to a goal state.</p>
        <p>A strong acyclic plan for P is a policy (for P) such that for each state
s in G there is a path to a goal state and G is acyclic.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Relations between Actions and Events</title>
        <p>
          Actions as well as events in uence each other by achieving atoms that are
required by other actions/events, or, in contrast, delete atoms required by other
actions/events. An early work of Chapman [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] studies relations between actions
such as being an \achiever" (i.e., one action creates an atom for another actions)
or being a \cloberrer" (i.e., an action deletes an atom required by another
action). Inspired by this work, we de ne notions of an enabler and a disabler that
denote whether an action or event achieves, or deletes, an atom for an event.
De nition 3. Let D = (L; A; E) be a planning domain model. We say that an
action/event x 2 A [ E is an enabler for an event e 2 E if add(x) \ pre(e) 6= ;.
We also say that x is a sole enabler for e if add(x) pre(e).
        </p>
        <p>De nition 4. Let D = (L; A; E) be a planning domain model. We say that an
action/event x 2 A [ E is a disabler for an event e 2 E if del(x) \ pre(e) 6= ;.
2.4</p>
      </sec>
      <sec id="sec-2-4">
        <title>Conditional E ects</title>
        <p>Standard action (and event) de nition can be extended by Conditional E ects
that capture possible state changes if some extra condition is met in the
current state. Formally, a conditional e ect of an action (or event) x is
speci ed as ce (x) = (cond (x); cdel (x); cadd (x)) where cond (x) is a set of atoms
representing a condition and cdel (x); cadd (x) are sets of atoms representing
conditional delete and add e ects respectively. In plain words, if a condition
in a current state is met, then the e ects take place in the resulting state
after action application. Action (or event) de nition can be extended as follows
x = (pre(x); del (x); add (x); ce 1(x); : : : ; ce k(x)), where ce 1(x); : : : ; ce k(x)
are conditional e ects of x. Applicability of x in a state s is still determined as
whether pre(x) s. The result of application of x in s is
s n (del (x) [</p>
        <p>[
condi(x) s
cdel i(x)) [ add(x) [</p>
        <p>[
condi(x) s
cadd i(x)</p>
        <p>
          In a nutshell, conditional e ects do not in uence action (or event)
applicability but modify the resulting state if the conditions are met in the current state.
Conditional e ects can be compiled away, i.e., an equivalent classical
representation can be obtained, however, the representation either grows exponentially
or the length of solution plans grows polynomially [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].
        </p>
        <p>
          For the sake of clarity, we will use conditional e ects in our compilations of
planning problems with events into FOND planning. Conditional e ects are now
supported by many state-of-the-art classical planners [16] as well as the FOND
planner PRP [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Case Studies</title>
      <p>To illustrate our concepts we introduce three case studies.
3.1</p>
      <p>
        \Sticky" and \Slippery" BlocksWorld
We introduce a variant of the well known 4-ops BlocksWorld domain [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In this
variant, we have two types of robotic hands that can move blocks. One robotic
hand, called \slippery", is not able to hold blocks rmly, so they might fall down
to the table while held by this hand. The other robotic hand, called \sticky", is
able to hold blocks rmly, however, blocks will get \sticky" and might eventually
become unmovable, i.e., get sticked to the table or to another block, so no robotic
hand can unstack them, or pick them up.
      </p>
      <p>Technically speaking, the operators unstack, stack, pickup and putdown are
amended as follows. Unstack and pickup are split into \slippery" and \sticky"
variants, where each variant requires the corresponding robotic hand as a
precondition. Precondition of both variants of unstack and pickup contains a (movable
?b) predicate representing whether a block ?b can be moved by either robotic
hand. The add e ects of the \sticky" variant of unstack and pickup is extended
by a (sticky ?b) predicate representing that a block ?b became \sticky".</p>
      <p>We de ne two events such that an event slip causes the block held by the
\slippery" hand to fall onto the table and an event stick makes the \sticky" block
unmovable (by removing the (movable ?b) predicate).</p>
      <p>A strong acyclic plan unstacks blocks from their initial position with the
\slippery" hand and puts them down on the table (if they do not fall down
by themselves) and then stack them on their goal positions with the \sticky"
hand (if they are in the goal positions they do not have to be moved). A strong
cyclic plan, for instance, can a ord to use only the \slippery" hand, since blocks
that fell down can be picked up again (and eventually be placed into their goal
positions).
3.2</p>
      <sec id="sec-3-1">
        <title>AUV Sampling</title>
        <p>
          We introduce a simpli ed variant of task planning for AUV, inspired by the
recent work of Chrpa et al. [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. It simulates the situation where an AUV has to
perform sampling of some objects of interest while there might be ships passing
by that might endanger the AUV. We have a 4-grid environment, an AUV, a
ship and several resources. Resources can be found on given cells. Each cell is
either free, has the AUV on it, or the ship on it (presence of a resource does not
interfere with any cell status). The AUV can move to an adjacent cell, if the cell
is free. The AUV can sample a resource if it is at the same cell. The task for the
AUV is to sample the resources and return back to the place of origin.
        </p>
        <p>Ships, however, are not controlled by the agent, i.e., ships are controlled by
the environment. Ships can move only on some cells of the grid or might not be
present in the area. Each ship can enter the area at its entry cells, can move to
adjacent cells according to its route, and leave the area at its exit cells. A ship
can appear in its entry cell, if the ship is not already in the area. A ship can leave
the area, if it is in its exit cell. Two \move" events are considered,
move-ship-tofree and move-ship-to-auv. Both require that the ship can move to the destination
cell. The e ect of both events is that the ship moves to the destination cell. If the
ship moves to a free cell, then besides the cell becomes not free for a moment,
nothing else happens. However, if the ship moves to the cell with the AUV, then
the AUV is destroyed (and can no longer perform any action).</p>
        <p>A strong cyclic plan has to avoid situations in which the AUV is, after
applying its action, next to any ship, or in any ship's entry point (if the ship is not
yet in the area). Strong acyclic plans might not always exist, since ships can (if
being active adversaries) prevent the AUV to get to some resources.
3.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>The \Perestroika" domain</title>
        <p>The Perestroika domain we introduce here is inspired by the well known
Perestroika game (also known as a Toppler game). In our domain, an agent has
to navigate through a 4-grid of solid and shrinking platforms and collect all
resources that can be placed on solid platforms. Solid platforms remain stable, i.e.,
they do not change its size nor disappear. In contrary, the shrinking platforms
can have large, medium or small shape, or disappear completely.</p>
        <p>The agent can perform two types of actions. It can move to a neighbouring
platform (if it has not disappeared) and/or collect a resource if the resource is on
the same platform as the agent. Shrinking platforms are a ected by ve events
each. Two events change the shape of the platform from large to medium and
from medium to small, respectively. Two events make the platform disappear
if it has a small shape { the di erence is whether the platform is empty or the
agent is on it. In the former case, the platform just disappears whereas in the
latter case it kills the agent. The last event allow the platform to reappear in a
large shape.</p>
        <p>A strong cyclic plan has to avoid situations in which the agent moves to or
stays on small platforms. Also, the agent must always have an escaping way to
a nearby solid platform to avoid being \trapped" on a shrinking platform which
might disappear at some point and kill the agent. Similarly to the AUV domain,
strong acyclic plans might not always exist as the agent might have to wait until
the shrinking platforms are large enough to be safely crossed.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Translating Planning with Events into FOND Planning</title>
      <p>In FOND planning, the agent does not have control of action outcome but the
outcome is determined immediately after action execution nishes. In contrast,
an event might be applicable even without \enabling" it by agent's actions (e.g.,
the event preconditions are met in the initial state), or when \enabled" by agent's
action event's applicability does not cease until some other action or event
\disables" it.
4.1</p>
      <sec id="sec-4-1">
        <title>Considering Assumption 1</title>
        <p>Let D = (L; A; E) be a domain model. We construct an equivalent FOND domain
model DF = (LF ; AF ) as follows. We introduce atoms (act-turn) and (ev-turn)
https://en.wikipedia.org/wiki/Perestroika (video game)
to determine \action" and \event" turn respectively. For each event ei 2 E we
introduce atoms (enab-ei) and (disab-ei) representing whether ei is applicable in
a current state or not, and an atom (selected-ei) representing whether ei has been
selected. LF is constructed by a union of the introduced atoms and L (without
loss of generality we assume that none of the introduced atoms is in L). An
action aj 2 A is translated into ajF 2 AF as follows:
pre(ajF )
del (ajF )
add (ajF )
=
=
=
=
pre(aj ) [ f(act-turn)g
del (aj ) [ f(act-turn)g [
[f(enab-ei) j aj is a disabler for eig [
[f(disab-ei) j aj is a sole enabler for eig
add (aj ) [ f(ev-turn)g [
[f(disab-ei) j aj is a disabler for eig [
[f(enab-ei) j aj is a sole enabler for eig</p>
        <sec id="sec-4-1-1">
          <title>For each ei 2 E such that aj is a non-sole enabler for ei</title>
          <p>ce ei (ajF )</p>
          <p>(pre(ei) n add (aj ); (disab-ei); (enab-ei))
On top of the actions de ned in the domain model we have to explicitly model
the \noop" action anFoop 2 AF that only switches from the action to the event
turn (as the agent decided to do nothing in its turn). In particular, pre(anFoop) =
del (anFoop) = f(act-turn)g and add (anFoop) = f(ev-turn)g.</p>
          <p>The ajF actions can be executed in the \action turn" and since they
correspond to the actions in A their e ects are deterministic. After executing an
action we move to the \event turn".</p>
          <p>In the \event turn", we have to \transfer" non-deterministic events into
nondeterministic action e ects. We can do that in two steps. First, we select an
event or \noop" by non-deterministic action e ects. Then, if the selected event
is enabled, the event is executed, otherwise (if the event is disabled) the case
is considered as \noop". The \event selecting" action asel 2 AF is encoded as
follows, del 0(asel) and add 0(asel) represent the selection of \noop" (i.e., no event
will be executed in the current \turn") while del i(asel) and add i(asel) represent
the selection of an event ei 2 E (all the events in E are considered):
pre(asel) = f(ev-turn)g
del 0(asel) = f(ev-turn)g
add 0(asel) = f(act-turn)g
del i(asel) = f(ev-turn)g
add i(asel) = f(selected-ei)g</p>
          <p>Then, for each event ej 2 E we construct two actions aeej 2 AF and aedj 2 AF
representing an execution of ej if enabled or resorting to the \noop" case if ej
pre(aeej )
[f(enab-ei) j ej is a disabler for eig [
[f(disab-ei) j ej is a sole enabler for eig
add (ej ) [ f(act-turn)g [
[f(disab-ei) j ej is a disabler for eig [
[f(enab-ei) j ej is a sole enabler for eig
(pre(ei) n add (ej ); f(disab-ei)g; f(enab-ei)g)</p>
        </sec>
        <sec id="sec-4-1-2">
          <title>For each ei 2 E such that ej is a non-sole enabler for ei</title>
          <p>For a planning problem P = (D; I; G), the corresponding FOND problem
PF = (DF ; IF ; G) is constructed such that</p>
          <p>IF = I [ f(act-turn)g [ f(enab-ei) j pre(ei)
Ig [ f(disab-ei) j pre(ei) 6 Ig:</p>
          <p>We can see that to solve the FOND planning problem we have to simulate
\action" and \event" turns. The (act-turn), (ev-turn), (selected-ei) atoms ensure
the applicability of an action, of the event selection action, of an event,
respectively. In particular, in the action turn an action is (non-deterministically)
selected. The event turn comprises an \event selecting" action and possibly an
\event" action. The \event selecting" action represents event selection (or noop
selection) in its non-deterministic e ects. Noop selection skips the \event" action
(as no event occurs). Otherwise, if an event ei is selected ((selected-ei) becomes
true), then either aeei or aedi can be applied depending whether ei is applicable or
not. Applying aeei simulates ei application while aedi simulates noop as ei is
inapplicable. Also, we have to maintain information about applicability of particular
events, which is done through the (enab-ei) and (disab-ei) atoms. If an action
or event is a sole enabler for ei, then it adds (enab-ei) and removes (disab-ei).
Analogously, if an action or event is a disabler for ei, then it adds (disab-ei) and
removes (enab-ei).</p>
          <p>Let F be a strong cyclic plan of PF , then a strong cyclic plan for a
corresponding planning problem P is constructed as follows. For each sF 2 2LF
and aiF 2 AF such that F (sF ) = aiF we de ne (sF \ L) = ai. In plain words,
we consider only pairs hstate,actioni from the strong cyclic plan associated with
actions translated from actions de ned in P. As states of PF contain additional
atoms, these have to be removed to obtain states of P. It can be observed that
if a strong cyclic plan of PF is found there is no \open state" which is not a goal
state. As events occur implicitly (as in Assumption 1), the corresponding strong
cyclic plan of P has to consider only \action turns". The above is summarised
in the following theorem.</p>
          <p>Theorem 1. Let P be a planning problem (with events) and PF be its
translation into a FOND problem (as described above). Then, F is a strong cyclic
plan of PF if and only if (constructed from F as above) is a strong cyclic
plan of P.</p>
          <p>Proof (Sketch). To nd a strong cyclic plan of PF the \action" and \event"
turns alternate. In particular, in the action turn a planner (non-deterministically)
selects an action. The event turn comprises an \event selecting" action and
possibly an \event" action so simulate all possibilities of event occurrence. The
\event selecting" action represent possibilities of event selection (or noop
selection) in its non-deterministic e ects. Noop selection skips the \event" action
(as no event occurs). Otherwise, if an event ei is selected ((selected-ei) becomes
true), then either aeei or aedi can be applied depending whether ei is applicable
or not. Applying aeei simulates ei application while aedi simulates noop as ei is
inapplicable. It can be seen that (enab-ei) is true if and only if ei is applicable
while (disab-ei) is true if and only if ei is inapplicable. Multiple noops caused
by disabled events result in the same state as the regular noop. Enabled events
result in (possibly) new states that have to be explored. If a strong cyclic plan of
PF is found there is no \open state" which is not a goal state. As events occur
implicitly (as in Assumption 1), the corresponding strong cyclic plan of P has
to consider only \action turns".
4.2</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>Considering Assumption 2</title>
        <p>Let D = (L; A; E) be a domain model. We construct an equivalent FOND
domain model DF = (LF ; AF ) as follows. We introduce atoms (act-turn), (enab-ei),
(disab-ei) and (selected-ei) as in the previous case. On top of that, we introduce
atoms (ev-turn) and (ev-turn2) representing two parts of the event turn and for
each event ei 2 E, an atom notsel-ei representing that ei has not been selected
(in a given turn), and an atom (wenab-ei) representing that ei will be enabled in
the next turn. Similarly to the previous case, LF is constructed by a union of the
introduced atoms and L (without loss of generality we assume that none of the
introduced atoms is in L). The translation of each action aj 2 A into ajF 2 AF
as well as the noop action is the same as in the previous case.</p>
        <p>The \event selecting" action asel 2 AF has to re ect selection of sets of
independent events (including noop). That involves calculating power sets for
all sets of independent events. To reduce the number of these power sets we
can exploit mutexes such that events whose preconditions are mutex are not
present in any set together (despite being independent). In the AUV domain,
for example, a single ship cannot move between di erent locations at the same
time as it can be at at most one location, or outside at the same time.</p>
        <p>The precondition of asel as well as the e ects representing the noop event
selection is the same as in the previous case. For a set of independent events
fei1 ; : : : ; eim g E we de ne non-deterministic e ects del i(asel) and add i(asel)
in which all the sets of independent events from E are considered:
del i(asel) = f(ev-turn); (notsel-ei1); : : : ; (notsel-eim)g
add i(asel) = f(ev-turn2); (selected-ei1); : : : ; (selected-eim)g</p>
        <p>For the \event" actions aeej 2 AF and aedj 2 AF representing an execution of
ej (if enabled or resorting to the \noop" case if disabled), the main di erence,
in contrast to the previous case, is that after applying the \event" action, we
are still in the \event" turn (hence we can apply all the events from the selected
set). Also, enabling events must not in uence applicability of selected events
because the selected (independent) events have to be applied at one step. It,
however, might be that case that one independent event is an enabler for another
independent event (on the other hand, an independent event cannot be a disabler
for another independent event) and thus it has to be indicated that an event will
be enabled in the following step (by the wenab atom).</p>
        <p>For each ei 2 E such that ej is a non-sole enabler for ei
[f(enab-ei); (wenab-ei) j ej is a disabler for eig
add (ej ) [ f(notsel-ej)g [
[f(disab-ei) j ej is a disabler for eig [
[f(wenab-ei) j ej is a sole enabler for eig
(pre(ei) n add (ej ); fg; f(wenab-ei)g)</p>
        <p>Resorting back to the \action" turn can be done after all the selected events
(respectively their corresponding \event" actions) were applied. In other words,
if no event is selected, then we can resort to the \action" turn while enabling
events that were marked as \will be enabled". The \resorting" action ares 2 AF
is de ned as follows:</p>
        <p>For a planning problem P = (D; I; G), the corresponding FOND problem
PF = (DF ; IF ; G) is constructed in such a way that IF = I [ f(act-turn)g[
f(enab-ei) j pre(ei) Ig [ f(disab-ei) j pre(ei) 6 Ig [ f(notsel-ei) j ei 2 Eg.
pre(ares)
del (ares)
add (ares)
ce i(ares)</p>
        <sec id="sec-4-2-1">
          <title>For each ei 2 E :</title>
          <p>f(ev-turn2); (notsel-e1); : : : ; (notsel-en)g
f(ev-turn2)g
(f(wenab-ei)g; f(wenab-ei),(disab-ei)g; f(enab-ei)g)</p>
          <p>Similarly to the previous case, to solve the FOND planning problem we
simulate action and event turns. The main di erence is that in this case more
(independent) events can be selected in one turn. Therefore, the event turn is
divided into three stages, event selection, event application and resorting to the
action turn. On top of that, as events might enable other events, even one
independent event can be an enabler of another independent event, to correctly
simulate the event turn we have to postpone a possible enabling of events until
the end of the turn. Technically speaking, the \event selecting" action selects a
set of independent events that are all sequentially processed by \event" actions.
The e ects of a selected event take place if the event is enabled, otherwise the
event is skipped. However, as the event e ects might enable other events (even
independent ones) it is important to postpone the information about newly
enabled events until all the selected events were processed. The information about
newly enabled events has to be kept (the wenab atoms) and when all the selected
events are processed, the \resorting" action uses the information to determine
enabled events for the next turn (the enab atoms).</p>
          <p>Let F be a strong cyclic plan of PF , then a strong cyclic plan for a
corresponding planning pro2b2leLmF aPndis aciFon2stAruFctseudchastfhoaltlows. Analogously to the
previous case, for each sF F (sF ) = aiF we de ne
(sF \ L) = ai. In plain words, we consider only pairs hstate,actioni from the
strong cyclic plan associated with actions translated from actions de ned in P.
Also the additional atoms de ned in PF have to be removed to obtain states of
P. It can be observed that if a strong cyclic plan of PF is found there is no \open
state" which is not a goal state. As events occur implicitly (as in Assumption 2),
the corresponding strong cyclic plan of P has to consider only \action turns".
The above is summarised in the following theorem.</p>
          <p>Theorem 2. Let P be a planning problem (with events) and PF be its
translation into a FOND problem (as described above). Then, F is a strong cyclic
plan of PF if and only if (constructed from F as above) is a strong cyclic
plan of P.</p>
          <p>Proof (Sketch). Analogously to the proof sketch of Theorem 1, the \action"
and \event" turns alternate and we keep track of which events are enabled or
disabled. The di erence is that a set of independent events can occur at once in a
single event turn. An \event selecting" action therefore selects a set of
independent events. Selected events are processed in a sequence one by one (by \event"
actions) such that event e ects take place if the event is enabled, otherwise the
event is considered as \noop". However, as \event" actions are processed in
sequence, e ects of one might enable an event that is going to be processed later.
That would have deviated from Assumption 2 as such an event is inapplicable
in the state before the set of independent events can occur. To prevent enabling
events that are disabled in a given turn, we use the wenab atoms that
conditionally enable events. Conditional enabling if persists becomes \real" at the end of
the event turn. The \resorting" action, which switches from event to action turn,
can be applied only if all selected events have been processed (i.e., all the events
are \not selected"). On top of that, the \resorting" action makes all
conditionally enabled events enabled. Noteworthy, the selecting action uses the (ev-turn)
atom and achieves the (ev-turn2) atom for the resorting action such that they
are applied in the correct order.</p>
          <p>Disabling events cannot a ect those selected in the current event round
because one of the properties for events being independent is that delete e ects of
one event are disjoint with preconditions of other (independent) events. Also,
disabling an event (even non-selected) is \permanent" for a given turn as the
other property of independence guarantees that add e ects are disjoint with delete
e ects among independent events. Hence any atom deleted by one event cannot
be re-achieved by another independent event.</p>
          <p>If a strong cyclic plan of PF is found there is no \open state" which is not
a goal state. As events occur implicitly (as in Assumption 2), the corresponding
strong cyclic plan of P has to consider only \action turns".
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Experimental Evaluation</title>
      <p>The aim of the experiments is to measure performance gap between a complete
(o ine) FOND approach and the (online) PER approach for solving planning
problems with non-deterministic events. Also, we would like to highlight how
the success rate of the latter approach can drop in problems with dead-ends.</p>
      <p>For our experimental evaluation, we speci ed the following problems. In BW,
Problems 1,3,5 consider one sticky and one slippery hand, while Problems 2,4,6
two slippery hands only. Problems 1,2 have 5 blocks, 3,4 have 10 blocks and
5,6 have 15 blocks. For AUV, three resources are located in (or near) corners
for each of the problems. Problems 1 and 2 are on 4x4 grid. Problem 1 has one
ship that can move on 3th column and 3th row from 3th column to 4th column.
Problem 2 has two ships moving \to the cross" (3th row and 3th column).
Problems 3 and 4 are proportionally scaled to 8x8 grid. Problem 5 has three
ships moving in adjacent columns (4th to 6th) such that the middle ship moves
in the opposite direction than the other two. In Perestroika, Problems 1,2 are
on the 3x3 grid while problems 3,4 are on 5x5 grid such that in Problems 1 and
3 solid platforms are on coordinates that are either both odd or both even. In
Problems 2 and 4, shrinking platforms are on even rows and even columns. In
Problems 1,2, resources are located in the other corners and for Problems 3,4
also in the middle of the grid. In Problem 5, resources are located on all solid
platforms. In all problems, the agent starts in a corner. All problems are solvable,
i.e., there exists a strong cyclic plan for each problem.</p>
      <p>
        As a FOND planner, we used the PRP planner that also supports conditional
e ects [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. For the PER approach, we considered two variants, replanning when
the current action is inapplicable, and replanning always after event(s)
occurrence. As a planner we used the well known LAMA planner [15]. For each
problem, we considered the limit of 500 replanning episodes. The runtime limit per
problem was 1800s (applies also for the FOND problems). The experiments were
conducted on Intel Core i7 6700, 16GB RAM, Gentoo Linux .
      </p>
      <p>The results summarised in Table 1 show that the PER approach can solve
the problem in a few seconds in most cases, however, at the cost of lower success
rate (especially for larger Perestroika problems considering Assumption 2). The
FOND approach, on the other hand, can solve only the simpler problems, which
is exacerbated for Assumption 2. The results, of course, are not very surprising
given as the FOND approach is complete and has to consider all possibilities of
event occurrence while the PER approach \takes a chance" by ignoring events in
the planning stage, which is \risky" for problems with dead-ends (e.g. the agent
might step on a small shrinking platform which due to an event might disappear
and kill the agent).</p>
      <p>To give an illustration why the FOND approach struggles to solve even rather
toy problems, especially under the (more realistic) Assumption 2, let us see the
Perestroika Problem 1 that has 4 shrinking platforms. It results, in consequence,
in 16 sets of independent events (including noop) to be considered in every
step (turn). Hence the number of \open states" can explode exponentially (with
respect to the number of events).
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>
        Planning with non-deterministic events presents a challenge of nding strong
cyclic plans for agents in dynamic environments. In this paper, we present a
Scripts for compilation to FOND and benchmark problems are available at
https://github.com/martinpilat/events-FOND
compilation of planning problems with events into FOND planning problems.
We have experimentally shown that nding strong cyclic plans is viable, under
reasonable time and memory constraints, for very small problems. On the other
hand, the global reasoning for solving the problem might be unnecessarily
expensive (at least for some classes of problems). For example, in Perestroika, the
agent might need to reason only with shrinking platforms that are on the way
between solid platforms. Generally speaking, the agent might need to nd strong
cyclic plans between \safe" states [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>In future, we plan to investigate how the problem can be decomposed such
that we have to nd a sequence of local policies that can be combined into a
strong cyclic plan.</p>
      <p>Acknowledgements This Research was funded by the Czech Science
Foundation (projects no. 17-17125Y and 18-07252S).
15. Richter, S., Westphal, M.: The LAMA planner: Guiding cost-based anytime
planning with landmarks. Journal of Arti cial Intelligence Research (JAIR) 39, 127{
177 (2010)
16. Vallati, M., Chrpa, L., Grzes, M., McCluskey, T.L., Roberts, M., Sanner, S.: The
2014 international planning competition: Progress and trends. AI Magazine 36(3),
90{98 (2015)
17. Yoon, S.W., Fern, A., Givan, R.: FF-Replan: A baseline for probabilistic planning.</p>
      <p>In: ICAPS 2007. pp. 352{359 (2007)</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Chapman</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Planning for conjunctive goals</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>32</volume>
          (
          <issue>3</issue>
          ),
          <volume>333</volume>
          {
          <fpage>377</fpage>
          (
          <year>1987</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Chrpa</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ribeiro</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Py</surname>
          </string-name>
          , F.,
          <string-name>
            <surname>de Sousa</surname>
            ,
            <given-names>J.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rajan</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>On mixedinitiative planning and control for autonomous underwater vehicles</article-title>
          .
          <source>In: IROS</source>
          . pp.
          <volume>1685</volume>
          {
          <issue>1690</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Cimatti</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pistore</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roveri</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Traverso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          : Weak, strong, and
          <article-title>strong cyclic planning via symbolic model checking</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>147</volume>
          (
          <issue>1-2</issue>
          ),
          <volume>35</volume>
          {
          <fpage>84</fpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Cserna</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doyle</surname>
            ,
            <given-names>W.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramsdell</surname>
            ,
            <given-names>J.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruml</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          :
          <article-title>Avoiding dead ends in real-time heuristic search</article-title>
          . In: AAAI (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wellman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Planning and Control</article-title>
          . Morgan Kaufmann Publishers (
          <year>1990</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ghallab</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nau</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Traverso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <source>Automated Planning and Acting</source>
          . Cambridge University Press (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nau</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          :
          <article-title>On the complexity of blocks-world planning</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>56</volume>
          (
          <issue>2-3</issue>
          ),
          <volume>223</volume>
          {
          <fpage>254</fpage>
          (
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Ingrand</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghallab</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Deliberation for autonomous robots: A survey</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>247</volume>
          ,
          <issue>10</issue>
          {
          <fpage>44</fpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mausam</surname>
            , Kolobov,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Planning with Markov Decision Processes: An AI Perspective</article-title>
          .
          <source>Synthesis Lectures on Arti cial Intelligence and Machine Learning</source>
          , Morgan &amp; Claypool Publishers (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Muise</surname>
            ,
            <given-names>C.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McIlraith</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Beck</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          :
          <article-title>Improved non-deterministic planning by exploiting state relevance</article-title>
          .
          <source>In: ICAPS</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Muise</surname>
            ,
            <given-names>C.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McIlraith</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Belle</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Non-deterministic planning with conditional e ects</article-title>
          .
          <source>In: ICAPS</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Musliner</surname>
            ,
            <given-names>D.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Durfee</surname>
            ,
            <given-names>E.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shin</surname>
            ,
            <given-names>K.G.</given-names>
          </string-name>
          :
          <article-title>CIRCA: a cooperative intelligent realtime control architecture</article-title>
          .
          <source>IEEE Trans. Systems, Man, and Cybernetics</source>
          <volume>23</volume>
          (
          <issue>6</issue>
          ),
          <volume>1561</volume>
          {
          <fpage>1574</fpage>
          (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Nebel</surname>
          </string-name>
          , B.:
          <article-title>On the compilability and expressive power of propositional planning formalisms</article-title>
          .
          <source>Journal of Arti cial Intelligence Research</source>
          <volume>12</volume>
          ,
          <volume>271</volume>
          {
          <fpage>315</fpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Patra</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghallab</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nau</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Traverso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Acting and planning using operational models</article-title>
          .
          <source>In: AAAI</source>
          . pp.
          <volume>7691</volume>
          {
          <issue>7698</issue>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>