Download presentation
Presentation is loading. Please wait.
Published byTrevor Martin Modified over 8 years ago
1
10/16/02copyright Brian Williams, 20021 courtesy of JPL Conflict-directed A* Brian C. Williams 16.412J/6.834J October 21, 2002 Brian C. Williams, copyright 2000
2
10/16/02copyright Brian Williams, 20022 Outline Diagnosis in a Nutshell Diagnosis as an Optimal CSP Using Conflicts to Find the Best: Conflict-directed A* Belief Update of Dynamic Systems Propositional inference in Real Time
3
10/16/02copyright Brian Williams, 20023 Diagnosis identifies consistent modes Adder(i): G(i): Out(i) = In1(i)+In2(i) U(i): Candidate: Assignment to all component modes. Diagnosis D: Candidate consistent with model Phi and observables OBS. 3 2 2 3 3 M1 M3 A1 A B C D E F G X Y Z 10 12 Diagnosis = {G(A1) & U(A2) & G(M1) & G(M2) & G(M3)} Given Model and Observations:
4
10/16/02copyright Brian Williams, 20024 Encoding Diagnoses and Inconsistent Candidates Conflict: A set of component modes M that are inconsistent with the model and observations. not M is an implicate of Model & Obs Kernel Diagnosis: A minimal set of component modes K that eliminate all symptoms. M is a prime implicant of Model & Obs Conflicts map to Kernels by minimal set covering M1 M2 A1 A B C D E 3 2 2 3 F G X Y Z 10 6 6 12 M3 A2 ? ? 3 2 2 3 3 M1 M3 A1 A B C D E F G X Y Z 10 12 ?
5
10/16/02copyright Brian Williams, 20025 Candidate Probabilities Assume Failure Independence P(x=v|c) estimated using Model: If previous obs, c and Phi entails x = v Then p(x = v | c) = 1 If previous obs, c and Phi entails x <> v Then p(x = v | c) = 0 If Phi consistent with all values for x Then p(x = v | c) is based on priors E.g., uniform prior = 1/m for m possible values of x Bayes’ Rule Normalization Term
6
10/16/02copyright Brian Williams, 20026 A large fraction of the diagnoses contain unknown modes U Candidates with UNKNOWN failure modes Candidates with KNOWN failure modes Good G F1 Fn G U But, given failure models, these diagnoses represent a small fraction of the probability density space Most of the density space may be represented by enumerating the few most likely diagnoses
7
10/16/02copyright Brian Williams, 20027 Outline Diagnosis in a Nutshell Diagnosis as an Optimal CSP Using Conflicts to Find the Best: Conflict-directed A* Belief Update of Dynamic Systems Propositional inference in Real Time
8
10/16/02copyright Brian Williams, 20028 Diagnosis identifies the most likely consistent modes Given: System variables X with domain D X Mode variables Y with domain D Y System model Phi(X,Y) : D X x D Y {True, False} Observations Obs(X) : D X {True, False} Compute: Leading Arg Max P(Y | Obs ) Y in D Y s.t. Exists X in D X. Phi(X,Y) OBS(X) is consistent (i.e., True)
9
10/16/02copyright Brian Williams, 20029 Generalize to Optimal CSP Constraint Satisfaction Problem CSP = variables X with domain D X Constraint C(X):D X {True,False} Find X in D X s.t. C(X) is True Optimal CSP OCSP= Decision variables Y with domain D Y Utility function g(Y): D Y CSP is a CSP on variables Find Leading arg max g(Y) Y in D y s.t. Exists X in D Y. C(X,Y) is consistent
10
10/16/02copyright Brian Williams, 200210 Outline Diagnosis in a Nutshell Diagnosis as an Optimal CSP Using Conflicts to Find the Best Conflict-directed A* Review of A* Enumerating the best kernels and candidates Belief Update of Dynamic Systems Propositional inference in Real Time
11
10/16/02copyright Brian Williams, 200211 When you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sherlock Holmes. The Sign of the Four. Exploring the Improbable
12
10/16/02copyright Brian Williams, 200212 Enumerating Probable Candidates Generate Candidate Test Candidate Consistent? Keep Compute Posterior p Below Threshold? Extract Conflict Done YesNo YesNo Leading Candidate Based on Priors
13
10/16/02copyright Brian Williams, 200213 Conflict-directed A* Given Current Conflicts: Generate best-cost kernel of conflicts Extend best kernel to best candidate Test consistency Failure: new-conflict.
14
10/16/02copyright Brian Williams, 200214 Increasing Cost Feasible Infeasible A*
15
10/16/02copyright Brian Williams, 200215 Increasing Cost Feasible Infeasible Conflict-directed A*
16
10/16/02copyright Brian Williams, 200216 Increasing Cost Feasible Infeasible Conflict 1 Conflict-directed A*
17
10/16/02copyright Brian Williams, 200217 Increasing Cost Feasible Infeasible Conflict 1 Conflict-directed A*
18
10/16/02copyright Brian Williams, 200218 Increasing Cost Feasible Infeasible Conflict 2 Conflict 1 Conflict-directed A*
19
10/16/02copyright Brian Williams, 200219 Increasing Cost Feasible Infeasible Conflict 2 Conflict 1 Conflict-directed A*
20
10/16/02copyright Brian Williams, 200220 Increasing Cost Feasible Infeasible Conflict 3 Conflict 2 Conflict 1 Conflict-directed A*
21
10/16/02copyright Brian Williams, 200221 Increasing Cost Feasible Infeasible Conflict 3 Conflict 2 Conflict 1 Conflict-directed A* Feasible regions described by the implicants of known conflicts (Kernel Assignments) Want kernel assignment containing the best cost candidate
22
10/16/02copyright Brian Williams, 200222 Conflict-directed A* Function Conflict-directed-A*(OCSP) returns the leading minimal cost solutions. Conflicts[OCSP] {} OCSP Initialize-Best-Kernels(OCSP) Solutions[OCSP] {} loop do decision-state Next-Best-State-Resolving-Conflicts(OCSP) if no decision-state returned or Terminate?(OCSP) then return Solutions[OCSP] if Consistent?(CSP[OCSP ], decision-state) then add decision-state to Solutions[OCSP] new-conflicts Extract-Conflicts(CSP[OCSP], decision-state) Conflicts[OCSP] Eliminate-Redundant-Conflicts(Conflicts[OCSP] new-conflicts) end
23
10/16/02copyright Brian Williams, 200223 Conflict-directed A* Function Conflict-directed-A*(OCSP) returns the leading minimal cost solutions. Conflicts[OCSP] {} OCSP Initialize-Best-Kernels(OCSP) Solutions[OCSP] {} loop do decision-state Next-Best-State-Resolving-Conflicts(OCSP) if no decision-state returned or Terminate?(OCSP) then return Solutions[OCSP] if Consistent?(CSP[OCSP ], decision-state) then add decision-state to Solutions[OCSP] new-conflicts Extract-Conflicts(CSP[OCSP], decision-state) Conflicts[OCSP] Eliminate-Redundant-Conflicts(Conflicts[OCSP] new-conflicts) end
24
10/16/02copyright Brian Williams, 200224 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 Assume Independent failures: P G(mi) >> P U(mi) P single >> P double P U(M2) > P U(M1) > P U(M3) > P U(A1) > P U(A2) Example: Diagnosis
25
10/16/02copyright Brian Williams, 200225 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 Conflicts / Constituent Diagnoses none Best Kernel: {} Best Candidate: ?? First Iteration
26
10/16/02copyright Brian Williams, 200226 { } M1=? M2=? M3=? A1=? A2=? M1=G M2=G M3=G A1=G A2=G Select most likely value for unassigned modes
27
10/16/02copyright Brian Williams, 200227 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12
28
10/16/02copyright Brian Williams, 200228 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6
29
10/16/02copyright Brian Williams, 200229 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6
30
10/16/02copyright Brian Williams, 200230 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6
31
10/16/02copyright Brian Williams, 200231 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6
32
10/16/02copyright Brian Williams, 200232 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6 Extract Conflict and Constituent Diagnoses:
33
10/16/02copyright Brian Williams, 200233 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6 Extract Conflict and Constituent Diagnoses:
34
10/16/02copyright Brian Williams, 200234 Test: M1=G M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6 Extract Conflict and Constituent Diagnoses: ¬ [M1=G M2=G A1=G]
35
10/16/02copyright Brian Williams, 200235 Test: M1=G M2=G M3=G A1=G A2=G Extract Conflict and Constituent Diagnoses: ¬ [M1=G M2=G A1=G] M1=U M2=U A1=U 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6
36
10/16/02copyright Brian Williams, 200236 Conflicts / Constituent Diagnoses M1=U M2=U A1=U Best Kernel: M1=U Best Candidate: M1=G M2=U M3=G A1=G A2=G Second Iteration 3 2 2 3 3 10 M1 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 6
37
10/16/02copyright Brian Williams, 200237 Test: M1=G M2=U M3=G A1=G A2=G 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 A1
38
10/16/02copyright Brian Williams, 200238 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 Test: M1=G M2=U M3=G A1=G A2=G A1
39
10/16/02copyright Brian Williams, 200239 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 6 Test: M1=G M2=U M3=G A1=G A2=G A1
40
10/16/02copyright Brian Williams, 200240 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 4 6 Test: M1=G M2=U M3=G A1=G A2=G A1
41
10/16/02copyright Brian Williams, 200241 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 4 6 10 Test: M1=G M2=U M3=G A1=G A2=G A1
42
10/16/02copyright Brian Williams, 200242 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 4 6 10 Test: M1=G M2=U M3=G A1=G A2=G A1 Extract Conflict:
43
10/16/02copyright Brian Williams, 200243 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 4 6 10 Test: M1=G M2=U M3=G A1=G A2=G A1 Extract Conflict: Not [G(M1) & G(M3) & G(A1) & G(A2)]
44
10/16/02copyright Brian Williams, 200244 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 4 6 10 Test: M1=G M2=U M3=G A1=G A2=G A1 Extract Conflict: ¬ [M1=G M3=G A1=G A2=G] M1=U M3=U A1=U A2=U
45
10/16/02copyright Brian Williams, 200245 Conflicts / Constituent Diagnoses M1=U M2=U A1=U M1=U M3=U A1=U A2=U Best Kernel: M1=U Best Candidate: M1=U M2=G M3=G A1=G A2=G Second Iteration 3 2 2 3 3 10 M1 M3 A2 A B C D E F G X Y Z 12 6 4 6 10 A1
46
10/16/02copyright Brian Williams, 200246 Test: M1=U M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M2 M3 A1 A2 A B C D E F G X Y Z 12
47
10/16/02copyright Brian Williams, 200247 3 2 2 3 3 10 M2 M3 A1 A2 A B C D E F G X Y Z 12 Test: M1=U M2=G M3=G A1=G A2=G
48
10/16/02copyright Brian Williams, 200248 3 2 2 3 3 10 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 Test: M1=U M2=G M3=G A1=G A2=G
49
10/16/02copyright Brian Williams, 200249 3 2 2 3 3 10 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 Test: M1=U M2=G M3=G A1=G A2=G
50
10/16/02copyright Brian Williams, 200250 Test: M1=U M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 4
51
10/16/02copyright Brian Williams, 200251 Test: M1=U M2=G M3=G A1=G A2=G 3 2 2 3 3 10 M2 M3 A1 A2 A B C D E F G X Y Z 12 6 6 4 Consistent!
52
10/16/02copyright Brian Williams, 200252 A2=UM1=U M3=UA1=U A1=U, A2=U, M1=U, M3=U A1=UM1=UM2=U A1=U M1=U M1=U A2=U M2=U M3=U Conflict-Directed A*: Generating Best Kernels A1=U, M1=U, M2=U Constituent Diagnoses Minimal set covering is an instance of breadth first search. To find the best kernel, expand tree in best first order. Insight: Kernels found by minimal set covering
53
10/16/02copyright Brian Williams, 200253 A1=U, A2=U, M1=U, M3=U A1=UM1=UM2=U A2=UM1=U M3=UA1=U M2=U A2=U M2=U M3=U M1=U Conflict-Directed A*: Generating Best Kernels A1=U, M1=U, M2=U Constituent Diagnoses A1=U Minimal set covering is an instance of breadth first search. To find the best kernel, expand tree in best first order. Insight: Kernels found by minimal set covering Continue expansion to find best candidate.
54
10/16/02copyright Brian Williams, 200254 Outline Diagnosis in a Nutshell Diagnosis as an Optimal CSP Using Conflicts to Find the Best Conflict-directed A* Review of A* Enumerating the best kernels and candidates Belief Update of Dynamic Systems Propositional inference in Real Time
55
10/16/02copyright Brian Williams, 200255 A* Search: Preliminaries Problem: State Space Search Problem Initial State Expand(node) Children of Search Node = next states Goal-Test(node) True if search node at a goal-state hAdmissible Heuristic -Optimistic cost to go Search Node:Node in the search tree StateState the search is at ParentParent in search tree ds search node to those to be expanded
56
10/16/02copyright Brian Williams, 200256 A* Search: Preliminaries Problem: State Space Search Problem Initial State Expand(node) Children of Search Node = adjacent states Goal-Test(node) True if search node at a goal-state NodesSearch Nodes to be expanded ExpandedSearch Nodes already expanded InitializeSearch starts at , with no expanded nodes hAdmissible Heuristic -Optimistic cost to go Search Node:Node in the search tree StateState the search is at ParentParent in search tree Nodes[Problem]: Remove-Best(f)Removes best cost node according to f Enqueue(new-node, f )Adds search node to those to be expanded
57
10/16/02copyright Brian Williams, 200257 A* Search Function A*(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) 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 Goal-Test[problem] applied to State(node) succeeds then return node end Expand best first
58
10/16/02copyright Brian Williams, 200258 A* Search Function A*(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) 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 Goal-Test[problem] applied to State(node) succeeds then return node end Terminates when...
59
10/16/02copyright Brian Williams, 200259 A* Search Function A*(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) 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 Goal-Test[problem] applied to State(node) succeeds then return node end Dynamic Programming Principle...
60
10/16/02copyright Brian Williams, 200260 Outline Diagnosis in a Nutshell Diagnosis as an Optimal CSP Using Conflicts to Find the Best Conflict-directed A* Review of A* Enumerating the best kernels and candidates Belief Update of Dynamic Systems Propositional inference in Real Time
61
10/16/02copyright Brian Williams, 200261 Next Best State Resolving Conflicts Function Next-Best-State-Resolving-Conflicts (OCSP) returns the best cost state consistent with Conflicts[OCSP]. f(x) G[problem] (g[problem](x), h(x)) loop do if Nodes[OCSP] is empty then return failure node Remove-Best(Nodes[OCSP], f) state State[node] add state to Visited[OCSP] new-nodes Expand-State-Resolving-Conflicts(node, OCSP) for each new-node in new-nodes unless Exists n in Nodes[OCSP] such that State[new-node] = state OR State[new-node] is in Visited[problem] then Nodes[OCSP] Enqueue(Nodes[OCSP], new-node, f ) if Goal-Test-State-Resolving-Conflicts[OCSP] applied to state succeeds then return node end An instance of A*
62
10/16/02copyright Brian Williams, 200262 OCSP Admissible Estimate: Example for {M2=U} M1=? M3=? A1=? A2=? x P M1=G x P M3=G x P A1=G x P A2=G Select most likely value for unassigned modes F = G + H P M2=u M2=U
63
10/16/02copyright Brian Williams, 200263 OCSP: Admissible Heuristic Let g = describe a multi-attribute utility fn Assume the preference for one attribute x i is independent of another x k Called Mutual Preferential Independence: For all u, v Y If g i (u) ≥ g i (v) then for all w G(g i (u),g k (w)) ≥ G(g i (v),g k (w)) An Admissible h: Given a partial assignment, to X Y h selects the best value of each unassigned variable Z = X – Y h(Y) = G({g zi_max | z i Z, max g zi (v ij ))}) v ij D zi A candidate always exists satisfying h(Y).
64
10/16/02copyright Brian Williams, 200264 Termination and Expansion Function Goal-Test-State-Resolving-Conflicts (node, problem) returns True IFF node is a complete decision state. if forall K in Constituent-Kernels(Conflicts[problem]), State[node] contains a kernel in K then if all variables are assigned in State[node] then return True else return False Function Expand-State-Resolving-Conflicts (node, problem) returns best nodes expanded from node. if forall K in Constituent-Kernels(Conflicts[problem]), State[node] contains a kernel in K then if all variables are assigned in State[node] then return {} else return Expand-Variable(node, problem) else return Expand-Conflict(node, problem)
65
10/16/02copyright Brian Williams, 200265 Conflict-directed A*: Expanding Children Unresolved Conflicts:All Conflicts Resolved: M2=UM1=UA1=UA2=GA2=U (M2=G M1=G A1=G) Conflict { } Select unresolved Conflict. Each child adds a constituent kernel. Select unassigned variable y i. Each child adds an assignment from D i.
66
10/16/02copyright Brian Williams, 200266 M2=UA1=UM1=U M2=U M1=U A1=U { } For any Node N: The child of N containing the best cost candidate is the child with the best estimated cost f = g+h (by MPI). Only need to expand the best child. Conflict-directed A*: Expand Best Child & Sibling Constituent kernels
67
10/16/02copyright Brian Williams, 200267 M2=UA1=UM1=U Order constituents by decreasing likelihood { } >> Conflict-directed A*: Expand Best Child & Sibling For any Node N: The child of N containing the best cost candidate is the child with the best estimated cost f = g+h. Only need to expand the best child. M2=U M1=U A1=U Constituent kernels
68
10/16/02copyright Brian Williams, 200268 M2=U Order constituents by decreasing likelihood { } Conflict-directed A*: Expand Best Child & Sibling For any Node N: The child of N containing the best cost candidate is the child with the best estimated cost f = g+h. Only need to expand the best child. M2=U M1=U A1=U Constituent kernels
69
10/16/02copyright Brian Williams, 200269 M1=U M3=U A1=U A2=U M1=U M2=U M1=U Conflict-directed A*: Expand Best Child & Sibling M2=U M1=U A1=U Constituent kernels When a best child loses any candidate, expand child’s next best sibling: If unresolved conflicts: expand as soon as next conflict of child is resolved. If conflicts resolved: expand as soon as child is expanded to a full candidate. { } M2=GM3=GA1=GA2=G M2=UM3=UA1=U A2=U Figure 33 [Williams& Ragno,2002] Figure 24 [Williams & Ragno, 2002]
70
10/16/02copyright Brian Williams, 200270 Problem Parameters Constraint-based A* (no conflicts) Conflict-directed A*Mean CD-CB Ratio Dom Size Dec Vars Clau -ses Clau -se lngth Nodes Expand ed Queue Size Nodes Expand Queue Size Conflicts used Nodes Expanded Queue Size 510 56831,2303.36.31.2 4.5% 5.6% 5103052,3603,4908.117.93.2 2.4% 3.5% 5105054,2706,26012.041.32.6 0.83% 1.1% 10 63,79013,4005.716.01.6 2.0% 1.0% 10 3061,4305,1309.794.44.2 4.6% 5.8% 10 5069294,0606.027.32.3 3.5% 3.9% 5201051091494.27.21.613.0% 5203053334346.49.22.2 6.0% 5.4% 5205051491975.47.22.012.0%11.0%
71
10/16/02copyright Brian Williams, 200271 Research in Model-based Diagnosis Methods exist for: Focusing on likely diagnoses Active probing Diagnosing dynamic systems and monitoring behavior Repairing and compensating for failures Diagnosing hybrid discrete/continuous systems Performing distributed diagnosis
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.