1
play

1 Conceptual Example (III): Less formally (II) Or-tree-based Search - PDF document

2.4.3 Or-tree-based Search Formal Definitions (I) Or-tree-based Search Model A = ( S , T ): Basic Idea: n Prob set of problem descriptions If every solution is okay, represent the different n Altern Prob +


  1. 2.4.3 Or-tree-based Search � Formal Definitions (I) � Or-tree-based Search Model A ∨ = ( S ∨ , T ∨ ): � Basic Idea: � n Prob set of problem descriptions � If every solution is okay, represent the different n Altern ⊆ Prob + alternatives relation � possibilities that might lead to a solution in the search state (as successors of a node) � n S ∨ ⊆ Otree � � n T ∨ = {(s 1 ,s 2 ) |s 1 ,s 2 ∈ S ∨ and Erw ∨ (s 1 ,s 2 )} � Examples for solution possibilities: � where Otree is recursively defined by � n The different actions a robot can do � n (pr,sol) ∈ Otree for pr ∈ Prob , sol ∈ {yes,?,no} � n The different instantiations for a variable � n (pr,sol,b 1 ,…,b n ) ∈ Otree for pr ∈ Prob , sol ∈ {yes,?,no}, � � b 1 ,…,b n ∈ Otree � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger Formal Definitions (II) � Formal Definitions (III) � Or-tree-based Search Process P ∨ = ( A ∨ , Env , K ∨ ): � Erw ∨ is a relation on Otree defined by � � n Erw ∨ ((pr,?), (pr,yes)), if pr is solved � Not more specific than general definition � n Erw ∨ ((pr,?), (pr,no)), if pr is unsolvable � � n Erw ∨ ((pr,?), (pr,?,(pr 1 ,?),…,(pr n ,?))), � What is selected is the leaf to expand. � � � � � if Altern (pr,pr 1 ,…,pr n ) holds � n Erw ∨ ((pr,?,b 1 ,…,b n ),(pr,?,b 1 ',…,b n ')), if for an i: Erw ∨ (b i ,b i ') and b j = b j ' for i ≠ j � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger Formal Definitions (IV) � Less formally (I) � Or-tree-based Search Instance Ins ∨ = (s 0 , G ∨ ): � n The search model looks very similar to and-trees. � Only differences: � If the given problem to solve is pr, then we have � ● we can model that an alternative (subproblem) is n s 0 = (pr,?) � unsolvable (sol-entry no) � n G ∨ (s) = yes, if and only if � ● relation Altern instead of Div � ● s = (pr',yes) or � ● s = (pr',?,b 1 ,…,b n ), G ∨ (b i ) = yes for an i or � ● no backtracking � n The search control only has to compare the leafs of ● All leafs of s have either the sol-entry no or cannot be processed using Altern � the tree and the (theoretically) one transition that has the problem of the leaf as the problem to work on � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger 1

  2. Conceptual Example (III): � Less formally (II) � Or-tree-based Search � n If all alternative decisions to a leaf are guaranteed to P 0 ? � lead to a solution, we often do not want the alternatives showing up in the search state � . . . . . . . . . ( F � no temptation to change choices and do therefore � � redundant work). � 4 � 0 � 7 � P i ? � P j ? � P k ? � Then we combine this first decision with the next decision and have several transitions to a leaf (see unsolvable � example). � n The search is finished, if the problem in one leaf has sol-entry yes (or all alternatives have proven to fail). � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger Conceptual Example (III): � Conceptual Example (III): � Or-tree-based Search � Or-tree-based Search � P 0 ? � P 0 ? � . . . . . . . . . . . . . . . . . . 4 � 7 � 7 � P i ? � P j No � P k ? � P i ? � P j No � P k ? � 0 � 12 � P i1 ? � P i2 ? � solvable � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger Conceptual Example (III): � Designing or-tree-based search Or-tree-based Search � models � 1. Identify how you can describe a problem (resp. what P 0 ? � is needed to describe steps towards a solution) � F Prob � . . . . . . . . . 2. Define how to identify if a problem is solved � 3. Define how to identify if a problem is unsolvable � P i ? � P j No � P k ? � 4. Identify the basic methods how a problem can be brought nearer to a solution; collect all these ideas for each problem F Altern � P i1 Yes � P i2 ? � 5. Check if you really need all methods or if finding a solution can be already guaranteed without a F finished particular one F you might get rid of it � � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger 2

  3. Designing or-tree-based search Concrete Example: Constraint processes � Satisfaction (I) � 1. Identify how you can measure the problem in a leaf n A constraint satisfaction problem (CSP) consists of � regarding how far away from a solution it is � ● a set X = {X 1 ,…,X n } of variables over some finite, F Priority to problems that are solved or discrete-valued domains D = {D 1 ,…,D n } and � unsolvable � ● a set of constraints C = {C 1 ,…,C m }. Each constraint 2. Use 1. to select the leaf nearest a solution (if C i is a relation over the domains of a subset of the necessary, define tiebreakers) � variables, i.e. � � � C i = R i (X i,1 ,…,X i,k ) � 3. If you have alternative collections of alternatives (i.e. where the relation R i describes every value-tuple several transitions with the same first problem in in D i,1 × … × D i,k that fulfills the constraint. � Altern ), select one of them either using 1. for all successor problems or some other criteria (see and- The problem is to find a value for each X j (out of its � trees for ideas) � D j ) that fulfills all C i . � � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger Constraint Satisfaction (II): Examples � Constraint Satisfaction (III) � n X = {X 1 ,X 2 } � Tasks: � D 1 = {1,2,3} D 2 = {1,2,3,4} � n Describe CSPs as or-tree-based search model � n C = {C 1 ,C 2 ,C 3 } � n Describe formally a search control for your model C 1 : X 1 + X 2 ≤ 4 C 2 : X 1 + X 2 ≥ 3 C 3 : X 1 ≥ 2 � based on the idea of identifying the variable occuring in the most constraints and selecting it and its domain for branching � n X = {X 1 ,X 2 ,X 3 } � (combined with a depth-criteria and a tiebreaker, if D 1 = D 2 = D 3 = {true, false} � necessary) � n C = {C 1 ,C 2 ,C 3 } � n Solve the problem instances from the last slide � C 1 : X 1 ∨ ¬ X 2 ∨ X 3 C 2 : ¬ X 1 ∨ X 3 C 3 : ¬ X 2 ∨ ¬ X 3 � � CPSC 433 - Artificial Intelligence Jörg Denzinger CPSC 433 - Artificial Intelligence Jörg Denzinger Remarks � n And-tree-based and or-tree-based search have a lot in common. The difference from the search problem point of view can be best described as � � or-tree: � one solution � � and-tree: � all solutions � n Consequently, the criteria used by search controls differ, due to the different goals. � n A lot of problems have transformations into a CSP. Therefore there are a lot of papers on solving CSPs and good controls for it. � CPSC 433 - Artificial Intelligence Jörg Denzinger 3

Recommend


More recommend