Optimal Satisfiability and Conflict-directed A* Image credit: NASA. Assignment

Size: px
Start display at page:

Download "Optimal Satisfiability and Conflict-directed A* Image credit: NASA. Assignment"

Transcription

1 /27/ Optimal Satisfiability and onflict-directed * Brian. Williams 6.4 / 6.43 October 27 th, 2 Image credit: NS. Brian. Williams, copyright 2 ssignment Remember: Problem Set #6 Propositional Logic, due Today. 6:43 Project Part : Sat-based ctivity Planner, due Wednesday, November 3 rd. Problem Set #7 iagnosis, onflict-directed * and RRTs, due Wednesday, November th. Reading Today: Brian. Williams, and Robert Ragno, "onflict-directed * and its Role in Model-based Embedded Systems," Special Issue on Theory and pplications of Satisfiability Testing, Journal of iscrete pplied Math, January 23. /2/9 copyright Brian Williams, 2-2

2 /27/ Model-based iagnosis as onflict-directed Best First Search When you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sherlock Holmes. The Sign of the Four.. enerate most likely Hypothesis. 2. Test Hypothesis. 3. If Inconsistent, learn reason for inconsistency (a onflict). 4. Use conflicts to leap over similarly infeasible options to next best hypothesis. ompare Most Likely Hypothesis to Observations Helium tank Oxidizer tank Flow = zero Pressure = nominal Fuel tank Pressure 2 = nominal cceleration = zero Main Engines It is most likely that all components are okay. 2

3 /27/ Isolate onflicting Information Helium tank Oxidizer tank Fuel tank Flow = zero Main Engines The red component modes conflict with the model and observations. Leap to the Next Most Likely Hypothesis that Resolves the onflict Helium tank Oxidizer tank Fuel tank Flow = zero Main Engines The next hypothesis must remove the conflict. 3

4 /27/ New Hypothesis Exposes dditional onflicts Helium tank Oxidizer tank Pressure = nominal Fuel tank Pressure 2 = nominal cceleration = zero Main Engines nother conflict, try removing both. Final Hypothesis Resolves all onflicts Helium tank Oxidizer tank Pressure = nominal Flow = zero Fuel tank Pressure 2 = nominal Flow 2 = positive cceleration = zero Main Engines Implementation: onflict-directed * search. 4

5 /27/ Outline Model-based iagnosis Optimal SPs Informed Search onflict-directed * onstraint Satisfaction Problem SP = <X, X,> variables X with domain X. onstraint (X): X {True, False}. Problem: Find X in X s.t. (X) is True. V R,,B ifferent-color constraint V 2 R, V 3 /27/ 5

6 /27/ OSP= <Y, g, SP> Optimal SP ecision variables Y with domain Y. Utility function g(y): Y R. SP over variables <X;Y>. Find leading arg max g(y) Y y s.t. X X s.t. (X,Y) is True. g: multi-attribute utility with preferential independence, value constraint, SP: propositional state logic, simple temporal problem, mixed logic-linear program, /27/ SPs re Frequently Encoded in Propositional State Logic (mode(e) = ok implies (thrust(e) = on if and only if flow(v) = on and flow(v2) = on)) and (mode(e) = ok or mode(e) = unknown) and not (mode(e) = ok and mode(e) = unknown) V V2 E /27/ 2 6

7 /27/ Multi ttribute Utility Functions g(y) = (g (y ), g 2 (y 2 ),...) where (u, u 2 u n ) = (u,(u 2 u n )) (u ) = (u, I ) Example: iagnosis g i (y i =mode ij ) = P(y i = mode ij ) (u,u 2 ) = u x u 2 I = /27/ 3 Mutual Preferential Independence (MPI) ssignment δ is preferred over δ2 if g(δ ) < g(δ 2 ). For any set of decision variables W Y, our preference between two assignments to W is independent of the assignment to the remaining variables W Y. /27/ 4 7

8 /27/ MPI Example: iagnosis If = is more likely than = U, then { =, 2 =, 3 = U, X =, X2 = } is preferred to { = U, 2 =, 3 = U, X =, X2 = }. /27/ 5 Outline Model-based iagnosis Optimal SPs Informed Search * Branch and Bound onflict-directed * 8

9 /27/ Informed Search Extend search tree nodes to include path length g S 2 B S B 5 g = 8 Problem: iven graph <V,E> with weight function w: E R, and vertices S, in V, Find a path S p with the shortest path length δ(s,) where w(p) = Σ w(v i-,v i ). δ(u,v) = min {w(p) : u p v } Brian Williams, Fall 5 7 Best-first Search with Uniform ost spreads evenly from the start. x x B goal start Brian Williams, Fall 5 8 9

10 /27/ x x Best-first Search with Uniform ost spreads evenly from the start. reedy goes for the goal, but forgets its past. start * finds an optimal solution if h never over estimates. Then h is called admissible B goal * biases uniform cost towards the goal by using h. f = g + h g = distance from start. h = estimated distance to goal. Brian Williams, Fall 5 9 * Best-first Search with Q ordered by admissible f = g + h. 5 4 S B 8 2 S B 5 Heuristic Value h in Red Edge cost in reen Brian Williams, Fall 5 2

11 /27/ * Search: State of Search Problem: State Space Search Problem. Θ Initial State. Expand(node) hildren of Search Node = adjacent states. oal-test(node) True if search node at a goal-state. Nodes Search Nodes to be expanded. Expanded Search Nodes already expanded. Initialize Search starts at Θ, with no expanded nodes. g(state) h(state) ost to state dmissible Heuristic - Optimistic cost to go. Search Node: Node in the search tree. State State the search is at. Parent Parent in search tree. Nodes[Problem]: Enqueue(node, f ) dds node to those to be expanded. Remove-Best(f) Removes best cost queued node according to f. /27/ 2 * Search Function *(problem, h) returns the best solution or failure. Problem pre-initialized. f(x) g[problem](x) + h(x) loop do Expand Best-first node Remove-Best(Nodes[problem], f) new-nodes Expand(node, problem) for each new-node in new-nodes then Nodes[problem] Enqueue(Nodes[problem], new-node, f ) end /27/ 22

12 /27/ * Search Function *(problem, h) returns the best solution or failure. Problem pre-initialized. f(x) g[problem](x) + h(x) loop do if Nodes[problem] is empty then return failure node Remove-Best(Nodes[problem], f) Terminate when... new-nodes Expand(node, problem) for each new-node in new-nodes then Nodes[problem] Enqueue(Nodes[problem], new-node, f ) if oal-test[problem] applied to State(node) succeeds then return node end /27/ 23 Expand Vertices More Than Once path length S 2 4 S 2 4 edge cost Suppose we expanded only the first path that visits each vertex X? The shortest path from S to is ( S). is reached first using path ( S). Brian Williams, Fall

13 /27/ Expand Vertices More Than Once 3 path length S 2 5 Suppose we expanded only the first path that visits each vertex X? S 2 4 The shortest path from S to is ( S). edge cost is reached first using path ( S). This prevents path ( S) from being expanded. Brian Williams, Fall 5 25 Expand Vertices More Than Once 3 path length S 2 5 Suppose we expanded only the first path that visits each vertex X? S 2 4 The shortest path from S to is ( S). edge cost is reached first using path ( S). This prevents path ( S) from being expanded. Brian Williams, Fall

14 /27/ Expand Vertices More Than Once 3 path length S 2 5 Suppose we expanded only the first path that visits each vertex X? Eliminate the Visited List. Return solution when taken off queue. S Brian Williams, Fall The shortest path from S to is ( S). edge cost is reached first using path ( S). This prevents path ( S) from being expanded. The suboptimal path ( S) is returned. s Shortest Paths ontain Only Shortest Paths u x y Subpaths of shortest paths are shortest paths. s p v = <s, x, u, v> Shortest, then. s p u = <s, x, u> Shortest s p x = <s, x> Shortest x p v = <x, u, v> Shortest x p v = <x, u> Shortest u p v = <u, v> Shortest 7 v Brian Williams, Fall

15 /27/ Shortest Paths can be rown From Shortest Paths s 5 u v The length of shortest path s p u v is δ(s,v) = δ(s,u) + w(u,v) such that <u,v> E δ(s,v) δ(s,u) + w(u,v). x y ynamic Programming Principle: " iven the shortest path to U, don t extend other paths to U; delete them (expanded list). " When * dequeues the first partial path with head node U, this path is guaranteed to be the shortest path from S to U. Brian Williams, Fall 5 29 * Search Function *(problem, h) returns the best solution or failure. Problem pre-initialized. f(x) g[problem](x) + h(x) loop do if Nodes[problem] is empty then return failure node Remove-Best(Nodes[problem], f) state State(node) ynamic Programming Principle... remove any n from Nodes[problem] such that State(n) = state Expanded[problem] Expanded[problem] {state} new-nodes Expand(node, problem) for each new-node in new-nodes unless State(new-node) is in Expanded[problem] then Nodes[problem] Enqueue(Nodes[problem], new-node, f ) if oal-test[problem] applied to State(node) succeeds then return node end /27/ 3 5

16 /27/ Outline Model-based iagnosis Optimal SPs Informed Search * Branch and Bound onflict-directed * Branch and Bound Maintain the best solution found thus far (incumbent). Prune all subtrees worse than the incumbent S B 8 2 S B 5 Incumbent: cost U =, path P = (), 8 (S ) Heuristic Value h in Red Edge cost in reen Brian Williams, Fall

17 /27/ Branch and Bound Maintain the best solution found thus far (incumbent). Prune all subtrees worse than the incumbent. ny search order allowed (FS, Reverse-FS, BFS, Hill w BT ) Incumbent: cost U =, path P = (), S, (S B ) B 8 8 (S ) 2 S 2 Brian Williams, Fall B 5 Heuristic Values of g in Red Edge cost in reen Simple Optimal Search Using Branch and Bound Let <V,E> be a raph Let Q be a list of simple partial paths in <V,E> Let S be the start vertex in <V,E> and Let be a oal vertex in <V,E>. Let f = g + h be an admissible heuristic function. U and P are the cost and path of the best solution thus far (Incumbent).. Initialize Q with partial path (S); Incumbent U =, P = (); 2. If Q is empty, return Incumbent U and P, Else, remove a partial path N from Q; 3. If f(n) >= U, o to Step If head(n) =, then U = f(n) and P = N (a better path to the goal) 5. (Else) Find all children of head(n) (its neighbors in <V,E>) and create one-step extensions from N to each child. 6. dd extended paths to Q. 7. o to Step 2. Brian Williams, Fall

18 /27/ Outline Model-based iagnosis Optimal SPs Informed Search onflict-directed * * Increasing ost Infeasible Feasible /27/ 36 8

19 /27/ onflict-directed * Increasing ost Infeasible Feasible /27/ 37 onflict-directed * Increasing ost onflict Infeasible Feasible /27/ 38 9

20 /27/ onflict-directed * Increasing ost onflict Infeasible Feasible /27/ 39 onflict-directed * Increasing ost onflict Infeasible onflict 2 Feasible /27/ 4 2

21 /27/ onflict-directed * Increasing ost onflict Infeasible onflict 2 Feasible /27/ 4 onflict-directed * Increasing ost onflict Infeasible onflict 2 Feasible onflict 3 /27/ 42 2

22 /27/ onflict-directed * Increasing ost onflict Infeasible onflict 2 Feasible onflict 3 /27/ 43 Solving Optimal SPs Through enerate and Test Leading andidates Based on ost enerate andidate onflict-directed * one Yes Keep (Optional) Update ost Below Threshold? Yes No Test andidate onsistent? onstraint Solver No Extract onflict /27/ 44 22

23 /27/ onflict-directed * Function onflict-directed-*(osp) returns the leading minimal cost solutions. onflicts[osp] {} OSP Initialize-Best-Kernels(OSP) Solutions[OSP] {} loop do decision-state Next-Best-State-Resolving-onflicts(OSP) onflict-guided Expansion new-conflicts Extract-onflicts(SP[OSP], decision-state) onflicts[osp] Eliminate-Redundant-onflicts(onflicts[OSP] new-conflicts) end /27/ 45 onflict-directed * Function onflict-directed-*(osp) returns the leading minimal cost solutions. onflicts[osp] {} OSP Initialize-Best-Kernels(OSP) Solutions[OSP] {} loop do decision-state Next-Best-State-Resolving-onflicts(OSP) if no decision-state returned or Terminate?(OSP) then return Solutions[OSP] if onsistent?(sp[osp ], decision-state) then add decision-state to Solutions[OSP] new-conflicts Extract-onflicts(SP[OSP], decision-state) onflicts[osp] Eliminate-Redundant-onflicts(onflicts[OSP] new-conflicts) end /27/ 46 23

24 /27/ Increasing ost onflict-directed * Each feasible subregion described by a kernel assignment. pproach: Use conflicts to search for kernel assignment containing the best cost candidate. onflict Infeasible onflict 2 onflict 3 Kernel 3 Kernel 2 Feasible Kernel Recall: Mapping onflicts to Kernels B E 2 3 X Y Z X X2 onflict i : set of decision variable assignments that are inconsistent with constraints Φ. F i ^ Φ is inconsistent # # Φ entails i onstituent Kernel: n assignment a that resolves a conflict i. B E?? 3 X Y Z X? F a entails i Kernel: minimal set of decision variable assignments that resolves all known conflicts. entails i for all i in /27/ 48 24

25 /27/ Extracting a kernel s best state Select best utility value for unassigned variables (Why?). {X=U} =? 2=U 3=? X=? X2=? = 2=U 3= X= X2= /27/ 49 Next Best State Resolving onflicts function Next-Best-State-Resolving-onflicts(OSP) best-kernel Next-Best-Kernel(OSP) if best-kernel = failure then return failure else return kernel-best-state[problem](best-kernel) end function Kernel-Best-State(kernel) unassigned all variables not assigned in kernel return kernel {Best-ssignment(v) v unassigned} End function Terminate?(OSP) return True iff Solutions[OSP] is non-empty lgorithm for only finding the first solution, multiple later. /27/ 5 25

26 /27/ Example: iagnosis X B F X 2 Y X2 E 3 Z ssume Independent Failures: P (mi) >> P U(mi) P single >> P double P U(2) > P U() > P U(3) > P U(X) > P U(X2) /27/ 5 B E First Iteration X F X 2 Y X2 3 Z onflicts / onstituent Kernels none Best Kernel: {} Best andidate:? /27/ 52 26

27 /27/ Extracting the kernel s best state Select best value for unassigned variables { } =? 2=? 3=? X=? X2=? = 2= 3= X= 2= /27/ 53 B E First Iteration X F X 2 Y X2 3 Z onflicts / onstituent Kernels none Best Kernel: {} Best andidate: = 2= 3= X= X2=? /27/ 54 27

28 /27/ Test: = 2= 3= X= X2= B 2 X Y X X2 F E 3 Z /27/ 55 Test: = 2= 3= X= X2= B 2 X Y X X2 Symptom F E 3 Z Extract onflict and onstituent Kernels: [= 2= X=] =U 2=U X=U /27/ 56 28

29 /27/ Second Iteration P (mi) >> P U(mi) P single >> P double P U(2) > P U() > P U(3) > P U(X) > P U(X2) B E 2 3 X Y Z X X2 F onflicts onstituent Kernels =U 2=U X=U Best Kernel: 2=U (why?) Best andidate: = 2=U 3= X= X2= /27/ 57 Test: = 2=U 3= X= X2= B X Y X X2 F E 3 Z /27/ 58 29

30 /27/ Test: = 2=U 3= X= X2= B E 3 X Y Z X X2 F Extract onflict: [= 3= X= X2=] =U 3=U X=U X2=U /27/ 59 Third Iteration P (mi) >> P U(mi) P single >> P double P U(2) > P U() > P U(3) > P U(X) > P U(X2) B E 3 X Y Z X X2 F onflicts onstituent Kernels =U 2=U X=U =U 3=U X=U X2=U Best Kernel: =U Best andidate: =U 2= 3= X= X2= /27/ 6 3

31 /27/ Test: =U 2=U 3= X= X2= B 2 X Y X X2 F E 3 Z /27/ 6 Test: =U 2=U 3= X= X2= B E 2 3 X Y Z X X2 F onsistent! /27/ 62 3

32 /27/ Outline Model-based iagnosis Optimal SPs onflict-directed * enerating the Best Kernel Performance omparison enerating The Best Kernel of The Known onflicts onstituent Kernels X=U =U 2=U X=U, =U, 2=U X=U X2=U M=U 3=U X=U, X2=U, =U, 3=U X=U =U =U X2=U 2=U 3=U Insight: Kernels found by minimal set covering Minimal set covering is an instance of breadth first search. 32

33 /27/ Expanding a Node to Resolve a onflict onstituent kernels { } 2=U =U X=U 2=U =U X=U To Expand a Node: Select an unresolved onflict. Each child adds a constituent kernel of onflict. Prune any node that is Inconsistent, or superset of a known kernel. /27/ 65 enerating The Best Kernel of The Known onflicts onstituent Kernels X=U =U 2=U X=U, =U, 2=U X=U, X2=U, =U, 3=U =U Insight: Kernels found by minimal set covering Minimal set covering is an instance of breadth first search. To find the best kernel, expand tree in best first order. 33

34 /27/ dmissible h(α): ost of best state that extends partial assignment α f = g + h 2=U =? 3=? X=? X2=? P 2=u x P = x P 3= x P X= x P X2= Select best value of unassigned variables. /27/ 67 dmissible Heuristic h Let g = <,g i,y> describe a multi-attribute utility fn ssume the preference for one attribute x i is independent of another x k alled Mutual Preferential Independence: For all u, v Y If g i (u) g i (v) then for all w (g i (u),g k (w)) (g i (v),g k (w)) n dmissible h: iven a partial assignment, to X Y h selects the best value of each unassigned variable Z = X Y h(y) = ({g zi_max z i Z, max g zi (v ij ))}) v ij zi candidate always exists satisfying h(y). /27/ 68 34

35 /27/ Terminate when all conflicts resolved Function oal-test-kernel (node, problem) returns True IFF node is a complete decision state. if forall K in onstituent-kernels(onflicts[problem]), State[node] contains a kernel in K then return True else return False /27/ 69 Next Best Kernel of Known onflicts Function Next-Best-Kernel (OSP) returns the next best cost kernel of onflicts[osp]. f(x) [OSP] (g[osp](x), h[osp](x)) n instance loop do if Nodes[OSP] is empty then return failure of * node Remove-Best(Nodes[OSP], f) add State[node] to Visited[OSP] new-nodes Expand-onflict(node, OSP) for each new-node new-nodes unless n Nodes[OSP] such that State[new-node] = State[n] OR State[new-node] Visited[problem] then Nodes[OSP] Enqueue(Nodes[OSP], new-node, f ) if oal-test-kernel[osp] applied to State[node] succeeds Best-Kernels[OSP] dd-to-minimal-sets(best-kernels[osp], best-kernel) if best-kernel Best-Kernels[OSP] then return State[node] end /27/ 7 35

36 /27/ Outline Model-based iagnosis Optimal SPs onflict-directed * enerating the Best Kernel Performance omparison Problem Parameters om Size Performance: With and Without onflicts ec Vars lau -ses lau -se lngth onstraint-based * (no conflicts) Nodes Expande d Queue Size onflict-directed * Nodes Expand Queue Size onflicts used Mean -B Ratio Nodes Expanded Queue Size , % 5.6% ,36 3, % 3.5% ,27 6, %.% 6 3,79 3, %.% 3 6,43 5, % 5.8% , % 3.9% % 3.% % 5.4% %.% /27/ 72 36

37 /27/ Multiple Fault iagnosis of Systems with Novel Failures onsistency-based iagnosis: iven symptoms, find diagnoses that are consistent with symptoms. Suspending onstraints: Make no presumption about a component s faulty behavior. B E 2 3 X Y Z X X2 F Symptom Model-based iagnosis as onflict-directed Best First Search When you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sherlock Holmes. The Sign of the Four.. enerate most likely Hypothesis. 2. Test Hypothesis. 3. If Inconsistent, learn reason for inconsistency (a onflict). 4. Use conflicts to leap over similarly infeasible options to next best hypothesis. 37

38 /27/ Outline Model-based iagnosis Optimal SPs onflict-directed * enerating the Best Kernel Performance omparison ppendix: Intelligent Tree Expansion Extending to Multiple Solutions Review of * Expand Only Best hild & Sibling onstituent kernels { } 2=U =U X=U Order constituents by decreasing utility. 2=U =U > > X=U Traditionally all children expanded. Only need child containing best candidate. hild with best estimated cost f = g+h. /27/ 76 38

39 /27/ Expand Only Best hild & Sibling onstituent kernels { } 2=U =U X=U 2=U Order constituents by decreasing utility Traditionally all children expanded. Only need child with best candidate. hild with best estimated cost f = g+h. /27/ 77 When o We Expand The hild s Next Best Sibling? onstituent kernels { } 2=U =U X=U 2=U =U =U 3=U X=U X2=U =U When a best child has a subtree or leaf pruned, it may have lost its best candidate. One of the child s siblings might now contain the best candidate. Expand child s next best sibling: when expanding children to resolve another conflict. /27/ 78 39

40 /27/ Expand Node to Resolve onflict function Expand-onflict(node, OSP) return Expand-onflict-Best-hild(node, OSP) Expand-Next-Best-Sibling (node, OSP) function Expand-onflict-Best-hild(node, OSP) if for all K γ in onstituent-kernels(γ[osp]) State[node] contains a kernel K γ then return {} else return Expand-onstituent-Kernel(node,OSP) function Expand-onstituent-Kernel(node, OSP) K γ = smallest uncovered set onstituent-kernels(γ[osp]) {y i = v ij {y i = v ij } in K γ, y i = v ij is consistent with State[node]} Sort such that for all i from to -, Better-Kernel?([i],[i+], OSP) is True hild-ssignments[node] y i = v ij [], which is the best kernel in K γ consistent with State[node] return {Make-Node({y i = v ij }, node)} /27/ 79 Expand Node to Resolve onflict function Expand-Next-Best-Sibling(node, OSP) if Root?[node] then return {} else {y i = v ij } ssignment[node] {y k = v kl } next best assignment in consistent child-assignments[parent[node]] after {y i = v ij } if no next assignment {y k = v kl } or Parent[node] already has a child with {y k = v kl } then return {} else return {Make-Node({y k = v kl }, Parent[node])} /27/ 8 4

41 /27/ Outline Model-based iagnosis Optimal SPs onflict-directed * enerating the Best Kernel Performance omparison ppendix: Intelligent Tree Expansion Extending to Multiple Solutions Review of * Multiple Solutions: Systematically Exploring Kernels onstituent Kernels X=U =U 2=U X=U, =U, 2=U X2=U 3=U X=U, X2=U, =U, 3=U X=U =U =U X2=U 2=U 3=U 4

42 /27/ hild Expansion For Finding Multiple Solutions onflict (2= = X=) { } 2=U =U X=U X2= X2=U If Unresolved onflicts: Select unresolved conflict. Each child adds a constituent kernel. If ll onflicts Resolved: Select unassigned variable y i. Each child adds an assignment from i. /27/ 83 Intelligent Expansion Below a Kernel {} Select Unassigned Variable. 2= 2=U Order assignments by decreasing utility. Expand best child. =U 2= 3= X= 2=U 3=U X=U ontinue expanding best descendents. When leaf visited,, expand all next best ancestors. (why?) X2= X2=U /27/ 84 42

43 /27/ Putting It Together: Expansion Of ny Search Node { } onstituent kernels 2=U =U X=U 2=U =U =U 3=U X=U X2=U =U 2= 2=U When a best child loses any candidate, expand child s next best sibling: If child has unresolved conflicts, expand sibling when child expands its next conflict. If child resolves all conflicts, expand sibling when child expands a leaf. 3= X= X2= 3=U =U 2=U /27/ 85 onflict-directed * When you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sherlock Holmes. The Sign of the Four.. enerate most likely hypothesis. 2. Test hypothesis. 3. If inconsistent, learn reason for inconsistency (a onflict). 4. Use conflicts to leap over similarly infeasible options to next best hypothesis. /27/ 86 43

44 /27/ Outline Using conflicts in backtrack search ependency-directed backtracking onflict learning onflict-directed backjumping /2/9 copyright Brian Williams, 2-87 Using onflicts to uide Search: ependency-directed Search [Stallman & Sussman, 978] Input: Output: onstraint satisfaction problem. Satisfying assignment. Repeat while a next candidate assignment exists. enerate candidate assignment c. heck candidate c against conflicts. If c is a superset of a conflict, Then loop to the next candidate. heck consistency of c. If inconsistent, Then extract and record a conflict from c. Else return c as a solution. Like a raphplan memo, but generalizes an inconsistent solution. /2/9 copyright Brian Williams,

45 /27/ Procedure ependency_directed_backtracking (<X,,>) Input: constraint network R = <X,, > Output: solution, or notification that the network is inconsistent. i ; a i = {}; conflicts = {} Initialize variable counter, assignments, i i ; opy domain of first variable. while i n instantiate x i Select-B-Value(); dd to assignments a i. if x i is null No value was returned, i i - ; then backtrack else i i + ; else step forward and i i ; copy domain of next variable end while if i = return inconsistent else return a i, the instantiated values of {x i,, x n } end procedure /2/9 copyright Brian Williams, 2-89 Procedure Select-B-Value() Output: value in i consistent with a i-, or null, if none. while i is not empty select an arbitrary element a i and remove a from i ; a i a i-, {x i = a}; if for every c in conflicts, not (a i superset c) if consistent(a i-, x i = a ) return a; else conflicts conflicts minimal inconsistent subset of a i- ; end while return null end procedure /2/9 copyright Brian Williams,

46 MIT OpenourseWare / 6.43 Principles of utonomy and ecision Making Fall 2 For information about citing these materials or our Terms of Use, visit:

Optimal CSPs and Conflict-directed A*

Optimal CSPs and Conflict-directed A* Optimal CSPs and Conflict-directed A* courtesy of JPL Brian C. Williams 1.41J/.84J February nd, 005 //005 copyright Brian Williams, 00 1 Brian C. Williams, copyright 000 RMPL Mode Model-based Estimation:

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Artificial Intelligence Fall, 2010

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Artificial Intelligence Fall, 2010 MSSHUSETTS INSTITUTE OF TEHNOLOY epartment of Electrical Engineering and omputer Science 6.0 rtificial Intelligence Fall, 00 Search Me! Recitation, Thursday September Prof. ob erwick. ifference between

More information

Problem Solving as State Space Search. Assignments

Problem Solving as State Space Search. Assignments Problem olving as tate pace earch rian. Williams 6.0- ept th, 00 lides adapted from: 6.0 Tomas Lozano Perez, Russell and Norvig IM rian Williams, Fall 0 ssignments Remember: Problem et #: Java warm up

More information

12/7/2006. Outline. Generalized Conflict Learning for Hybrid Discrete/Linear Optimization. Forward Conflict-Directed Search

12/7/2006. Outline. Generalized Conflict Learning for Hybrid Discrete/Linear Optimization. Forward Conflict-Directed Search 2/7/26 Massachusetts Institute of Technology Generalized Conflict Learning for Hybrid Discrete/Linear Optimization Hui Li and Brian Williams Computer Science and Artificial Intelligence Laboratory Massachusetts

More information

UNIT 4 Branch and Bound

UNIT 4 Branch and Bound UNIT 4 Branch and Bound General method: Branch and Bound is another method to systematically search a solution space. Just like backtracking, we will use bounding functions to avoid generating subtrees

More information

6.01: Introduction to EECS I Lecture 13 May 3, 2011

6.01: Introduction to EECS I Lecture 13 May 3, 2011 6.0: Introduction to S I Lecture 3 May 3, 20 6.0: Introduction to S I Optimizing a Search Nano-Quiz Makeups Wednesday, May 4, 6-pm, 34-0. everyone can makeup/retake NQ everyone can makeup/retake two additional

More information

15.083J Integer Programming and Combinatorial Optimization Fall Enumerative Methods

15.083J Integer Programming and Combinatorial Optimization Fall Enumerative Methods 5.8J Integer Programming and Combinatorial Optimization Fall 9 A knapsack problem Enumerative Methods Let s focus on maximization integer linear programs with only binary variables For example: a knapsack

More information

Solving Constraint Programs using Conflicts and Backjumping

Solving Constraint Programs using Conflicts and Backjumping Solving onstraint Programs using onflicts and ackjumping Slides draw upon material from: Prof. Patrick Prosser, lasow University rian. Williams 16.410-13 September 29 th, 2010 6/30/11 1 Search Performance

More information

Search & Planning. Jeremy L Wyatt

Search & Planning. Jeremy L Wyatt Search & Planning Jeremy L Wyatt 1 Uninformed Search 2 The story so far B B So far we ve looked at learning and one type of inference (probabilistic) Now we will look at another ability intelligent agents

More information

Solving Hybrid Decision-Control Problems Through Conflict-Directed Branch & Bound

Solving Hybrid Decision-Control Problems Through Conflict-Directed Branch & Bound Solving Hybrid Decision-Control Problems Through Conflict-Directed Branch & Bound by Raj Krishnan Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of the

More information

Today More about Trees. Introduction to Computers and Programming. Spanning trees. Generic search algorithm. Prim s algorithm Kruskal s algorithm

Today More about Trees. Introduction to Computers and Programming. Spanning trees. Generic search algorithm. Prim s algorithm Kruskal s algorithm Introduction to omputers and Programming Prof. I. K. Lundqvist Lecture 8 pril Today More about Trees panning trees Prim s algorithm Kruskal s algorithm eneric search algorithm epth-first search example

More information

Chapter 24. Shortest path problems. Chapter 24. Shortest path problems. 24. Various shortest path problems. Chapter 24. Shortest path problems

Chapter 24. Shortest path problems. Chapter 24. Shortest path problems. 24. Various shortest path problems. Chapter 24. Shortest path problems Chapter 24. Shortest path problems We are given a directed graph G = (V,E) with each directed edge (u,v) E having a weight, also called a length, w(u,v) that may or may not be negative. A shortest path

More information

Searching in Graphs (cut points)

Searching in Graphs (cut points) 0 November, 0 Breath First Search (BFS) in Graphs In BFS algorithm we visit the verices level by level. The BFS algorithm creates a tree with root s. Once a node v is discovered by BFS algorithm we put

More information

Heuristic (Informed) Search

Heuristic (Informed) Search Heuristic (Informed) Search (Where we try to choose smartly) R&N: Chap., Sect..1 3 1 Search Algorithm #2 SEARCH#2 1. INSERT(initial-node,Open-List) 2. Repeat: a. If empty(open-list) then return failure

More information

The wolf sheep cabbage problem. Search. Terminology. Solution. Finite state acceptor / state space

The wolf sheep cabbage problem. Search. Terminology. Solution. Finite state acceptor / state space Search The wolf sheep cabbage problem What is search? Terminology: search space, strategy Modelling Uninformed search (not intelligent ) Breadth first Depth first, some variations omplexity space and time

More information

Constraint satisfaction search. Combinatorial optimization search.

Constraint satisfaction search. Combinatorial optimization search. S 1571 Introduction to I Lecture 8 onstraint satisfaction search. ombinatorial optimization search. Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square onstraint satisfaction problem (SP) Objective:

More information

Efficient memory-bounded search methods

Efficient memory-bounded search methods Efficient memory-bounded search methods Mikhail Simin Arjang Fahim CSCE 580: Artificial Intelligence Fall 2011 Dr. Marco Voltorta Outline of The Presentation Motivations and Objectives Background - BFS

More information

12/5/17. trees. CS 220: Discrete Structures and their Applications. Trees Chapter 11 in zybooks. rooted trees. rooted trees

12/5/17. trees. CS 220: Discrete Structures and their Applications. Trees Chapter 11 in zybooks. rooted trees. rooted trees trees CS 220: Discrete Structures and their Applications A tree is an undirected graph that is connected and has no cycles. Trees Chapter 11 in zybooks rooted trees Rooted trees. Given a tree T, choose

More information

Best-First Search! Minimizing Space or Time!! RBFS! Save space, take more time!

Best-First Search! Minimizing Space or Time!! RBFS! Save space, take more time! Best-First Search! Minimizing Space or Time!! RBFS! Save space, take more time! RBFS-1 RBFS general properties! Similar to A* algorithm developed for heuristic search! RBFS-2 RBFS general properties 2!

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

More information

CS 161 Lecture 11 BFS, Dijkstra s algorithm Jessica Su (some parts copied from CLRS) 1 Review

CS 161 Lecture 11 BFS, Dijkstra s algorithm Jessica Su (some parts copied from CLRS) 1 Review 1 Review 1 Something I did not emphasize enough last time is that during the execution of depth-firstsearch, we construct depth-first-search trees. One graph may have multiple depth-firstsearch trees,

More information

Scribe: Virginia Williams, Sam Kim (2016), Mary Wootters (2017) Date: May 22, 2017

Scribe: Virginia Williams, Sam Kim (2016), Mary Wootters (2017) Date: May 22, 2017 CS6 Lecture 4 Greedy Algorithms Scribe: Virginia Williams, Sam Kim (26), Mary Wootters (27) Date: May 22, 27 Greedy Algorithms Suppose we want to solve a problem, and we re able to come up with some recursive

More information

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems 1. Search trees for the state-space graph given below: We only show the search trees corresponding

More information

Distributed Algorithms 6.046J, Spring, 2015 Part 2. Nancy Lynch

Distributed Algorithms 6.046J, Spring, 2015 Part 2. Nancy Lynch Distributed Algorithms 6.046J, Spring, 2015 Part 2 Nancy Lynch 1 This Week Synchronous distributed algorithms: Leader Election Maximal Independent Set Breadth-First Spanning Trees Shortest Paths Trees

More information

mywbut.com Uninformed Search

mywbut.com Uninformed Search Uninformed Search 1 2.4 Search Searching through a state space involves the following: set of states Operators and their costs Start state test to check for goal state We will now outline the basic search

More information

COMP 8620 Advanced Topics in AI

COMP 8620 Advanced Topics in AI OMP 8620 dvanced Topics in Lecturers: Philip Kilby & Jinbo uang 25/07/2008 1 Part 1: Search Lecturer: r Philip Kilby Philip.Kilby@nicta.com.au Weeks 1-71 (Week 7 is assignment seminars) Part 2: Probabilistic

More information

Algorithms for Data Structures: Uninformed Search. Phillip Smith 19/11/2013

Algorithms for Data Structures: Uninformed Search. Phillip Smith 19/11/2013 lgorithms for Data Structures: Uninformed Search Phillip Smith 19/11/2013 Representations for Reasoning We know (at least) two models of a world: model of the static states of the world model of the effects

More information

Trees. Arash Rafiey. 20 October, 2015

Trees. Arash Rafiey. 20 October, 2015 20 October, 2015 Definition Let G = (V, E) be a loop-free undirected graph. G is called a tree if G is connected and contains no cycle. Definition Let G = (V, E) be a loop-free undirected graph. G is called

More information

Uninformed Search. Remember: Implementation of search algorithms

Uninformed Search. Remember: Implementation of search algorithms Uninformed Search Lecture 4 Introduction to Artificial Intelligence Hadi Moradi moradi@usc.edu Remember: Implementation of search algorithms Function General-Search(problem, Queuing-Fn) returns a solution,

More information

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable //7 Review: Constraint Satisfaction Problems Constraint Satisfaction Problems II AIMA: Chapter 6 A CSP consists of: Finite set of X, X,, X n Nonempty domain of possible values for each variable D, D, D

More information

Luke. Leia 2. Han Leia

Luke. Leia 2. Han Leia Reading SE : ata Structures raph lgorithms raph Search hapter.,.,. Lecture raph T raphs are a formalism for representing relationships between objects a graph is represented as = (V, E) Han V is a set

More information

Module 5 Graph Algorithms

Module 5 Graph Algorithms Module 5 Graph lgorithms Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 97 E-mail: natarajan.meghanathan@jsums.edu 5. Graph Traversal lgorithms Depth First

More information

CS 730/730W/830: Intro AI

CS 730/730W/830: Intro AI CS 730/730W/830: Intro AI 1 handout: slides asst 1 milestone was due Wheeler Ruml (UNH) Lecture 4, CS 730 1 / 19 EOLQs Wheeler Ruml (UNH) Lecture 4, CS 730 2 / 19 Comparison Heuristics Search Algorithms

More information

5.4 Shortest Paths. Jacobs University Visualization and Computer Graphics Lab. CH : Algorithms and Data Structures 456

5.4 Shortest Paths. Jacobs University Visualization and Computer Graphics Lab. CH : Algorithms and Data Structures 456 5.4 Shortest Paths CH08-320201: Algorithms and Data Structures 456 Definitions: Path Consider a directed graph G=(V,E), where each edge e є E is assigned a non-negative weight w: E -> R +. A path is a

More information

Introduction HEURISTIC SEARCH. Introduction. Heuristics. Two main concerns of AI researchers. Two problems with the search process

Introduction HEURISTIC SEARCH. Introduction. Heuristics. Two main concerns of AI researchers. Two problems with the search process HEURISTIC SERCH George F Luger RTIFICIL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving Introduction Two main concerns of I researchers 1) Representation of the knowledge

More information

CS 231: Algorithmic Problem Solving

CS 231: Algorithmic Problem Solving CS 231: Algorithmic Problem Solving Naomi Nishimura Module 7 Date of this version: January 28, 2019 WARNING: Drafts of slides are made available prior to lecture for your convenience. After lecture, slides

More information

Last week: Breadth-First Search

Last week: Breadth-First Search 1 Last week: Breadth-First Search Set L i = [] for i=1,,n L 0 = {w}, where w is the start node For i = 0,, n-1: For u in L i : For each v which is a neighbor of u: If v isn t yet visited: - mark v as visited,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition,

More information

CS 380: ARTIFICIAL INTELLIGENCE

CS 380: ARTIFICIAL INTELLIGENCE S 380: RTIFIIL INTELLIGENE PROLEM SOLVING: INFORMED SERH, * 10/9/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/s380/intro.html larification Repeated-state checking:

More information

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

Constraint (Logic) Programming

Constraint (Logic) Programming Constraint (Logic) Programming Roman Barták Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic bartak@ktiml.mff.cuni.cz Sudoku Combinatorial puzzle, whose goal is to enter

More information

Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of

Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of Question 1: 25% of students lost more than 2 points Question 2: 50% of students lost 2-4 points; 50% got it entirely correct Question 3: 95% of students got this problem entirely correct Question 4: Only

More information

Solutions to relevant spring 2000 exam problems

Solutions to relevant spring 2000 exam problems Problem 2, exam Here s Prim s algorithm, modified slightly to use C syntax. MSTPrim (G, w, r): Q = V[G]; for (each u Q) { key[u] = ; key[r] = 0; π[r] = 0; while (Q not empty) { u = ExtractMin (Q); for

More information

Backtracking and Branch-and-Bound

Backtracking and Branch-and-Bound Backtracking and Branch-and-Bound Usually for problems with high complexity Exhaustive Search is too time consuming Cut down on some search using special methods Idea: Construct partial solutions and extend

More information

Shortest Path Routing Communications networks as graphs Graph terminology Breadth-first search in a graph Properties of breadth-first search

Shortest Path Routing Communications networks as graphs Graph terminology Breadth-first search in a graph Properties of breadth-first search Shortest Path Routing Communications networks as graphs Graph terminology Breadth-first search in a graph Properties of breadth-first search 6.082 Fall 2006 Shortest Path Routing, Slide 1 Routing in an

More information

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology Trees : Part Section. () (2) Preorder, Postorder and Levelorder Traversals Definition: A tree is a connected graph with no cycles Consequences: Between any two vertices, there is exactly one unique path

More information

4 Search Problem formulation (23 points)

4 Search Problem formulation (23 points) 4 Search Problem formulation (23 points) Consider a Mars rover that has to drive around the surface, collect rock samples, and return to the lander. We want to construct a plan for its exploration. It

More information

6.034 Quiz 1, Spring 2004 Solutions

6.034 Quiz 1, Spring 2004 Solutions 6.034 Quiz 1, Spring 2004 Solutions Open Book, Open Notes 1 Tree Search (12 points) Consider the tree shown below. The numbers on the arcs are the arc lengths. Assume that the nodes are expanded in alphabetical

More information

Binary Trees

Binary Trees Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what

More information

Search: Advanced Topics and Conclusion

Search: Advanced Topics and Conclusion Search: Advanced Topics and Conclusion CPSC 322 Lecture 8 January 24, 2007 Textbook 2.6 Search: Advanced Topics and Conclusion CPSC 322 Lecture 8, Slide 1 Lecture Overview 1 Recap 2 Branch & Bound 3 A

More information

CSC Intro to Intelligent Robotics, Spring Graphs

CSC Intro to Intelligent Robotics, Spring Graphs CSC 445 - Intro to Intelligent Robotics, Spring 2018 Graphs Graphs Definition: A graph G = (V, E) consists of a nonempty set V of vertices (or nodes) and a set E of edges. Each edge has either one or two

More information

Activity Planning and Execution I: Operator-based Planning and Plan Graphs. Assignments

Activity Planning and Execution I: Operator-based Planning and Plan Graphs. Assignments Activity Planning and Execution I: Operator-based Planning and Plan Graphs Slides draw upon material from: Prof. Maria Fox, Univ Strathclyde Brian C. Williams 16.410-13 October 4 th, 2010 Assignments Remember:

More information

COMP251: Single source shortest paths

COMP251: Single source shortest paths COMP51: Single source shortest paths Jérôme Waldispühl School of Computer Science McGill University Based on (Cormen et al., 00) Problem What is the shortest road to go from one city to another? Eample:

More information

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

An undirected graph is a tree if and only of there is a unique simple path between any 2 of its vertices.

An undirected graph is a tree if and only of there is a unique simple path between any 2 of its vertices. Trees Trees form the most widely used subclasses of graphs. In CS, we make extensive use of trees. Trees are useful in organizing and relating data in databases, file systems and other applications. Formal

More information

Spanning Trees. CSE373: Data Structures & Algorithms Lecture 17: Minimum Spanning Trees. Motivation. Observations. Spanning tree via DFS

Spanning Trees. CSE373: Data Structures & Algorithms Lecture 17: Minimum Spanning Trees. Motivation. Observations. Spanning tree via DFS Spanning Trees S: ata Structures & lgorithms Lecture : Minimum Spanning Trees simple problem: iven a connected undirected graph =(V,), find a minimal subset of edges such that is still connected graph

More information

Downloded from: CSITauthority.blogspot.com

Downloded from: CSITauthority.blogspot.com [Unit : Searching] (CSC 355) Central Department of Computer Science & Information Technology Tribhuvan University 1 Searching search problem Figure below contains a representation of a map. The nodes represent

More information

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2013

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2013 CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2013 YOUR NAME AND ID NUMBER: YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT: The exam will begin on the next page. Please, do not turn the page until told.

More information

2-3 Tree. Outline B-TREE. catch(...){ printf( "Assignment::SolveProblem() AAAA!"); } ADD SLIDES ON DISJOINT SETS

2-3 Tree. Outline B-TREE. catch(...){ printf( Assignment::SolveProblem() AAAA!); } ADD SLIDES ON DISJOINT SETS Outline catch(...){ printf( "Assignment::SolveProblem() AAAA!"); } Balanced Search Trees 2-3 Trees 2-3-4 Trees Slide 4 Why care about advanced implementations? Same entries, different insertion sequence:

More information

Graph. Vertex. edge. Directed Graph. Undirected Graph

Graph. Vertex. edge. Directed Graph. Undirected Graph Module : Graphs Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS E-mail: natarajan.meghanathan@jsums.edu Graph Graph is a data structure that is a collection

More information

Search : Lecture 2. September 9, 2003

Search : Lecture 2. September 9, 2003 Search 6.825: Lecture 2 September 9, 2003 1 Problem-Solving Problems When your environment can be effectively modeled as having discrete states and actions deterministic, known world dynamics known initial

More information

CS 380: ARTIFICIAL INTELLIGENCE PROBLEM SOLVING: INFORMED SEARCH, A* Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE PROBLEM SOLVING: INFORMED SEARCH, A* Santiago Ontañón S 380: RTIFIIL INTELLIGENE PROLEM SOLVING: INFORMED SERH, * Santiago Ontañón so367@drexel.edu Note on Graph Search Repeated-state checking: When the search state is a graph strategies like DFS can get

More information

What is Search? Intro to Search. Search problems. Finding goals in trees. Why is goal search not trivial? Blind Search Methods

What is Search? Intro to Search. Search problems. Finding goals in trees. Why is goal search not trivial? Blind Search Methods What is Search? lind Search Methods Search as an Tool S, DS, DS, US, ids Search is one of the most powerful approaches to problem solving in Search is a universal problem solving mechanism that Systematically

More information

Agenda. Graph Representation DFS BFS Dijkstra A* Search Bellman-Ford Floyd-Warshall Iterative? Non-iterative? MST Flow Edmond-Karp

Agenda. Graph Representation DFS BFS Dijkstra A* Search Bellman-Ford Floyd-Warshall Iterative? Non-iterative? MST Flow Edmond-Karp Graph Charles Lin genda Graph Representation FS BFS ijkstra * Search Bellman-Ford Floyd-Warshall Iterative? Non-iterative? MST Flow Edmond-Karp Graph Representation djacency Matrix bool way[100][100];

More information

W4231: Analysis of Algorithms

W4231: Analysis of Algorithms W4231: Analysis of Algorithms 10/21/1999 Definitions for graphs Breadth First Search and Depth First Search Topological Sort. Graphs AgraphG is given by a set of vertices V and a set of edges E. Normally

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Robert Platt Northeastern University Some images and slides are used from: 1. AIMA What is a CSP? The space of all search problems states and actions are atomic goals are

More information

Material. Thought Question. Outline For Today. Example: Map-Coloring EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Material. Thought Question. Outline For Today. Example: Map-Coloring EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 6, 4/20/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Material Read all of chapter

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

Parallel Breadth First Search

Parallel Breadth First Search CSE341T/CSE549T 11/03/2014 Lecture 18 Parallel Breadth First Search Today, we will look at a basic graph algorithm, breadth first search (BFS). BFS can be applied to solve a variety of problems including:

More information

Graph Algorithms. Definition

Graph Algorithms. Definition Graph Algorithms Many problems in CS can be modeled as graph problems. Algorithms for solving graph problems are fundamental to the field of algorithm design. Definition A graph G = (V, E) consists of

More information

Lecture 6: Constraint Satisfaction Problems (CSPs)

Lecture 6: Constraint Satisfaction Problems (CSPs) Lecture 6: Constraint Satisfaction Problems (CSPs) CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA February 28, 2018 Amarda Shehu (580)

More information

(Refer Slide Time: 05:25)

(Refer Slide Time: 05:25) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering IIT Delhi Lecture 30 Applications of DFS in Directed Graphs Today we are going to look at more applications

More information

Algorithm Design Techniques (III)

Algorithm Design Techniques (III) Algorithm Design Techniques (III) Minimax. Alpha-Beta Pruning. Search Tree Strategies (backtracking revisited, branch and bound). Local Search. DSA - lecture 10 - T.U.Cluj-Napoca - M. Joldos 1 Tic-Tac-Toe

More information

Informed Search. CMU Snake Robot. Administrative. Uninformed search strategies. Assignment 1 was due before class how d it go?

Informed Search. CMU Snake Robot. Administrative. Uninformed search strategies. Assignment 1 was due before class how d it go? Informed Search S151 David Kauchak Fall 2010 MU Snake Robot http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/web/people/biorobotics/projects/ modsnake/index.html Some material borrowed from : Sara Owsley Sood

More information

CS-171, Intro to A.I. Final Exam Winter Quarter, 2012

CS-171, Intro to A.I. Final Exam Winter Quarter, 2012 S-171, Intro to.i. Final Exam Winter Quarter, 2012 NME N EMIL RESS: YOUR I: I TO RIGHT: ROW: NO. FROM RIGHT: The exam will begin on the next page. Please, do not turn the page until told. When you are

More information

CS1800: Graph Algorithms (2nd Part) Professor Kevin Gold

CS1800: Graph Algorithms (2nd Part) Professor Kevin Gold S1800: raph lgorithms (2nd Part) Professor Kevin old Summary So ar readth-irst Search (S) and epth-irst Search (S) are two efficient algorithms for finding paths on graphs. S also finds the shortest path.

More information

Robotic Motion Planning: A* and D* Search

Robotic Motion Planning: A* and D* Search Robotic Motion Planning: A* and D* Search Robotics Institute 6-75 http://voronoi.sbp.ri.cmu.edu/~motion Howie Choset http://voronoi.sbp.ri.cmu.edu/~choset 6-75, Howie Choset with slides from G. Ayorker

More information

Distributed Algorithms 6.046J, Spring, Nancy Lynch

Distributed Algorithms 6.046J, Spring, Nancy Lynch Distributed Algorithms 6.046J, Spring, 205 Nancy Lynch What are Distributed Algorithms? Algorithms that run on networked processors, or on multiprocessors that share memory. They solve many kinds of problems:

More information

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014 CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014 YOUR NAME: YOUR ID: ID TO RIGHT: ROW: SEAT: The exam will begin on the next page. Please, do not turn the page until told. When you are told to begin

More information

Algorithms for Data Science

Algorithms for Data Science Algorithms for Data Science CSOR W4246 Eleni Drinea Computer Science Department Columbia University Thursday, October 1, 2015 Outline 1 Recap 2 Shortest paths in graphs with non-negative edge weights (Dijkstra

More information

This lecture. Lecture 6: Search 5. Other Time and Space Variations of A* Victor R. Lesser. RBFS - Recursive Best-First Search Algorithm

This lecture. Lecture 6: Search 5. Other Time and Space Variations of A* Victor R. Lesser. RBFS - Recursive Best-First Search Algorithm Lecture 6: Search 5 Victor R. Lesser CMPSCI 683 Fall 2010 This lecture Other Time and Space Variations of A* Finish off RBFS SMA* Anytime A* RTA* (maybe if have time) RBFS - Recursive Best-First Search

More information

CSE 100: GRAPH ALGORITHMS

CSE 100: GRAPH ALGORITHMS CSE 100: GRAPH ALGORITHMS 2 Graphs: Example A directed graph V5 V = { V = E = { E Path: 3 Graphs: Definitions A directed graph V5 V6 A graph G = (V,E) consists of a set of vertices V and a set of edges

More information

COMP 251 Winter 2017 Online quizzes with answers

COMP 251 Winter 2017 Online quizzes with answers COMP 251 Winter 2017 Online quizzes with answers Open Addressing (2) Which of the following assertions are true about open address tables? A. You cannot store more records than the total number of slots

More information

Constraint)Programming!

Constraint)Programming! Just!to!recall! onstraint)programming! Roman! Barták epartment of Theoretical omputer Science and Mathematical Logic Back to generate-and-test: generates a solution candidate (a complete assignment) and

More information

Uninformed Search. Models To Be Studied in CS 540. Chapter Search Example: Route Finding

Uninformed Search. Models To Be Studied in CS 540. Chapter Search Example: Route Finding Models To e tudied in 50 Uninformed earch hapter 3. 3. tate-based Models Model task as a graph of all possible states l alled a state-space graph state captures all the relevant information about the past

More information

Constructive and destructive algorithms

Constructive and destructive algorithms Constructive and destructive algorithms Heuristic algorithms Giovanni Righini University of Milan Department of Computer Science (Crema) Constructive algorithms In combinatorial optimization problems every

More information

Informed Search and Exploration

Informed Search and Exploration Ch. 03b p.1/51 Informed Search and Exploration Sections 3.5 and 3.6 Nilufer Onder Department of Computer Science Michigan Technological University Ch. 03b p.2/51 Outline Best-first search A search Heuristics,

More information

Title. Ferienakademie im Sarntal Course 2 Distance Problems: Theory and Praxis. Nesrine Damak. Fakultät für Informatik TU München. 20.

Title. Ferienakademie im Sarntal Course 2 Distance Problems: Theory and Praxis. Nesrine Damak. Fakultät für Informatik TU München. 20. Title Ferienakademie im Sarntal Course 2 Distance Problems: Theory and Praxis Nesrine Damak Fakultät für Informatik TU München 20. September 2010 Nesrine Damak: Classical Shortest-Path Algorithms 1/ 35

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Search Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Problem formulation & examples Basic search algorithms 2/100 Example:

More information

2. True or false: even though BFS and DFS have the same space complexity, they do not always have the same worst case asymptotic time complexity.

2. True or false: even though BFS and DFS have the same space complexity, they do not always have the same worst case asymptotic time complexity. 1. T F: Consider a directed graph G = (V, E) and a vertex s V. Suppose that for all v V, there exists a directed path in G from s to v. Suppose that a DFS is run on G, starting from s. Then, true or false:

More information

Problem 1 Zero: 11% (~20 students), Partial: 66% (~120 students), Perfect: 23% (~43 students)

Problem 1 Zero: 11% (~20 students), Partial: 66% (~120 students), Perfect: 23% (~43 students) For each question on the Mid-term Exam, Zero below gives the fraction of students who scored zero, Partial gives the fraction who got partial credit, and Perfect gives the fraction who scored 100%. Problem

More information

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random Example: n-queens Put n queens on an n n board with no two queens on the same row, column, or diagonal A search problem! State space: the board with 0 to n queens Initial state: the empty board or a board

More information

Algorithms on Graphs: Part III. Shortest Path Problems. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar..

Algorithms on Graphs: Part III. Shortest Path Problems. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar.. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar.. Shortest Path Problems Algorithms on Graphs: Part III Path in a graph. Let G = V,E be a graph. A path p = e 1,...,e k, e i E,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

mywbut.com Informed Search Strategies-I

mywbut.com Informed Search Strategies-I Informed Search Strategies-I 1 3.1 Introduction We have outlined the different types of search strategies. In the earlier chapter we have looked at different blind search strategies. Uninformed search

More information

Lecture 4: Informed/Heuristic Search

Lecture 4: Informed/Heuristic Search Lecture 4: Informed/Heuristic Search Outline Limitations of uninformed search methods Informed (or heuristic) search uses problem-specific heuristics to improve efficiency Best-first A* RBFS SMA* Techniques

More information

Notes. Video Game AI: Lecture 5 Planning for Pathfinding. Lecture Overview. Knowledge vs Search. Jonathan Schaeffer this Friday

Notes. Video Game AI: Lecture 5 Planning for Pathfinding. Lecture Overview. Knowledge vs Search. Jonathan Schaeffer this Friday Notes Video Game AI: Lecture 5 Planning for Pathfinding Nathan Sturtevant COMP 3705 Jonathan Schaeffer this Friday Planning vs localization We cover planning today Localization is just mapping a real-valued

More information

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches Blind Searches Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL-STATE[problem]))

More information

Artificial Intelligence Uninformed search

Artificial Intelligence Uninformed search Artificial Intelligence Uninformed search A.I. Uninformed search 1 The symbols&search hypothesis for AI Problem-solving agents A kind of goal-based agent Problem types Single state (fully observable) Search

More information

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees Chapter 11 Copyright McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. Chapter Summary Introduction to Trees Applications

More information