CAPÍTULO 1 MARCO TEÓRICO
1.3 Tributación de las rentas pasivas
to a piece-wise encoding, i. e., one where each piece can be identified uniquely and the cell it occupies is stored, whereas in the cell-wise encoding the type of piece occupying a certain cell is stored. The piece-wise encoding typically helps if we have very few equal pieces, such as in CHESS(apart from the pawns each piece exists at most twice) or in then2− 1-P
UZZLE, where each piece is unique. In CONNECTFOURthe piece-wise encoding would immediately increase the size for representing a single state from2n + 1 bits to2n ⌈log (n + 1)⌉ + 1 (each piece can reside on one of the n cells, or nowhere, if it was not yet played). Furthermore, here we face the problem that a line of four pieces concerns pieces that might be arbitrarily far away from each other in this encoding, so that we will very likely suffer from an exponential size in terms of BDD nodes as well, independent of the variable ordering.
4.3.3
Experimental Evaluation
For a column-wise variable ordering we have evaluated the number of BDD nodes for representing the termination criterion for four pieces of one player being placed in a horizontal or vertical line for several board sizes (cf. Figure 4.17). For a fixed number of rows (cf. Figure 4.17a) the growth of the number of BDD nodes is linear in the number of columns, while for a fixed number of columns (cf. Figure 4.17b) it is exponential in the number of rows. Though it first might seem like a contradiction to our result, it actually shows that the result holds for the chosen variable ordering.
In this variable ordering the partitions induced by the split of the variable ordering cut at leasth edges. Thus, the resulting BDD’s size is exponential inh. For the case of a fixed height, h does not change, so that the size increases by a constant amount of nodes. On the other hand, when fixing the width the size changes exponentially in the height, no matter if the height is smaller or larger than the width. This happens because in the cases that the height is actually larger than the width the used variable ordering is not the best choice—in those cases it should have been in a row-wise manner.
Additionally, we have evaluated the default instance of7 × 6 along with the full termination criterion in two complete searches, one stopping at terminal states and one continuing after them (cf. Figure 4.18). Again we used a column-wise variable ordering. We can see that the number of states in the first case is smaller than in the second, while the number of BDD nodes needed to represent these states is larger in the first case. Thus, for this variable ordering we can clearly see that the use of the termination criterion increases the sizes of the BDDs. Concerning runtimes, performing full symbolic BFS with usual handling of terminal states takes nearly five hours, while finding the states reachable when ignoring terminal states takes only23 seconds.
Another fact this experiment shows is that the set of reachable states still requires quite large BDDs, though we cannot really say whether they are of exponential size or not. To validate Lemma 4.5 we slightly adapted the game to no longer use gravity, so that we actually analyzed the game of4-in-a-row. For this game we performed the same experiments as for CONNECTFOUR(cf. Figure 4.19). Here we can see that the BDD size is polynomial in the case of continuing after terminal states, while the number of states is clearly exponential. In this setting, in layerl (0 ≤ l ≤ wh) we have exactly wh!
(wh−l)!⌈l/2⌉!⌊l/2⌋! =
wh
wh−l,⌈l/2⌉,⌊l/2⌋
states, asl of the wh cells are occupied (leaving wh − l cells empty), one half by the first, the other half by the second player. When stopping at terminal states we were not able to fully analyze the game, as after only16 steps the available memory was no longer sufficient to hold the entire BDD for the next layer and the machine started swapping. Concerning the runtimes, ignoring the terminal states we can find the reachable states for each layer in roughly two seconds, while calculating the first16 layers in the normal way takes about2:18 hours. Thus, in this domain we can clearly see the exponential blow-up induced by integrating the termination criterion in the search process.
4.4
Conclusions and Future Work
In this chapter we have determined bounds for the BDD sizes for representing the (supersets of) reachable states in a number of well-known benchmark problems from planning as well as game playing. In the first problems, containing simple termination criteria, the representation of the reachable states can be easy or
38 CHAPTER 4. LIMITS AND POSSIBILITIES OF BDDS 0· 100 5· 106 10· 106 15· 106 20· 106 25· 106 4 5 6 7 8 9 10 11 12 13 14 15 Number of BDD Nodes Number of Columns 10 Rows 9 Rows 8 Rows 7 Rows
(a) Different heights.
103 104 105 106 107 108 4 5 6 7 8 9 10 11 12 13 14 Number of BDD Nodes Number of Rows 10 Columns 9 Columns 8 Columns 7 Columns 6 Columns 5 Columns (b) Different widths.
Figure 4.17: Number of BDD nodes for the termination criterion for one player in the CONNECT FOUR
domain. The variable ordering is according to the columns.
hard when using BDDs, i. e., result in BDDs of polynomial or exponential size. In the last problems, CON-
NECTFOURandk-in-a-row games in general, the termination criterion is hard to represent as a BDD, while the set of reachable states can be represented efficiently, if we omit the evaluation of terminal states—and use no gravity in case of CONNECTFOUR.
With these problems we now have a classification for the efficiency of a BDD representation (cf. Table 4.2). Note that one bucket of this classification is not yet filled. It remains future work to find a problem for which the representation of the set of reachable states as well as the termination criterion results in a BDD of exponential size.
Lemma 4.7 is very general by stating that for any variable ordering the BDD representation of the fact that any two adjacent cells of a game board are occupied , no matter by what piece, is exponential. Thus, we might expect games such as CHESSor AMERICANCHECKERSto be rather difficult for the BDD
4.4. CONCLUSIONS AND FUTURE WORK 39 100 102 104 106 108 1010 1012 1014 0 5 10 15 20 25 30 35 40 Counts Layer nodes (total) states (total) nodes (layer) states (layer)
(a) Stopping at terminal states.
100 102 104 106 108 1010 1012 1014 0 5 10 15 20 25 30 35 40 Counts Layer nodes (total) states (total) nodes (layer) states (layer)
(b) Continuing after terminal states.
Figure 4.18: Comparison of the number of states and BDD nodes for different layers for a7 × 6 board in CONNECTFOUR. The variable ordering is according to the columns.
representation as well.9 In those cases the representation of the transition relation might be overly complex.
All moves depend on at least two cells; if we perform a capture two of the relevant cells must be occupied, so that the BDD representation of the precondition of such a move will likely be of exponential size in the dimension of the board. If that can be proved it might be necessary to extend the classification to a three- dimensional table, one dimension for the complexity of the representation of the set of reachable states, one for the termination criterion and the third for the transition relation.
Using the same argumentation as above it seems likely that the termination criterion for CHESSat least for the case of a check-mate, will need an exponential sized BDD as well, as there we must be certain that the king is under attack and all cells adjacent to the king’s are either occupied by own pieces or are under attack by the opponent.
9At least for CHESSthis actually seems to be the case, according to work by Kristensen (2005) and Hurd (2005), who worked on
40 CHAPTER 4. LIMITS AND POSSIBILITIES OF BDDS 100 102 104 106 108 1010 1012 1014 1016 1018 1020 0 5 10 15 20 25 30 35 40 Counts Layer nodes (total) states (total) nodes (layer) states (layer)
(a) Stopping at terminal states.
100 102 104 106 108 1010 1012 1014 1016 1018 1020 0 5 10 15 20 25 30 35 40 Counts Layer nodes (total) states (total) nodes (layer) states (layer)
(b) Continuing after terminal states.
Figure 4.19: Comparison of the number of states and BDD nodes for different layers for a7 × 6 board in the4-in-a-row game. The variable ordering is according to the columns.
Table 4.2: Classification of some chosen benchmarks with respect to the BDD sizes. Polynomial Reachability Exponential Reachability
Polynomial Termination Criterion GRIPPER BLOCKSWORLD
SOKOBAN SLIDINGTILESPUZZLE
n2− 1-PUZZLE
Exponential Termination Criterion CONNECTFOUR
TIC-TAC-TOE
GOMOKU
Apart from filling the empty buckets of the classification it also remains future work to prove bounds for more benchmark problems and to find other general criteria that immediately decide whether some part of the problem can be represented by a BDD of polynomial or exponential size. Once we have such criteria, we might be able to automatically decide whether to prefer symbolic or explicit search.
Part II
Action Planning
Chapter 5
Introduction to Action Planning
Awaiting my last breath the mirror calls my name it’s showing me the way into the dark
the bridge appears I jump into the dark side and hear the voice it’s cold as ice “Welcome to reality”
Blind Guardian, Lost in the Twilight Hall from the Album Tales from the Twilight World
Action planning is a special case of general problem solving, and as such it is an important part of re- search in artificial intelligence. The problem solvers (in this context called planners) need to find a solution for the problem at hand without interaction of a human being and also without prior knowledge of the given problem. Thus, the developer of such a planner cannot insert any domain-dependent improvements.
All the problems are specified in a common format, which the planners must analyze in order to un- derstand the dynamics. Typical examples for such inputs are STRIPS (Stanford Research Institute Problem Solver) by Fikes and Nilsson (1971) and PDDL (Planning Domain Definition Language) by McDermott (1998). The latter allows for a more natural description of the desired problems, so that it is now the most commonly used language for describing planning problems, especially in the course of the International Planning Competition (IPC), which is held every second or third year since1998.
These inputs correspond to an implicit description of a state space. Thus, a planning problem consists at least of the elements described in Definition 1.4 on page 4, though they are often called somewhat differently. In the most basic form we are given a set of fluents or predicates needed to describe a state, a number of operators (in the context of planning also called actions) to transform states to their successors, an initial state, and a set of terminal states (in planning typically called goal states). The planners are then supposed to find a solution (in this context called a plan), which corresponds to a sequence of actions that transforms the initial state to one of the goal states.
In action planning we distinguish several different subareas (called tracks). While this basic idea still holds in most of these various tracks, some are more complex by specifying further inputs or further restric- tions for a plan.
In the following (Section 5.1) we will give some insight into a number of the different tracks that are often part of the planning competition as well as to PDDL (Section 5.2). In the following chapters we will provide algorithms for optimally solving problems from two of the tracks, namely classical planning (Chapter 6) and net-benefit planning (Chapter 7).
44 CHAPTER 5. INTRODUCTION TO ACTION PLANNING