Top-Quality: Finding Practically Useful Sets of Best Plans
Abstract
The need for ﬁnding a set of plans rather than one has been motivated by a variety of planning applications.
The problem is studied in the context of both diverse and top-k plan- ning: while diverse planning focuses on the difference between pairs of plans, the focus of top-k planning is on the quality of each individual plan.
Recent work in diverse planning introduced additionally restrictions on solution quality.
Naturally, there are application domains where diversity plays the major role and domains where quality is the predominant feature.
In both cases, however, the amount of produced plans is somewhat an artiﬁcial constraint, and the actual number has little meaning.
Inspired by the recent work in diverse planning, we propose a new computational problem called top-quality planning, where solution validity is deﬁned through plan quality bound rather than an arbitrary number of plans.
Switching to bounding plan quality allows us to implicitly represent sets of plans.
In particular, it makes it possible to represent sets of valid plan reorderings with one plan.
We formally deﬁne the cor- responding computational problem and present the ﬁrst planner for that problem.
We empirically demonstrate the superior performance of our approach compared to a top-k plannerbased baseline, ranging from 49% increase in coverage for ﬁnding all optimal plans to 69% increase in coverage for ﬁnding all plans of quality up to 120% of optimal plan cost.
Introduction
While the main focus in classical planning was on producing a single plan, a variety of applications has shown the need for ﬁnding a set of plans rather than one.
These applications include malware detection (Boddy et al. 2005), plan recognition as planning and its applications (Riabov et al. 2015;
Sohrabi, Riabov, and Udrea 2016; Sohrabi et al. 2018;
Shvo, Sohrabi and McIlraith 2018), human team planning (Kim et al. 2018), explainable AI (Chakraborti et al. 2018), re-planning and plan monitoring (Fox et al. 2006).
The problem of ﬁnding a set of plans is studied in the context of both diverse planning (e.g., Nguyen et al. 2012) and top-k planning (e.g., Katz et al. 2018).
Diverse planning focuses on the difference between pairs of plans, evaluating a set of plans by aggregating over the pairwise differences between plans in the set.
Recent work in diverse planning introduced additional restrictions on solution quality, requiring each plan in the set to also be of bounded quality (Vadlamudi and Kambhampati 2016; Katz and Sohrabi 2019).
Top-k planning is a generalization of cost-optimal planning.
The focus of top-k planning is on the quality of each individual plan, guaranteeing that no plan of better cost exists outside the solution of a requested size.
Naturally, there are application domains where diversity plays the major role and domains where quality is the predominant feature.
The latter include plan recognition (Sohrabi, Riabov, and Udrea 2016), multi-agent plan recognition (Shvo, Sohrabi, and McIlraith 2018), human team planning (Kim et al. 2018), and explainable AI (Chakraborti et al. 2018).
These applications exploit top-k planners to derive a large number of plans.
In these domains, though, the focus on the number of plans provided is somewhat artiﬁcial, and is intended solely to ensure that a sufﬁcient number of plans is found.
Further, ordering of actions in a plan can be of less importance in some applications.
Plan recognition is one such example application.
In plan recognition as planning (Sohrabi, Riabov, and Udrea 2016;
Shvo, Sohrabi, and McIlraith 2018), a planning task consists of actions that explain/discard observations.
There is no meaning to the order among these actions.
Some speciﬁc practical applications for plan recognition are hypothesis generation (Sohrabi et al. 2016) and scenario planning advisor (Sohrabi et al. 2018).
These applications use a top-k planner with a large bound on the number of required plans k , and the obtained plans are post-processed to discard reorderings and cluster similar plans.
This would also apply to e.g., problems with actions that correspond to information gathering, where no particular ordering is required.
The clear disadvantage of a top-k planner in such cases is that it would generate all possible orderings before proceeding to plans of a higher cost.
Thus, the number of required plans used in practice is often a crude over-approximation.
Further, even quite large numbers are often not sufﬁcient to ensure that the set of plans includes enough plans of interest, since plans can easily have millions of valid reorderings.
A top-k planner would have to generate all these plans before it can get to a plan of a higher cost.
Diverse planners (Bryce 2014; Nguyen et al.
2012; Coman and Mu˜noz-Avila 2011;
Roberts, Howe, and Ray 2014; Vadlamudi and Kambhampati 2016) tackle the issue by deﬁning diversity criteria over a set of plans, but only a handful of works take the plan quality into consideration (Roberts, Howe, and Ray 2014; Vad-
[Figure]
lamudi and Kambhampati 2016; Katz and Sohrabi 2019).
While some computational problems in diverse planning do require to provide some guarantees on solution quality (Katz and Sohrabi 2019), existing diverse planners still do not provide such guarantees.
In this paper, we propose a new family of computational problems called top-quality planning .
The objective of topquality planning is to ﬁnd and concisely represent a set of all plans of bounded quality, for a given (absolute) bound.
That is, we suggest an alternative deﬁnition of solution validity, by bounding the solution quality instead of bounding the number of plans.
This allows us to deﬁne an equivalence relation on plans and implicitly represent equivalence classes plans without knowing the exact number of plans in the set.
In particular, in this work, we focus on the equivalence relation that is deﬁned by all possible reorderings of each plan, represented by one canonical plan.
Furthermore, we propose a ﬁrst planner for unordered top-quality planning that iteratively ﬁnds a single plan of top quality and forbids at once all plans found so far, including all their possible reorderings.
For that, we adapt a recently proposed diverse planning reformulation that forbids a single multiset of actions (Katz and Sohrabi 2019) to forbid exactly a collection of multisets.
Our adaptation of the existing reformulation allows us to forbid multiple sets of plans at each iteration while preserving soundness and completeness of our approach.
We empirically compare our approach to unordered top-quality planning to the only available baseline – a top-k planner with a large k bound.
Our approach exhibits a superior performance, ranging from 49% increase in coverage for ﬁnding all optimal plans to 69% increase in coverage for ﬁnding all plans of cost up to 120% of optimal plan cost.
Preliminaries
We consider classical planning tasks in the well-known
SAS + formalism (B¨ackstr¨om and Nebel 1995), extended with action costs.
Such planning tasks Π
=
(cid:104)V , O , s 0 , s (cid:63) (cid:105) consist of V , a ﬁnite set of ﬁnite-domain state variables ,
O , a ﬁnite set of actions , s 0 , an initial state , and s (cid:63) , the goal .
Each variable v ∈ V is associated with a ﬁnite domain dom ( v ) of variable values.
These variable, value pairs are called facts .
A partial assignment p maps a subset of variables vars ( p ) ⊆
V to values in their domains.
For a variable v ∈ V and partial assignment p , the value of v in p is denoted by p [ v ] if v ∈ vars ( p ) and we say p [ v ] is undeﬁned if v / ∈ vars ( p ) .
A partial assignment s with vars ( s ) =
V , is called a state .
State s is consistent with partial assignment p if they agree on all variables in vars ( p ) , shortly denoted by p ⊆ s .
The product S =
(cid:81) v ∈V dom ( v ) is called the
[Table]
[Figure]
state space of planning task Π .
s 0 is a state and s (cid:63) is a partial assignment.
A state s is called a goal state if s (cid:63) ⊆
s and the set of all goal states is denoted by S s (cid:63) .
Each action o in O is a pair (cid:104) pre ( o ) , eﬀ ( o ) (cid:105) where pre ( o ) is a partial assignment called precondition and eﬀ ( o ) is a partial assignment called effect .
Further, o has an associated natural number cost ( o ) , called cost .
An action o is applicable in state s if pre ( o ) ⊆
s .
Applying action o in state s results in a state denoted by s (cid:74) o (cid:75)
where s (cid:74) o
(cid:75)
[ v ] = eﬀ ( o )[ v ] for all v ∈ vars ( eﬀ ) and = s (cid:74)
o (cid:75)
[ v ] =
s [ v ] for all other variables.
An action sequence π = (cid:104) o 1 , · · · , o n (cid:105) is applicable in state s if there are states s 0 , · · · , s n such that
o i is applicable in s i − 1 and s i − 1 (cid:74)
o i (cid:75)
=
s i for 0 ≤ i ≤ n .
We denote s n by s (cid:74) π (cid:75) .
For convenience we often write o 1 , · · · , o n instead of (cid:104) o 1 , · · · , o n (cid:105) .
An action sequence with s 0 (cid:74) π (cid:75)
∈
S s (cid:63) is called a plan .
The cost of a plan π , denoted by cost ( π ) is the summed cost of the actions in the plan.
For a planning task Π
= (cid:104)V , O , s 0 , s (cid:63) (cid:105) , the set of all plans is denoted by P Π .
A plan π is optimal if its cost is minimal among all plans in P Π .
For a plan π , we denote by MS ( π ) the multiset 1 of actions in π .
Note that two different plans π and π (cid:48) can have MS ( π )
=
MS ( π (cid:48) ) .
We call such plans reordering of each other.
Reoderings of actions of a plan that are plans are called valid reorderings.
In this paper, we will use a logistics task, depicted in Figure 1, as our running example.
This task has two cities, with two locations each, L 1 and L 2 , three trucks, T 1 (left), and
T 2 , T 3 (right), that can drive within their cities, one airplane,
A, that can ﬂy between the airport locations, Apt 1 and Apt 2 , and four packages, P 1 to P 4 , that need to be transported from their initial locations to some speciﬁed goal locations.
The initial and goal locations of all objects are shown in Figureand marked with dashed arrows.
Assuming all actions hav- ing unit cost, a cost-optimal plan for this task will consists of 20 actions.
Example plans π a , π b , and π c are depicted in
Figure 2.
Given a plan π , it is sometimes possible to obtain a different plan of equivalent cost without solving the planning task again.
Two of such possible ways: action reordering and deriving symmetric plans, are exploited by state-of-the-art topk planners (Katz et al. 2018).
While action reordering is performed using search and may be time consuming, symmetric plans can be obtained using structural symmetries (Shleyfman et al. 2015).
Structural symmetries are permutations of variable values and actions that induce automorphisms of the state transition graph.
Here, we present the deﬁnition of structural symmetries for SAS + as was given by Sievers et al.
Deﬁnition 1 (structural symmetry)
For a SAS + planning task Π
= (cid:104)V , O , s 0 , s (cid:63) (cid:105) , let F be the set of Π ’s facts, i. e. pairs (cid:104) v, d (cid:105) with v ∈ V , d ∈ dom ( v ) .
A structural symmetry for Π is a permutation σ : V ∪ F ∪ O → V ∪ F ∪ O , where:
σ ( V ) =
V and σ ( F ) =
F such that σ ( (cid:104) v, d (cid:105) )
= (cid:104) v (cid:48) , d (cid:48) (cid:105) implies v (cid:48)
= σ ( v ) ; 2.
σ ( O )
=
O such that for o ∈ O , σ ( pre ( o ))
=
pre ( σ ( o )) , σ ( eﬀ ( o ))
=
eﬀ ( σ ( o )) , cost ( σ ( o ))
=
cost ( o ) ; 3.
σ ( s (cid:63) )
=
s (cid:63) ;
where σ ( { x 1 , . . . , x n } ) :
= { σ ( x 1 ) , . . .
, σ ( x n ) } , and s (cid:48) :
= σ ( s ) is the partial state obtained from the partial state s s.t.
for all v ∈ vars ( s ) , σ ( (cid:104) v, s [ v ] (cid:105) )
= (cid:104) v (cid:48) , d (cid:48) (cid:105) implies s (cid:48)
[ v (cid:48) ]=
d (cid:48) .
A structural symmetry σ stabilizes the state s if σ ( s )
= s .
Given a plan π = o 1 . . .
o n and a structural symmetry σ that stabilizes the initial state, applying the permutation σ to each action in the plan results in a necessarily valid plan σ ( π ) =
σ ( o 1 ) . . .
σ ( o n ) of the same cost.
Note that σ ( π ) is not a reordering of π , since σ may map actions from π to actions outside of π .
In our example, the structural symmetries can detect symmetries between two of the trucks T 2 and T 3 , between the two packages that are initially in L 1 , and between the two packages that are initially in L 2 .
Thus, structural symmetries can be used to obtain additional plans from a given plan.
In our example, the plan π c in Figure 2 can be obtained from π a using the symmetry between the trucks T 2 and T 3 .
Note that these two plans use different actions and thus are not reorderings of each other.
The plan π b , on the other hand, is a reordering of π a , changing the order between the ﬁrst two actions.
These two plans are not symmetric, since mapping the action (load P 4 T 2 L 2 ) to (load P 3 T 2 L 2 ) would also require mapping (unload P 4 T 2 L 2 ) to (unload P 3 T
L 2 ).
Naturally, there exist pairs of plans that are both symmetric and reordering of each other.
There are 6602112 costoptimal plans in our example, half of them are reorderings of the plan π a and the other half are reordering of π c .
Lastly, the top- k planning problem (Sohrabi et al. 2016;
Katz et al. 2018) is deﬁned as follows.
Deﬁnition 2 (top- k planning problem)
Given a planning task Π
= (cid:104)V , O , s 0 , s (cid:63) (cid:105) and a natural number k , ﬁnd a set of plans P ⊆
P Π such that:
(i) for all plans π ∈ P , if there exists a plan π (cid:48) for Π with cost ( π (cid:48) )
< cost ( π ) , then π (cid:48) ∈ P , and (ii)
| P | ≤ k , with | P | < k implying P = P Π .
An instance of the top- k planning problem (cid:104) Π , k (cid:105) , is called solvable if | P | = k and unsolvable if | P | < k .
The objective of top- k planning is ﬁnding k plans of lowest costs for a planning task Π and thus optimal planning is the special case of top- 1 planning.
Top-quality Planning
We start by formally deﬁning the top-quality planning problem as the problem of ﬁnding all plans of bounded quality.
Deﬁnition 3 (top-quality planning problem)
Given a planning task Π
= (cid:104)V , O , s 0 , s (cid:63) (cid:105) and a natural number q , ﬁnd the set of plans P = { π ∈ P Π | cost ( π ) ≤ q } .
The top-quality planning problem is well-deﬁned and always has a solution.
Note that one can exploit existing tools for top-k planning to derive solutions to the top-quality planning problem, by setting k to a large value and adding another stopping criteria, once a plan π of cost ( π ) >
q was obtained.
In such cases, P would explicitly contain all plans with cost ( π ) ≤ q .
This was done by Vadlamudi and Kambhampati (2016) as the ﬁrst step in their algorithm, although they do not formally deﬁne the top-quality problem.
These explicit sets of plans can get prohibitively large.
Further, some of the plans in that set, although different as sequences of actions, could be considered equivalent from the underlying application perspective.
If, in addition, it would be possible to escape the need for generating all these equivalent plans, the performance of the planners could improve signiﬁcantly.
Let N be some equivalence relation on the set of plans
P Π .
For a plan π ∈ P Π , by N [ π ] we denote the equivalence class of π , which is a set of all plans that are equivalent to π under N .
Slightly abusing the notation, for a set of plans
P , by N [ P ] we denote the union of the equivalence classes (cid:84) π ∈ P N
[ π ] .
Using that equivalence relation, we can deﬁne the quotient top-quality problem as follows.
Deﬁnition 4 (quotient top-quality planning problem)
Given a planning task Π
= (cid:104)V , O , s 0 , s (cid:63) (cid:105) , an equivalence relation N over its set of plans P Π , and a natural number q , ﬁnd a set of plans
P ⊆
P Π such that (cid:83)
π ∈ P N
[ π ] is the solution to the top-quality planning problem.
For equivalence relations that preserve plan cost the quotient top-quality planning problem always has a solution.
Note that solutions to top-quality planning are solutions to the quotient top-quality planning under the identity equivalence relation.
Further, while there is one possible solution to the top-quality planning problem, there can be many solutions to a quotient top-quality problem, deﬁned by representatives of each equivalence class.
Further, nothing in our deﬁnition prevents a solution from including more than one plan per equivalence class, the only restriction is that all equivalence classes have to be represented.
In this paper, we focus on one speciﬁc equivalence relation, considering two plans to be equivalent if their action multi-sets are.
Formally, we consider the equivalence relation
[Equation]
Thus, the main computational problem we consider in this paper is as follows.
Deﬁnition 5 (unordered top-quality planning problem)
Given a planning task Π
= (cid:104)V , O , s 0 , s (cid:63) (cid:105) and a natural number q , ﬁnd a set of plans P ⊆
P Π such that P is a solution to the quotient top-quality planning problem under the equivalence relation U Π .
Note that while the solution to the top-quality planning problem can be obtained from a solution to the unordered top-quality planning problem, using a simple algorithm that generates all possible valid reordering for each plan in the solution, this is not the focus of current work.
Focusing on the unordered top-quality planning problem allows us to generate reorderings of the same plan only if and when these reorderings are actually needed.
Computation of Top-quality Plans
In order to obtain a solver for the computational problem speciﬁed above, we take an approach similar to Katz et al.
(2018), and iteratively generate plans using an existing costoptimal planner, and construct planning tasks with a reduced set of plans, by forbidding exactly the plans found so far.
In contrast to Katz et al.
, we forbid not only a speciﬁc plan, but also all its possible reorderings.
In order to achieve that, we thus instead of forbidding plans as sequences of actions, forbid plans as multi-sets.
To be able to do that, we need to come up with a reformulation of a planning task that forbids all plans with the exact number of appearances for each action.
Similar reformulation was recently suggested by Katz and Sohrabi (2019) for diverse planning.
The reformulation can forbid a single multi-set, and thus for a set of plans, the union of their multi-sets was forbidden in each consecutive iteration.
That way, possibly additional plans were forbidden.
For diverse planning, that did not pose a problem.
In our case, however, we need to ensure that we forbid exactly the set of plans that were previously found.
For that, in what follows, we adapt the reformulation of Katz and Sohrabi (2019) accordingly.
Alternatively, the reformulation of Katz and Sohrabi (2019) can be used directly, creating a sequence of planning tasks, similarly to the way it was done in top- k planning (Katz et al. 2018).
This.
however, poses two problems: the reformulated planning task size grows fast with each iteration, and, as in the iterative top- k planner, the mapping between the reformulated and original actions must be constantly maintained.
In this work, at each iteration we reformulate the original planning task to forbid all plans found so far.
In this case, we do not need to maintain the mapping between the reformulated and original actions and keep the reformulated task size smaller.
In the rest of this section we adapt the deﬁnition of Katz and Sohrabi (2019) to a set of plans (as multisets), present an algorithm that exploits the adapted deﬁnition to derive top-quality solutions, and prove its soundness and completeness.
We start by presenting the deﬁnition.
4. Forbidding a Plan as a Multi-set of Actions
Slightly simplifying the deﬁnition of Katz and Sohrabi (2019), we present a task reformulation that ignores orders between actions in a plan and thus also forbids all possible reorderings of a given plan, as well as all sub-plans.
Deﬁnition 6 Let (cid:104)V , O , s 0 , s (cid:63) (cid:105) be a planning task and π be a plan.
The task Π − π = (cid:104)V (cid:48) , O (cid:48)
[Equation]
s (cid:48) 0 , s (cid:48) (cid:63)
(cid:105) is deﬁned as follows.
• V (cid:48)
=
V ∪ { v } ∪ { v o | o ∈ π } , with v being a binary variable, and dom ( v o ) = { 0 , . . .
, m o } , where m o is the number of occurences of o in π , • O (cid:48)
= { o e | o ∈
O \ π } ∪ (cid:83) m
o i
=
{ o fi | o ∈ π } , where pre ( o e ) =
pre ( o ) , eﬀ ( o e ) = eﬀ ( o ) ∪ {(cid:104) v, 0 (cid:105)} , pre ( o fi ) =
pre ( o ) ∪ {(cid:104) v o , i (cid:105)} , for 0 ≤ i < m o , eﬀ ( o fi ) = eﬀ ( o ) ∪ {(cid:104) v o , i + 1 (cid:105)} , eﬀ ( o fm o ) = eﬀ ( o ) ∪ {(cid:104) v, 0 (cid:105)} , and cost (cid:48)
( o e )= cost (cid:48)
( o fi )
= cost ( o ) , 0 ≤ i ≤ m o , • s (cid:48)
[ v ] = s
[ v ] for all v ∈ V , s (cid:48)
[ v ] = 1 , and s (cid:48)
[ v o ] = 0 for all o ∈ π , and • s (cid:48) (cid:63) [ v ]= s (cid:63) [ v ] for all v ∈V s.t.
s (cid:63) [ v ] deﬁned, and s (cid:48) (cid:63) [ v ]=0 .
The semantics of the reformulation is as follows.
The variable v starts from the value 1 and switches to 0 when an action is applied that is not from plan π treated as a multi-set.
Once a value 0 is reached indicating a deviation from plan π , it cannot be switched back to 1 .
The ﬁnite-domain variables v o encode the number of applications of the action o .
The actions o fi are copies of the action o in π , counting the number of applications of o , as long as the number is not higher than the number of times it appears in π .
Once the number of applications exceeds m o , v is set to 0 .
4. Forbidding Multiple Plans Exactly
In order to forbid multiple plans, the greedy approach of
Katz and Sohrabi (2019) forbids the super-set of these plans by taking a super-set of the multi-sets representing the plans.
In our case, when optimality is required, we cannot follow the same approach.
Instead, we present a reformulation that forbids exactly these plans and their sub-plans, and the possible reorderings.
Our reformulation extends the one in Definition 6, by introducing a binary variable for each plan, encoding whether the plan was deviated from.
Deﬁnition 7 Let (cid:104)V , O , s 0 , s (cid:63) (cid:105) be a planning task, P be a set of plans, and O P = { o | o ∈ π, π ∈ P } .
The task Π − P = (cid:104)V (cid:48) , O (cid:48) , s (cid:48) 0 , s (cid:48) (cid:63) (cid:105) is deﬁned as follows
• V (cid:48)
=
V ∪ { v π | π ∈ P } ∪ { v o | o ∈ O P } , with v π being binary variables, and dom ( v o ) = { 0 , . . .
, m o } , where m o = max π ∈ P { m πo } and m πo is the number of occurrences of o in π
• O (cid:48)
=
{ o e | o ∈
O \ O P } ∪ { o fi | o ∈ O P , 0 ≤ i ≤ m o } , where
[Equation]
[Equation]
=
[Equation]
o
[Equation]
, eﬀ ( o fi ) = eﬀ ( o ) ∪ {(cid:104)
[Equation]
1 (cid:105)
[Equation]
∪ {(cid:104) v
[Equation]
, 0 (cid:105) | i = m πop } for 0 ≤ i < m o , eﬀ ( o fm o ) = eﬀ ( o ) ∪ {(cid:104) v π , 0 (cid:105) | π ∈ P } , and cost
(cid:48) ( o e )= cost (cid:48)
( o fi )
= cost ( o ) , 0 ≤ i ≤ m o ,
• s (cid:48)
[ v ] = s
[ v ] for all v ∈ V , s (cid:48)
[ v π ] = 1 for all π ∈ P , and s (cid:48)
[ v o ] = 0 for all o ∈ O P , and • s (cid:48) (cid:63) [ v ]= s (cid:63) [ v ] for all v ∈V s.t.
s (cid:63) [ v ] deﬁned, and s (cid:48) (cid:63) [ v π ]= for all π ∈ P .
4. Using the Reformulation
Algorithm 1 exploits the reformulation in Deﬁnition 7 to ﬁnd a solution to the unordered top-quality planning problem.
The algorithm incrementally ﬁnds the set P of top quality plans.
Starting with the empty set P = ∅ and assuming Π −∅ =
Π , we use an optimal planner iteratively to ﬁnd an optimal plan π to the planning task Π − P .
Once a plan is found, it is added to the set of found plans P .
Then, the new reformulation Π − P is constructed from Π for the next iteration.
The algorithm stops when a plan π is generated such that cost ( π ) > q .
Note that the algorithm results in a set P of sequential plans, with no two plans being reorderings of each other.
Similarly to Katz et al.
(2018), at each iteration, after the plan π was found, we use structural symmetries to generate from π additional plans that are symmetric (Shleyfman et al. 2015) to π , and add these that are not reorderings of π to the set P .
Finally, since the ﬁrst step results in an optimal plan, the quality can be deﬁned relatively to the cost of the optimal plan rather than an absolute number.
Theorem 1 Algorithm 1 is sound and complete for unordered top-quality planning when using cost-optimal planners that ﬁnd shortest (in the number of actions) costoptimal plans.
Proof: Let P be the set of plans returned by Algorithm 1 and let π f be the plan found when the algorithm breaks.
Since π f is an optimal plan to Π − P and cost ( π f ) >
q , we need to show that Π − P forbids exactly the plans in U Π
[ P ] .
For a plan π ∈ P , Π − P has a variable v π that reaches its goal value only when the number of applications of some action exceeds the number of appearances of that action in π .
Thus, π is not a plan for Π − P .
Since Deﬁnition 7 treats plans as multi-sets, this is true also for all π (cid:
) ∈
U Π
[ π ] .
Let P 1 , . .
. , P n denote the sets of plans at the beginning of each algorithm iteration and let π 1 , . .
π n = π f be the optimal plans found by the algorithm in these iteration, with π i being an optimal plan to Π − P i .
Let π be a plan for Π such that cost ( π ) ≤ q .
If π (cid:54)∈ U Π [ P ] , there exists k such that π is a plan for Π − P k , but not for Π − P
k
+1 .
Let P (cid:48) =
P k +1 \ P k be the plans forbidden in Π −
P k
+
but not in Π − P k .
Then, there exists π (cid:48) ∈ P (cid:48) such that MS ( π ) ⊆
MS ( π (cid:48) ) .
If MS ( π ) =
MS ( π (cid:48) ) , then π ∈ P and we are done.
Assume that MS ( π ) Algorithm top quality
Input: Planning task Π , quality bound q
P ← ∅ Π (cid:48) ← Π while True do π ← optimal plan to Π (cid:48) if cost ( π ) >
q then break end if
P ← P ∪{ π }∪{ π (cid:48) | π (cid:48) is symmetric to π, π (cid:48)
(cid:54)∈ U Π [ π ] } Π (cid:48)
← Π − P according to Deﬁnitionend while return P is a proper subset of MS ( π (cid:48) ) . Note that π (cid:48) is a reordering of a plan that is symmetric to π k , which was the optimal plan found for Π − P k .
Assuming that our optimal planner ﬁnds shorter optimal plans before longer ones, a plan π for Π − P k would be found before π k , contradicting the assumption that
MS ( π ) is a proper subset of MS ( π (cid:48) ) .
(cid:3)
Experimental Evaluation
In order to evaluate the feasibility of our suggested approach for unordered top-quality planning, we have implemented our approach as part of the ForbidIterative planners collection (Katz, Sohrabi, and Udrea 2019), which is implemented on top of the Fast Downward planning system (Helmert 2006).
The collection, among other, includes the implementation of the iterative top-k planner (Katz et al. 2018).
The experiments were performed on Intel(R)
Xeon(R) CPU E78837 @2.67GHz machines, with the time and memory limit of 30min and 2GB, respectively.
The benchmark set consists of all STRIPS benchmarks from optimal tracks of International Planning Competitions (IPC) 1998-2018, a total of 1797 tasks in 64 domains.
Our baseline for the comparison is a simple approach, using a top-k planner with a large k value, 10 9 , stopping if a plan of quality above the bound was reached.
We use NaiveS , the best perfoming conﬁguration of the iterative top-k planner (Katz et al. 2018), that exploits both symmetries and plan reorderings.
The purpose of setting k to a large number is to allow the top-k planner to exploit the entire 30min time interval.
Among tasks solved, the largest number of plans found by the top-k planner was 60480.
For tasks not solved, the maximal number of plans found by the top-k planner was 767501.
Note that reading and writing such large amounts of plans is time consuming by itself.
For each task, the quality bound is computed using the cost of the ﬁrst found (optimal) plan, multiplied by a constant 2 .
We experiment with four different quality bound multipliers, namely q m = 1 .
(optimal plans only), 1 . 05 , 1 . 1 , and 1 .
2 of the optimal plan cost.
For larger quality bounds, both approaches had low coverage, and thus we do not report these results.
Note, q can be any natural number as mentioned in Deﬁnition 5.
q m =1 . 
 q m =1 .
05 q m =1 .
10 q m =1 .
Coverage
K-tq
tq K-tq tq K-tq
tq K-tq
tq airport        blocks        data-network        0 depot        driverlog        ﬂoortile        0 ged         gripper        logistics         logistics        0 miconic        movie       0 mprime        mystery        nomystery         openstacks         parcprinter         parcprinter         pegsol         pegsol         pipes-notank        pipes-tank       1 psr-small        rovers
[Table]
Table 1 depicts the per-domain summed coverage, comparing our technique, tq, to the baseline, K-tq, for four quality bound multipliers.
Each task gets a coverage of 1 if and only if the planner proved there is no other plan within quality bound, by either ﬁnding a plan above the bound or proving there are no other plans.
Note ﬁrst that out of the 64 domains, there are 18 domains where all optimal plans could not be found for any tasks, with any approach.
There are 7 more domains where there is no difference in coverage between the baseline and our approach, for all tested quality bounds.
These 25 domains are summarized in the Sum other row of Table 1.
Out of the remaining 39 domains, the coverage never gets worse and it gets better (often signiﬁcantly better) for at least one of the tested quality bounds.
Extreme examples are AIRPORT , LOGISTICS 00, and PSRSMALL where the increase in coverage for some quality
[Figure]
bounds is by 10 instances or more.
Overall, there is a clear beneﬁt of the suggested approach over the baseline.
Another beneﬁt of our approach is a compact representation of the solution.
Figure 3 shows a per-task comparison of the number of plans in the solution for each of the approaches, for the quality bound multiplier q m = 1 . 0 , for tasks solved by both approaches.
First, out of the total of 263 such tasks, there are 111 tasks on the diagonal.
Out of the remaining 152 tasks (all above the diagonal), 73 tasks have a single optimal plan found by our approach, while the baseline needs to ﬁnd multiple optimal plans, which are all reorderings of the same plan, with the maximal number of 60480 reorderings found.
When the number of valid reordering is larger, the baseline approach fails before being able to ﬁnd all optimal plans.
Finally, Figure 4 compares the reformulated task size of our approach to the baseline one.
We compare the last generated task reformulation, for tasks solved by both approaches, for the quality bound multiplier q m = 1 . 0 .
The task size is measured here by the number of facts, i. e., variable value pairs.
While the larger tasks are not necessarily harder for a classical planner, this is usually the case.
Our experiments clearly show that our approach creates tasks of sizes almost two orders of magnitude smaller than the baseline approach.
Conclusions and Future Work
In this work we have shown a way of obtaining all plans of bounded solution quality, representing plan reorderings implicitly and thus escaping the need for counting plans.
We have presented a novel reformulation of a planning task that forbids exactly the set of given plans, their reorderings, and all subplans thereof.
We have formally deﬁned the family of computational problems in top-quality planning and
[Figure]
t op qu a lit y v i a t opk ( K - t q ) have implemented a ﬁrst planner for unordered top-quality planning.
The planner, exploiting the new reformulation, has empirically shown to perform signiﬁcantly better than the straightforward approach of exploiting top- k planners with a large bound k , as it is often done in practice.
For future work, one promising direction is exploring the use of top-quality instead of top- k planners in planning applications.
Another possible direction is creating a topk planner based on the unordered top-quality planner, exploiting the more compact task representation.
Further, (unordered) top-quality planners can be used to obtain solutions to diverse planning, when solution cost is also considered (Vadlamudi and Kambhampati 2016).