{'fraction_non_alphanumeric': 0.041306469604015614, 'fraction_numerical': 0.010736196319018405, 'mean_word_length': 4.559883720930233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Generalizing the Role of Determinization in Probabilistic Planning

The stochastic shortest path problem (SSP) is a highly expressive model for probabilistic planning. The computational hardness of SSPs has sparked interest in determinization-based planners that can quickly solve large problems. However, existing methods employ a simplistic approach to determinization. In particular, they ignore the possibility of tailoring the determinization to the specific characteristics of the target domain. In this work we examine this question, by showing that learning a good determinization for a planning domain can be done efficiently and can improve performance. Moreover, we show how to directly incorporate probabilistic reasoning into the planning problem when a good determinization is not sufficient by itself. Based on these insights, we introduce a planner, FF-LAO*, that outperforms state-of-the-art probabilistic planners on several well-known competition benchmarks.


Introduction
One of the most popular models for probabilistic planning is the Stochastic Shortest Path SSP) [Bertsekas and Tsitsiklis, 1991]. A solution to an SSP is a sequence of actions that, starting from a given initial state, minimizes the expected cost of reaching a state from a given set of goal states. The uncertainty associated with the outcome of each action induces probabilistic transitions between states. This model has been used for a wide variety of applications, such as route planning in the presence of traffic delays [Lim et al., 2013], quantifying the value of battery energy storage systems [Tan et al., 2015], modeling wildfire propagation [Hajian et al., 2016], and semi-autonomous driving [Wray et al., 2016].
Despite its popularity, a major obstacle to the wide applicability of SSPs is the prohibitive computational cost of finding an optimal solution. This is due to the fact that optimal policies can, in the worst case, cover a number of states linear in the size of the state space, which in turn can be exponential in the number of variables describing the problem.
Given the difficulty of solving SSPs optimally, there has been much interest in developing methods that sacrifice optimality for the sake of computational efficiency. Among these methods, one of the most successful approaches has been the use of determinization complemented by replanning. These methods became popular thanks to the unexpected success of FF-Replan [Yoon et al., 2007] in the International Probabilistic Planning Competition (IPPC) [Bryce and Buffet, 2008]. FF-Replan works by transforming the original problem into a deterministic one (e.g., by only considering most probable outcomes), and using the FF classical planner [Hoffmann and Nebel, 2001] to solve the resulting problems. This process is then repeated during execution whenever a state not covered by the current deterministic plan is observed.
Although FF-Replan is significantly faster than any optimal probabilistic planner, it performs poorly in many problem domains due to the fact that it ignores the uncertainty. This has led to the development of more robust determinizationbased algorithms, that incorporate some form of probabilistic reasoning.
RFF [Teichteil-Königsbuch et al., 2010]-the winner of IPPC'08-works by incrementally aggregating partial plans until the result covers a high probability envelop of states; each partial plan is computed using determinization and the FF planner. FF-Hindsight [Yoon et al., 2008] works by sampling a set of deterministic "futures" of the original problem, solves each using FF, and combines their cost to estimate the costs in the original problem. HMDPP [Keyder and Geffner, 2008] introduces a self-loop determinization trick that nudges the deterministic planner into generating plans with low probability of deviation. SSiPP-FF [Trevizan and Veloso, 2014] works by creating short-sighted problems that consider only states up to a certain horizon from the current state. These smaller problems are solved optimally, and when a tip state is found during execution, the FF-Replan method is used.
Although these planners are capable of quickly solving large problems, they all employ a rather crude approach to determinization, by generally relying on either the most-likelyoutcome (MLO) determinization, or the all-outcomes (AO) one. Using MLO can make planners ignore important sections of the state space (e.g., outcomes leading to dead-ends), resulting in poor policies. Using AO has other problems such as potentially wasting computation on irrelevant/unlikely sections of the state space, or treating all paths to the goal as equally important.
Recent work has shown that the choice of determinization can sometimes have a significant impact in the quality of a determinization-based planning approach [Pineda and Zilberstein, 2014]. In fact, even in some domains deemed "probabilistically interesting" [Little and Thiebaux, 2007] planning with a good determinization can actually result in optimal plans for the original SSP (e.g., the triangle tireworld domain). However, not much work has been done on generating methods for choosing a determinization that works well for a particular domain.
In this work, we address these issues with two main contributions. First, we present a new planner, FF-LAO*, that combines the LAO* optimal SSP solver [Hansen and Zilberstein, 2001] with the FF classical planner. FF-LAO* can leverage fast deterministic planning to estimate state values, but still partially reason about the complete probabilistic model if sodesired; it does this by relying on the reduced models framework introduced by Pineda and Zilberstein [2014].
Our second contribution is showing that it is possible to learn a good determinization on small instances of a planning domain, such that, when applied to larger instances, significant gains in efficiency and performance can be realized. This is the first work that selects a determinization based on the anticipated performance in the original probabilistic domain.
The rest of the paper is structured as follows: Section 2 gives background on SSPs and reduced models, Section 3 describes the FF-LAO* algorithm, Section 4 explains how to choose a good determinization for a particular planning domain, Section 5 presents experimental results, and Section 6 summarizes the conclusions and ideas for future work.

Background
A Stochastic Shortest Path (SSP) problem [Bertsekas and Tsitsiklis, 1991] is defined by a tuple S, A, T, C, s 0 , G , where S is a finite set of states, A is a finite set of actions, T (s |s, a) ∈ [0, 1] represents the probability of reaching state s when action a is taken in state s, C(s, a) ∈ [0, ∞) is the cost of applying action a in state s, s 0 is an initial state and G is a set of goal states satisfying ∀s g ∈ G, a ∈ A, T (s g |s g , a) = 1 ∧ C(s g , a) = 0. Moreover, we assume costs satisfy ∀s ∈ S \ G, C(s, a) > 0. Interestingly, SSPs are a variant of Markov Decision Process (MDPs) [Puterman, 1994] that has been shown to be more general than finite-horizon and infinite-horizon discounted MDPs [Bertsekas and Tsitsiklis, 1995].
A solution to an SSP is a policy, a mapping π : S → A, indicating that action π(s) should be taken at state s. A policy π induces a value function V π : S → R that represents the expected cumulative cost of reaching s g ∈ G by following policy π from state s. An optimal policy π * is one that minimizes this expected cumulative cost; similarly, we use the notation V * to refer to the optimal value function.
For an SSP to be well-defined, a policy must exist such that the goal is reachable from any state with probability 1. Under this assumption, an SSP is guaranteed to have an optimal solution, and the optimal value function is unique. This optimal value function can then be found as the fixed point of the Bellman update operator (Eq. 1).
There is a variety of languages to compactly describe SSPs, of which PPDDL [Younes and Littman, 2004] has been most widely used within the AI community. As it turns out, it has been shown that finding whether a plan exists in a compactly described problem is EXPTIME-complete [Littman, 1997]. As mentioned earlier, this challenging complexity has led to the development of many approximate methods for solving SSPs. Particularly relevant to our work are determinizationbased approaches, and, more generally, the reduced models framework.

Reduced Models
Given an SSP, the reduced models framework creates a simplified model characterized by two parameters: the number of outcomes per action that are fully accounted for (referred to as primary outcomes), and the maximum number of occurrences of the remaining outcomes that are planned for in advance (referred to as exceptions). This type of reduction generalizes single-outcome determinization, and introduces a spectrum of reductions with varying levels of probabilistic complexity.
The model assumes a factored representation of SSPs in which actions are probabilistic operators of the form: where each effect e i , for i ∈ {1, ..., m}, is associated with a probability p i of occurring when a is executed, and there exists a successor function, τ , that maps effects to successor states, so that s = τ (s, e i ) and T (s |s, a) = p i .
Using this formalism, a reduced model of an SSP S, A, T, C, s 0 , G is defined as follows: • The set of states is defined as S = S × {0, 1, .., k}, where k is a positive integer; • The set of actions is the original set, A; • The transition function is defined by Eq. (2); • The cost function is defined as C ((s, j), a) = C(s, a), for all (s, j) ∈ S ∧ a ∈ A; • The initial state is (s 0 , 0); The transition function defined below, while seemingly complicated, describes a simple process. The value j in state (s, j) keeps counts of how many exceptions have occurred up to that point in execution. For states where the count is less than the exception bound, k, the transition function operates as the original, except that the counter is increased by one for successors labeled as exceptions. On the other hand, for states with count j = k, the transition completely ignores exceptions, and only considers transitions to primary outcomes, redistributing the ignored probabilities so that they form a proper distribution (e.g., by normalizing). The notation P a used below refers to the set of primary effects.
where s = τ (s, e i ) and the set {p 1 , ..., p m } is any set of real numbers that satisfy ∀i : e i ∈ P a p i > 0 and i:ei∈Pa Note that the reduced models framework encapsulates single-outcome determinization, which is simply a reduction where the set of primary outcomes has size 1 and the value of k = 0. In this work we are indeed concerned with reductions having a single primary outcome, but will include the possibility of using k > 0. We refer to these models as M k 1reductions.

FF-LAO*
Reducing an SSP can significantly accelerate planning times by pruning large sections of the state space. However, there are many domains in which solving a reduced model optimally is still prohibitively expensive. In fact, for complex domains like the ones used in IPPC [Bryce and Buffet, 2008], using determinization and k = 0 already results in problems too large to be solved optimally in a practical manner.
To address this issue, we present a planner that combines the flexibility of the reduced models framework with the efficiency of a classical planner. We call this planner FF-LAO*, as it is an extension of the LAO* algorithm [Hansen and Zilberstein, 2001] that leverages the FF classical planner [Hoffmann and Nebel, 2001] to accelerate computation.
FF-LAO* (Algorithms 1-4) receives as input an M k 1 -reduction, S = S , A, T , C , (s 0 , 0), G ; i.e., one that becomes deterministic after the exception bound is reached (equivalently, one where ∀a ∈ A, |P a | = 1). The remaining inputs are the exception bound, k, and the error tolerance, . We use S to denote the original SSP from which S is derived.
FF-LAO* works almost exactly as LAO*, except that FF is used to compute values and actions for states that have reached the exception bound (i.e., states of the form (s, k)). This occurs in lines 4 and 8 of Algorithm 1, where the state expansion and test convergence procedures are replaced with versions that use FF (Algorithms 2 and 3, respectively).
Readers familiar with LAO* may notice differences with respect to the usual expansion and convergence test procedures. In particular, note the inclusion of if statements in line 7 (both procedures), where the successors of the expanded state are only added to the stack if j < k. The reason is that states (s, k) will be solved by calling FF, so there is no need to expand their successors.
It is possible, of course, to remove these if statements and let FF-LAO* continue the search; in that case, FF will be used as an inadmissible heuristic. However, this does not improve the theoretical properties of the algorithm (neither version is optimal), and results in higher computation times, so we prefer the version shown in the pseudocode.
The actual call to FF is done in Algorithm 4 (FF-BELLMAN-UPDATE). This procedure performs a Bellman update (Eq. 1) for any state (s, j) with j < k, and stores the updated cost estimate and best action in global variables V [(s, j)] and π[(s, j)], respectively (lines 6-7). For simplicity of presentation, we use the following action-value function: and assume, as is common for heuristic search algorithms, that the values V [(s , j )] are initialized using an admissible heuristic for S .
For states (s, k), the FF-BELLMAN-UPDATE procedure creates a PDDL file 1 , denoted as D, representing the deterministic problem induced by M when j = k, with initial state s (CREATE-PDDL in line 3). The procedure then calls FF with input D (line 4) and memoizes costs and actions for all the states visited in the plan computed by FF (lines 5-7).
More concretely, for each state s i visited by this plan, we set V [(s i , k)] to be the cost, according to C , of the plan computed by FF for that state (line 6), and set π[(s i , k)] to be the corresponding action (line 7). Additionally, note that the estimates V [(s, k)] are not admissible, even with respect to the input M k 1 -reduction, since FF is not an optimal planner for deterministic problems. Finally, in the case that FF returns failure, we set V [(s, k)] = ∞ and π[(s, k)] = NOP.
FF-BELLMAN-UPDATE also returns the residual, defined as the absolute difference between the previous cost estimate, and the estimate after applying the Bellman equation. This residual is used by FF-TEST-CONVERGENCE to check the stopping criterion of the algorithm.
Handling plan deviations during execution While FF-LAO* solves M k 1 -reductions, the ultimate goal is to solve the SSP from which the reduction is derived from. As mentioned before, we use S to denote this SSP. It is easy to see that a complete policy for S is not necessarily complete for S. Therefore, during execution we need to be able to handle deviations from the plan returned by FF-LAO*.
We use a replanning approach to address this issue, FF-LAO*-REPLAN, illustrated in Algorithm 5. The idea is simple: during execution, check if the current state has an action already computed with j = 0. If that's the case, this action is executed (line 7). Otherwise, FF-LAO* is called to solve the reduced model with initial state (s, 0) (lines 5-6). FF-LAO*-REPLAN receives the choice of determinization as input (∆), and creates an M k 1 -reduction accordingly (line 1). Note that there are other choices for the replanning criterion. For example, checking if there is any j ∈ [0; k] such that (s, j) ∈ π. Another alternative is to keep track of exceptions during execution, and set the value of j accordingly; in this case, j should be set to 0 after re-planning. Other alternatives are possible. We choose the one used by FF-LAO*-REPLAN because it is, in principle, the more robust choice, given that we use the maximum "look-ahead" every time 2 . However, if computational efficiency is a concern, other alternatives might be better. We leave a more in depth analysis of these choices for future work.
Theoretical considerations We now show conditions under which FF-LAO* is guaranteed to succeed. The following definition will be useful: a proper policy rooted at s is one that reaches a goal state with probability 1 from every state it can reach from s. Proof. Whenever FF-LAO* expands a state (s, k) and calls FF on this state, if the call succeeds, the states s i , for i ∈ [1, ..., L], that are part of the plan computed by FF essentially become terminal states of the problem, with costs set as in line 6. Since FF is a sub-optimal planner for deterministic problems, we have that i≤x≤L C ((s x , k), a i ) ≥ V [(s i , k)], and thus the values of all other states (s, j), with j < k, are guaranteed to be admissible with respect to the new updated value of the added terminal states. Therefore, after every successful call to FF, the resulting set of values and terminal states form a well-defined SSP, which LAO* is able to solve.
Moreover, in the case that a call to FF fails for some statê s, this state will be assigned an infinite cost, and thus the improved version of LAO* will avoidŝ as long there is some other path to the goal. Because FF is complete, any state belonging to a proper policy will be assigned a positive Unfortunately, as is the case for virtually all replanning algorithms, not much can be guaranteed about the quality of plans found by FF-LAO*-REPLAN for S. However, as we show in our experiments, by carefully choosing the input determinization, ∆ and the bound k, FF-LAO*-REPLAN can find successful policies extremely quickly, even in domains well-known for their computational hardness and the presence of dead-end states.

Choosing a Good Determinization
Many stochastic domains have an inherent structure that make some of their determinizations significantly more effective than others. Consider, for instance, the triangle-tireworld domain [Little and Thiebaux, 2007]. The agent has to reach one of the vertices in a planar graph of triangular shape, but after every move there is the possibility of getting a flat tire (see Figure 1). If this happens, it must get a spare tire before being able to move again. However, spares are only available in certain locations, and there is only a single path from the start to the goal such that all locations in the path have spares. This domain has two possible determinizations, depending on whether a flat tire happens after moving or not. As it turns out, it is possible to get the optimal policy for this problem by planning as if a flat tire will always occur. The interesting part is that this is true for all instances of this problem, regardless of size.
Triangle-tireworld is a great example of a domain where all domain instances share a probabilistic structure that can be captured by determinization. In practical terms, this means that it is possible to learn a determinization on the smaller problems, and then use it for solving larger ones.
We adopt this approach for choosing the input determinization to FF-LAO*-REPLAN, ∆. We assume a set of problems of varying sizes are available and that it is easy to identify the smaller ones. This is the case for the IPPC benchmarks that we consider in our experiments, as they are typically ordered by problem size/difficulty. However, in general, some analysis of the problem might be required, for example, by counting the number of possible grounded atoms that the problem description induces. Another possibility is to generate small problems automatically from the domain description. This has the advantage that it doesn't require additional problems for learning the determinization to use (besides the actual problem to solve). Although this is certainly an interesting possibility, it requires some finesse and it is outside the scope of this work. Algorithm 6 illustrates LEARNING-DET, a brute-force approach to learn a determinization ∆ for domain D; S l represents the problem used for learning. This procedure does a comprehensive search over the space of all determinizations. For each, we estimate the probability of success (P i ) and the expected execution cost (C i ) of running FF-LAO*-REPLAN on S l ; the costs are estimated using Monte-Carlo simulations. Finally, we pick the determinization with the lowest expected cost, among the ones with the highest probability of success.
There are some subtleties involved in this process. Note that FF-LAO* is only guaranteed to terminate if the input reduction has a proper policy from its initial state. This will most likely not be the case for many of the determinizations explored by LEARNING-DET; in fact, under some determinizations the goals might be completely unreachable from any state.
We address this issue using a well-known technique for planning with problems involving dead-ends. In particular, we use a cap M on state costs, including the costs assigned when FF fails, and modify the Bellman backup operator used which guarantees the convergence of heuristic search algorithms [Kolobov et al., 2012]. While this introduces a new parameter impacting the planner's decisions, and hides the true impact of dead-end states. Note that LEARNING-DET still attempts to maximize the multi-objective evaluation criterion typically used when unavoidable dead-ends exist [Kolobov et al., 2012;Steinmetz et al., 2016].

Experiments Domains and methodology
We evaluated FF-LAO* and LEARNING-DET on a set of problems taken from IPPC'08 [Bryce and Buffet, 2008]. Specifically, we used the first 10 problem instances of the following four domains: TRIANGLE-TIREWORLD, BLOCKSWORLD, EX-BLOCKSWORLD, and ZENOTRAVEL. Unfortunately, the rest of the IPPC'08 domains are not supported by our PPDDL parser [Bonet and Geffner, 2005].
Additionally, we modified the EX-BLOCKSWORLD domain to avoid the possibility of blocks to be put on top of themselves [Trevizan and Veloso, 2014].
The evaluation methodology was similar to the one used in past planning competitions: we give each planner 20 minutes to solve 50 rounds of each problem (i.e., reach a goal state starting from the initial state). Then we measure its performance in terms of the number of rounds that the planner was able to solve during that time. All experiments were conducted on an Intel Core i7-6820HQ machine running at 2.70GHz with a 4GB memory cutoff.
We evaluated the planners using the MDPSIM [Younes et al., 2005] client/server program for simulating SSPs, by having planners repeatedly perform the following three steps: 1) connect to the MDPSIM server to receive a state, 2) compute an action for the received state and send the action to the MDPSIM server, and 3) wait for the server to simulate the result of applying this action and send a new state. A simulation ends when a goal state is reached, when an invalid action is sent by the client, or after 2500 actions have been sent by the planner.
We compared the performance of FF-LAO* with our own implementations of FF-REPLAN and RFF, as well as the original author's implementation of SSIPP [Trevizan and Veloso, 2014]. We evaluated two variants of FF-REPLAN, one using MLO (FF s ) and another one using AO (FF a ). For RFF we used MLO and the Random Goals variant, in which before every call to FF, a random subset (size 100) of the previously solved states are added as goal states. Additionally, we used a probability threshold ρ = 0.2. The choice of these parameters was informed by analysis in the original work [Teichteil-Königsbuch et al., 2010]. For SSIPP we used t = 3 and the h add heuristic, parameters also informed by the original work [Trevizan and Veloso, 2014].
For FF-LAO*, we learned a good determinization to use by applying LEARNING-DET on the first problem of each domain (p01), with k = 0. This choice of k was motivated both by time considerations, and by the rationale that k = 0 should better reflect the impact of each determinization (since FF-LAO* becomes a fully determinization-based planner). We used a dead-end cap D = 500 throughout our experiments. We initialized values with the non-admissible FF heuristic [Bonet and Geffner, 2005].
We ran LEARNING-DET offline, prior to the MDPSIM evaluation. Note, however, that the time taken by the brute force search plus the time used to solve problem p01 with the chosen determinization was, in all cases, well below the 20 minutes limit (approx. 2 minutes in the worst case). The remaining parameter for FF-LAO* is the value of k. We report the best performing configuration in the range k ∈ [0, 3], which was k = 0 for most domains, with the exception of EX-BLOCKSWORLD, which required k = 3. Note that FF-LAO* with k = 0 is essentially equivalent to FF-REPLAN, so any advantage obtained over FF s and FF a is completely derived from the choice of determinization. Figure 2 shows the number of successful rounds obtained by each planner in the benchmarks. In general, FF-LAO* either tied for the best, or outperformed the baselines. All planners had a 100% success rate in BLOCKSWORLD, so there is not much room for comparison.

Results and Discussion
In the TRIANGLE-TIREWORLD domain, FF-LAO* and FF s had 100% success rate, while RFF ran out of time in the last 3 problems. On the other hand, the performance of SSIPP and FF a deteriorated quickly as the problem instance increased. It is worth pointing out that the performances of FF s and RFF in this domain are quite sensitive to tiebreaking-there are only two outcomes to choose from, each occurring with 0.5 probability. As the results of FF a suggest, a different choice would have resulted in a much worse success rate. On the other hand, the use of LEARNING-DET gets around this issue by automatically choosing the best determinization to use, a process that took seconds. While we do note that the best goals parameterization of RFF gets around this issue, its computational cost is much harder, so it's not obvious that it would actually improve performance in this case [Teichteil-Königsbuch et al., 2010].
In the EX-BLOCKSWORLD domain FF-LAO* (with k = 3) and SSIPP significantly outperform the other two planners, solving 252 and 250 rounds, respectively, against 187 for both FF s and RFF, and 200 for FF a . Interestingly, in this domain the determinization found by LEARNING-DET is not sufficient to obtain good performance; in fact, only 3 problems had a non-zero success rate with k = 0. This highlights the utility of doing probabilistic reasoning with FF-LAO*. Although not shown here for space considerations, the performance with k = 1 (214 successful rounds) was already better than all the baselines, except for SSIPP.
In ZENOTRAVEL, FF-LAO* and FF a were remarkably better than the other two planners: they achieved 100% success rate in all domain instances, while the other baselines failed almost all of the rounds. In the case of the determinization-based planners, this is due to the goal becoming unreachable under MLO, so the choice of determinization  has a significant impact on performance.

Conclusion
In this work we presented a novel perspective on the use of determinization for probabilistic planning, by showing that a careful choice of determinization can outperform stateof-the-art planners. We also introduced a new planner, FF-LAO*, that, given a choice of determinization, leverages the power of classical planning algorithms for computational efficiency, but can also reason probabilistically if desired. We proposed a strategy for selecting a determinization that takes advantage of the inherent structure of a given stochastic domain. We show that the choice of determinization can generalize across problems of varying size, in particular, in terms of its impact on planning performance (probability of success and expected cost).
We compared our approach to state-of-the-art planners for goal-oriented probabilistic problems, using a set of benchmarks taken from the International Probabilistic Planning Competition. Our results strongly support the claim that the choice of determinization can lead to very substantial gains in performance, and position FF-LAO*-using our determinization learning approach-as a competitive planner for large stochastic domains.
In future work, we plan to explore ways to vary the choice of determinization according to state-space features, and to develop automated methods for generating problems useful for learning a good determinization of a given domain.

Acknowledgment
This work was supported in part by NSF Grant No. 1524797.