Model-based Diagnosis

Slides:



Advertisements
Similar presentations
Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
Advertisements

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
MBD and CSP Meir Kalech Partially based on slides of Jia You and Brian Williams.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Consistency-based diagnosis 1 Introduction 2 Diagnosis as constrain propagation plus register of dependencies 3 General Diagnostic Engine:GDE 4 A theory.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
MBD in real-world system… Self-Configuring Systems Meir Kalech Partially based on slides of Brian Williams.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.5 [P]: Propositions and Inference Sections.
Measurements Meir Kalech Partially Based on slides of Brian Williams and Peter struss.
3/25  Monday 3/31 st 11:30AM BYENG 210 Talk by Dana Nau Planning for Interactions among Autonomous Agents.
Models -1 Scientists often describe what they do as constructing models. Understanding scientific reasoning requires understanding something about models.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
Methods of Proof Chapter 7, second half.
Behavior Modes Meir Kalech Partially Based on slides of Brian Williams, Luca Console and Peter struss.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
A Compressed Breadth-First Search for Satisfiability DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Scientific Thinking - 1 A. It is not what the man of science believes that distinguishes him, but how and why he believes it. B. A hypothesis is scientific.
Chapter 5 Outline Formal definition of CSP CSP Examples
3/19/2003copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams November 22 nd, 2004.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Linear Systems The definition of a linear equation given in Chapter 1 can be extended to more variables; any equation of the form for real numbers.
Causality, Reasoning in Research, and Why Science is Hard
The Role of Optimization and Deduction in Reactive Systems P. Pandurang Nayak NASA Ames Research Center Brian.
1 TMS and ATMS Philippe Dague and Yuhong YAN NRC-IIT
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams /6.834 October 7 th, 2002.
16.412J/6.835 Intelligent Embedded Systems Prof. Brian Williams Rm Rm NE Prof. Brian Williams Rm Rm NE43-838
1 Context-dependent Product Line Practice for Constructing Reliable Embedded Systems Naoyasu UbayashiKyushu University, Japan Shin NakajimaNational Institute.
10/16/02copyright Brian Williams, courtesy of JPL Diagnosing Multiple Faults Brian C. Williams J/6.834J October 16 th, 2002 Brian C. Williams,
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
1 Consistent-based Diagnosis Yuhong YAN NRC-IIT. 2 Main concepts in this paper  (Minimal) Diagnosis  Conflict Set  Proposition 3.3  Corollary 4.5.
Discovery and Systems Health Technical Area NASA Ames Research Center - Computational Sciences Division Automated Diagnosis Sriram Narasimhan University.
Robotic Space Explorers: To Boldly Go Where No AI System Has Gone Before A Story of Survival J/6.834J September 19, 2001.
Abdul-Rahman Elshafei – ID  Introduction  SLAT & iSTAT  Multiplet Scoring  Matching Passing Tests  Matching Complex Failures  Multiplet.
Space Systems Laboratory Massachusetts Institute of Technology AUTONOMY MIT Graduate Student Open House March 24, 2000.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
9/18/2000copyright Brian Williams1 Propositional Logic Brian C. Williams J/6.834J October 10, 2001.
Copyright B. Williams J/6.834J, Fall 02 Lecture 3: Immobile Robots and Space Explorers Prof. Brian Williams Rm Wednesday, September 11 th,
Assumption-based Truth Maintenance Systems: Motivation n Problem solvers need to explore multiple contexts at the same time, instead of a single one (the.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
10/16/02copyright Brian Williams, courtesy of JPL Conflict-directed A* Brian C. Williams J/6.834J October 21, 2002 Brian C. Williams, copyright.
Automatic Test Generation
Monitoring Dynamical Systems: Combining Hidden Markov Models and Logic
CSC Modeling with FD Constraints
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Input Space Partition Testing CS 4501 / 6501 Software Testing
Model-based Diagnosis: The Single Fault Case
Analytical Learning Discussion (4 of 4):
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Exercises: First Order Logics (FOL)
Lecture 7 Constraint Satisfaction Problems
Ordering of Hypothesis Space
Definitions D-Algorithm (Roth) D-cubes Bridging faults
VLSI Testing Lecture 7: Combinational ATPG
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 13
Logics for Data and Knowledge Representation
NP-Complete Problems.
Heuristic Minimization of Two Level Circuits
Fast SAT through Incremental Unit Propagation
Methods of Proof Chapter 7, second half.
Constraint Satisfaction
Machine Learning Chapter 2
Implementation of Learning Systems
GRASP-an efficient SAT solver
Machine Learning Chapter 2
Presentation transcript:

Model-based Diagnosis Brian C. Williams 16.410-13 November 24th 2004 10/03/03 copyright Brian Williams, 2003 courtesy of JPL Brian C. Williams, copyright 2000

Assignment Reading Problem Set Model-based Diagnosis – Lecture notes Propositional Logic AIMA Chapter 6 Problem Set Due Friday, December 3rd 10/03/03 copyright Brian Williams, 2003

act WORLD Plant actions observations P(s) Diagnostic Agent: 3/6/00 WORLD Plant actions observations P(s) sense act Diagnostic Agent: Monitors & Diagnoses Repairs & Avoids Probes and Tests AGENT Symptom-directed 10/03/03 copyright Brian Williams, 2003

Outline Model-based diagnosis Defining diagnoses Searching for diagnoses Appendix 10/03/03 copyright Brian Williams, 2003

Hidden Failures Require Reasoning from a Model: STS-93 Symptoms: Engine temp sensor high LOX level low GN&C detects low thrust H2 level possibly low Problem: Liquid hydrogen leak Effect: LH2 used to cool engine Engine runs hot Consumes more LOX Hidden Failures Require Reasoning from a Model: STS-93 10/03/03 copyright Brian Williams, 2003

Model-based Diagnosis Given a system and observations with symptomatic behavior, and a model of the system, find diagnoses that account for the symptoms. O1 Or2 Or3 And1 And2 A B C D E F G X Y Z 1 Symptom 1 1 Or1 1 1 10/03/03 copyright Brian Williams, 2003

Model-based Diagnosis Given a system and observations with symptomatic behavior, and a model of the system, find diagnoses that account for the symptoms. Or1 Or2 Or3 And1 And2 A B C D E F G X Y Z 1 Symptom 1 1 1 1 10/03/03 copyright Brian Williams, 2003

Diagnosis as Hypothesis Testing Generate candidates, given symptoms. Test if candidates account for all symptoms. Set of diagnoses should be complete. Set of diagnoses should exploit all available information. 10/03/03 copyright Brian Williams, 2003

Outline Model-based diagnosis Defining diagnoses Explaining failures Handling unknown failures Searching for diagnoses Appendix 10/03/03 copyright Brian Williams, 2003

How Should Diagnoses Account for Symptoms? Abductive Diagnosis: Given symptoms, find diagnoses that predict observations. A 1 Symptom 1 O1 X F B 1 A1 1 C 1 O2 Y D G 1 1 A2 E O3 Z Assume Exhaustive Fault Models: 10/03/03 copyright Brian Williams, 2003

How Should Diagnoses Account for Symptoms? Abductive Diagnosis: Given symptoms, find diagnoses that predict observations. A 1 Symptom 1 1 O1 X F B 1 A1 1 C 1 O2 Y 1 D G 1 1 A2 E O3 Z O1’s output is stuck to 0 Output shorted to ground 10/03/03 copyright Brian Williams, 2003

Abductive, Model-based Diagnosis 3/6/00 Abductive, Model-based Diagnosis O1 O2 O3 A1 A2 A B C D E F G X Y Z Or(i): G(i): Out(i) = In1(i) or In2(i) Stuck_0(i): Out(i) = 0 1 1 Model Structure Model of normal behavior for each component Model for every component failure mode Observations Inputs and Response 10/03/03 copyright Brian Williams, 2003

Abductive, Model-based Diagnosis 3/6/00 Abductive, Model-based Diagnosis O1 O2 O3 A1 A2 A B C D E F G X Y Z Or(i): G(i): Out(i) = In1(i) or In2(i) Stuck_0(i): Out(i) = 0 1 1 X mode variables, one for each component c Dc modes of component c = domain of xc  X Y model variables M(X, Y) model constraints O observable variables O  Y Partitioned into Inputs I and Responses R 10/03/03 copyright Brian Williams, 2003

Abductive, Model-based Diagnosis F G X Y Z Or(i): G(i): Out(i) = In1(i) or In2(i) Stuck_0(i): Out(i) = 0 1 1 Candidate = {A1=G, A1=G, M1=G, A2=G, M3=G} Diagnosis = {A1=G, A2=S0, O1=G, M2=G, M3=G} Obs <In, Resp>: Assignment to I and R, respectively Candidate Ci: Assignment of modes to X Diagnosis Di: A candidate such that Di  In  M(X,Y) predicts (entails) Resp 10/03/03 copyright Brian Williams, 2003

Abductive Diagnosis by Generate and Test 3/6/00 Abductive Diagnosis by Generate and Test Given: Correct and exhaustive fault models for each component. Generate: Consider each mode assignment as a candidate. Test: 1. Simulate candidate, given inputs. 2. Compare to observations Disagree: Discard Agree: Keep No prediction: Discard Exonerate component if none of its fault modes agree Problem: Fault models are often incomplete May incorrectly exonerate faulty components 10/03/03 copyright Brian Williams, 2003

Outline Model-based diagnosis Defining diagnosis Explaining failures Handling unknown failures Searching for diagnoses Appendix 10/03/03 copyright Brian Williams, 2003

Issue: Failures are Often Novel Mars Observer Mars Climate Orbiter Mars Polar Lander Deep Space 2 courtesy of JPL 10/03/03 copyright Brian Williams, 2003

10/03/03 copyright Brian Williams, 2003

How Should Diagnoses Account for Novel Symptoms? Consistency-based Diagnosis: Given symptoms, find diagnoses that are consistent with symptoms. Suspending Constraints: For novel faults make no presumption about faulty component behavior. 1 Symptom Or1 Or2 Or3 And1 And2 A B C D E F G X Y Z 10/03/03 copyright Brian Williams, 2003

How Should Diagnoses Account for Novel Symptoms? Consistency-based Diagnosis: Given symptoms, find diagnoses that are consistent with symptoms. Suspending Constraints: For novel faults make no presumption about faulty component behavior. A 1 Symptom 1 1 Or1 X F B 1 And1 1 C 1 Or2 Y D G 1 1 And2 E Or3 Z 10/03/03 copyright Brian Williams, 2003

How Should Diagnoses Account for Novel Symptoms? Consistency-based Diagnosis: Given symptoms, find diagnoses that are consistent with symptoms. Suspending Constraints: For novel faults make no presumption about faulty component behavior. A 1 1 Or1 X F B 1 And1 1 C 1 Or2 Y D G 1 1 And2 E Or3 Z 10/03/03 copyright Brian Williams, 2003

Consistency-based Diagnosis And(i): G(i): Out(i) = In1(i) AND In2(i) U(i): 1 O1 X F B A1 1 C 1 Y D G 1 1 ALL components have “unknown Mode” U, Whose assignment is never mentioned in C O3 E Z Diagnosis = {A1=G, A2=U O1=G, O2=U, O3=G} Obs: Assignment to O Candidate Ci: Assignment of modes to X Diagnosis Di: A candidate such that Di  Obs  C(X,Y) is satisfiable. 10/03/03 copyright Brian Williams, 2003

Testing Consistency DPLL Finite Domain Constraints Propositional Logic Just unit propagation (incomplete) Finite Domain Constraints Backtrack w forward checking Waltz constraint propagation (incomplete) Algebraic Constraints Gaussian Elimination Sussman/Steele Constraint Propagation (incomplete) Propagate newly assigned values through equations mentioning variables. To propagate, use assigned values of constraint to deduce unknown value(s) of constraint. 10/03/03 copyright Brian Williams, 2003

Encoding Models In Propositional Logic And(i): G(i): Out(i) = In1(i) AND In2(i) U(i): (i=G)  (In1(i)=0)  Out(i)=0 (i=G)  (In2(i)=0)  Out(i)=0 (i=G)  (In1(i)=1)  (In2(i)=1)  Out(i)=1 Or(i): G(i): Out(i) = In1(i) OR In2(i) U(i): (i=G)  (In1(i)=1)  Out(i)=1 (i=G)  (In2(i)=1)  Out(i)=1 (i=G)  (In1(i)=0)  (In2(i)=0)  Out(i)=0 X {1,0} X=1  X=0 X=1 X=0 10/03/03 copyright Brian Williams, 2003

Outline Model-based diagnosis Defining diagnosis Explaining failures Handling unknown failures Searching for diagnoses Conflict learning Single-fault diagnosis Appendix Multiple-fault diagnosis 10/03/03 copyright Brian Williams, 2003

Learning Conflicts From Symptoms 1 A 1 1 O1 X F F B 1 1 A1 C 1 O2 Y D G 1 A3 E O3 Z Symptom: F is observed 0, but should be 1 if O1, O2 and A1 are okay. Conflict: {A1=G, O1=G, O2=G} is inconsistent At least A1=U, O1=U, or O2=U 10/03/03 copyright Brian Williams, 2003

Find Symptom Using Unit Propagation 3/6/00 Find Symptom Using Unit Propagation true false false t r q C2: ¬ p ¬ t true C1 : ¬r  q p p procedure propagate(C) // C is a clause if all literals in C are false except l, and l is unassigned then assign true to l and record C as a support for l and for each clause C’ mentioning “not l”, propagate(C’) end propagate 10/03/03 copyright Brian Williams, 2003

Find Symptom Using Unit Propagation O1=G A=1 (F=1)  (F=0) (O1=G)  (A=1)  X=1 X=1 F=1 F=1 (A1=G)  (X=1)  (Y=1)  F=1 A1=G (O2=G)  (B=1)  Y=1 Y=1 O2=G B=1 10/03/03 copyright Brian Williams, 2003

Find Symptom Using Unit Propagation true O1=G A=1 (F=1)  (F=0) true (O1=G)  (A=1)  X=1 X=1 F=1 F=1 (A1=G)  (X=1)  (Y=1)  F=1 F=1 A1=G (O2=G)  (B=1)  Y=1 Y=1 true O2=G B=1 B=1 10/03/03 copyright Brian Williams, 2003

Find Symptom Using Unit Propagation O1=G A=1 true true O1=G A=1 (F=1)  (F=0) true (O1=G)  (A=1)  X=1 X=1 F=1 F=1 A1=G (A1=G)  (X=1)  (Y=1)  F=1 F=1 A1=G true (O2=G)  (B=1)  Y=1 Y=1 true true O2=G B=1 O2=G B=1 10/03/03 copyright Brian Williams, 2003

Find Symptom Using Unit Propagation O1=G A=1 true true O1=G A=1 (F=1)  (F=0) true true (O1=G)  (A=1)  X=1 X=1 F=1 F=1 A1=G (A1=G)  (X=1)  (Y=1)  F=1 F=1 A1=G true true (O2=G)  (B=1)  Y=1 Y=1 true true O2=G B=1 O2=G B=1 10/03/03 copyright Brian Williams, 2003

Find Symptom Using Unit Propagation O1=G A=1 true true O1=G A=1 (F=1)  (F=0) true true true (O1=G)  (A=1)  X=1 X=1 F=1 F=1 A1=G (A1=G)  (X=1)  (Y=1)  F=1 F=1 A1=G true true (O2=G)  (B=1)  Y=1 Y=1 true true O2=G B=1 O2=G B=1 10/03/03 copyright Brian Williams, 2003

Extract Conflict by Tracing Support O1=G A=1 true true O1=G A=1 (F=1)  (F=0) true true true (O1=G)  (A=1)  X=1 X=1 F=1 F=1 A1=G (A1=G)  (X=1)  (Y=1)  F=1 F=1 A1=G true true (O2=G)  (B=1)  Y=1 Y=1 true true O2=G B=1 O2=G B=1 10/03/03 copyright Brian Williams, 2003

Extract Conflict by Tracing Support 3/6/00 Extract Conflict by Tracing Support procedure Conflict(C) // C is an inconsistent clause for each literal I in C union Support-Conflict(l, support(l) ) end Conflict procedure Support-Conflict(l,S) If unit-clause?(C) If mode-assignment?(literal (C)) Then { literal(C) } Else { } Else for each literal I1 in C, other than l Union Support-Conflict(l1, support(l1)) end Support-Conflict 10/03/03 copyright Brian Williams, 2003

Candidate Test with Conflict Extraction 3/6/00 Candidate Test with Conflict Extraction procedure Test_Candidate(c,M,obs) Assert candidate assignment c Propagate obs through model M using unit propagation. If inconsistent clause return Conflict(c) Else search for satisfying solution using DPLL If inconsistent return c as a conflict. Else return “consistent” 10/03/03 copyright Brian Williams, 2003

Outline Model-based diagnosis Defining diagnosis Searching for diagnoses Conflict learning Single-fault diagnosis Appendix 10/03/03 copyright Brian Williams, 2003

Single Fault Diagnosis w Conflicts: Generate Candidates From Symptom Single_Fault_w_Conflicts(M, X, Obs) \\ Model M, Mode variables X, Observation Obs Assume all components okay, All_Good = { x=G | x  X} Conflict  Test_Candidate(All_Good, M, Obs) If Conflict = “consistent” return All_Good Generate single fault candidates Cands  {{x=U}Z=G | x=G  Conflict, Z=X-{x}} Test_Candidates(Cands, M, Obs) 10/03/03 copyright Brian Williams, 2003

Generate Candidates From Symptom 1 1 O1 X F B A1 C Symptom O2 Y D G A2 1 E O3 Z Symptom: F is observed 0, but should be 1 Conflict: {O1=G, O3=G, A1=G, A2=G} is inconsistent Candidates: {O1=U, O3=U, A1=U, A2=G} 10/03/03 copyright Brian Williams, 2003

Generate Candidates From Symptom 1 1 O1 X F B A1 C Symptom O2 Y D G A2 1 E O3 Z Symptom: F is observed 0, but should be 1 Conflict: {O1=G, O3=G, A1=G, A2=G} is inconsistent Candidates: {{O1=U…}, {O3=U…}, {A1=U...}, {A2=G…}} 10/03/03 copyright Brian Williams, 2003

Single Fault Diagnosis w Conflicts: Test Candidates, Collecting Conflicts Single_Fault_Test_Candidates(C,M, Obs) \\ Candidates C, Model M, Observation Obs Diagnoses  {}, Conflicts  {} For each c in C If c is a superset of some conflict in Conflicts Then inconsistent candidate, ignore. Else Conflict = Test_Candidate(c, M, Obs) If Conflict = “consistent” Then add c to Diagnoses Else add Conflict to Conflicts return Diagnoses 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O1=U…}, {O3=U…}, {A1=U…}, {A3=U…}} Diagnoses: {} 1 O2 O3 A1 A2 A B C D E F G X Y Z O1 1 1 First candidate {O1=U, …} 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O1=U…}, {O3=U…}, {A1=U…}, {A3=U…}} Solutions: {} A 1 X F B 1 A1 C 1 O2 Y D G 1 A2 1 E O3 Z First candidate {O1=U, …} Suspend O1’s constraints 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O1=U…}, {O3=U…}, {A1=U…}, {A3=U…}} Solutions: {} A 1 X F B 1 A1 1 C 1 O2 Y D G 1 A2 1 1 1 E O3 Z First candidate {O1=U, …} Suspend O1’s constraints Test consistency 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O3=U…}, {A1=U…}, {A3=U…}} Solutions: {{O1=U…}} A 1 X F B 1 A1 1 C 1 O2 Y D G 1 A2 1 1 1 E O3 Z First candidate {O1=U, …} Suspend O1’s constraints Test consistency → Consistent: Add to solutions 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O3=U…}, {A1=U…}, {A2=U…}} Solutions: {{O1=U…}} A 1 O1 X F B 1 A1 C 1 O2 Y D G 1 A2 1 E O3 Z Second candidate {O3=U, …} Suspend O3’s constraints Test consistency 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O3=U…}, {A1=U…}, {A2=U…}} Solutions: {{O1=U…}} A 1 1 O1 X 1 F B 1 A1 1 C 1 O2 Y D G 1 A2 1 1 E Z Second candidate {O3=U, …} Suspend O3’s constraints Test consistency→ Inconsistent Testing Consistency ≠ Forward Prediction 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{O3=U…}, {A1=U…}, {A2=U…}} Solutions: {{O1=U…}} Conflicts: {{O1=G, O2=G, A1=G}} A 1 1 O1 X 1 F B 1 A1 1 C 1 O2 Y D G 1 A2 1 1 E Z Second candidate {O3=U, …} Suspend O3’s constraints Test → Inconsistent Extract Conflict: {O1=G, O2=G, A1=G} Use to prune candidates 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{A1=U…}, {A2=U…}} Solutions: {{O1=U…}} Conflicts: {{O1=G, O2=G, A1=G}} A 1 1 O1 X F B 1 A1 1 C 1 O2 Y D G 1 1 A2 1 1 E O3 Z Third candidate {A1=U, …} Subsumed by conflict? → Suspend A1’s constraints Test → No, since A1 = U, not A1=G Consistent 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Candidates: {{A2=U…}} Solutions: {{O1=U…}, {A1=U…}} Conflicts: {{O1=G, O2=G, A1=G}} A 1 O1 X F B 1 A1 C 1 O2 Y D G 1 A2 1 E O3 Z Fourth candidate {A2=U, …} Subsumed by conflict? → Eliminate candidate Yes, since O1=G,O2=G and A1=G Consistent 10/03/03 copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts Solutions: {{O1=U…}, {A1=U…} Conflicts: {{O1=G, O2=G, A1=G}} A 1 O1 X F B 1 A1 C 1 O2 Y D G 1 A2 1 E O3 Z Return Solutions → O1 or A1 broken 10/03/03 copyright Brian Williams, 2003

Single Fault Diagnoses are the Intersection of All Conflicts {A1=G, M1=U, M2=U} conflict 1. {A1=U, A2=U, M1=U, M3=U} conflict 2 A1=U or M1=U or M2=U removes conflict 1. A1=U or A2=U or M1=U or M3=U removes conflict 2 Single Fault Diagnoses = {{A1=U..}, {M1=U..}} 10/03/03 copyright Brian Williams, 2003

Outline Model-based diagnosis Defining diagnosis Explaining failures Handling unknown failures Searching for diagnoses Conflict learning Single-fault diagnosis Appendix Multiple-fault diagnosis 10/03/03 copyright Brian Williams, 2003

Summary: Model-based Diagnosis A failure is a discrepancy between the model and observations of an artifact. Diagnosis is symptom directed Symptoms identify conflicting components as initial candidates. Test novel failures by suspending constraints and testing consistency. Newly discovered conflicts further prune candidates. 10/03/03 copyright Brian Williams, 2003

Multiple Faults Occur APOLLO 13 Quintuple fault occurs (three shorts, tank-line and pressure jacket burst, panel flies off). Power limitations too severe to perform new mission.. Novel reconfiguration identified, exploiting LEM batteries for power. Swaggert & Lovell work on Apollo 13 emergency rig lithium hydroxide unit. courtesy of NASA APOLLO 13 10/03/03 copyright Brian Williams, 2003

Diagnosis identifies consistent modes 3/6/00 Diagnosis identifies consistent modes M1 M2 M3 A1 A2 A B C D E F G X Y Z Adder(i): G(i): Out(i) = In1(i)+In2(i) U(i): 3 10 2 2 12 3 3 Candidate = {A1=G, A2=G, M1=G, M2=G, M3=G} Candidate: Assignment to all component modes. 10/03/03 copyright Brian Williams, 2003

Diagnosis identifies All sets of consistent modes Adder(i): G(i): Out(i) = In1(i)+In2(i) U(i): 3 M1 X F 10 B A1 2 C 2 Y D G 12 3 M3 E Z 3 Diagnosis = {A1=G, A2=U, M1=G, M2=U, M3=G} Diagnosis D: Candidate consistent with model Phi and observables OBS. As more constraints are relaxed, candidates are more easily satisfied. Typically an exponential number of candidates. 10/03/03 copyright Brian Williams, 2003

Representing Diagnoses Compactly: Kernel Diagnoses ? A ? 3 M1 X F 10 B 2 A1 C 2 Y ? D G 3 12 E M3 Z 3 Kernel Diagnosis = {A2=U, M2=U} “Smallest” sets of modes that remove all symptoms Every candidate that is a subset of a kernel diagnosis is a diagnosis. 10/03/03 copyright Brian Williams, 2003

Generate Kernels From Conflicts {A1=G, M1=U, M2=U} conflict 1. {A1=U, A2=U, M1=U, M3=U} conflict 2 A1=U or M1=U or M2=U removes conflict 1. A1=U or A2=U or M1=U or M3=U removes conflict 2 Kernel Diagnoses = “Smallest” sets of modes that remove all conflicts 10/03/03 copyright Brian Williams, 2003

Generate Kernels From Conflicts A1=U or M1=U or M2=U removes conflict 1. A1=U or A2=U or M1=U or M3=U removes conflict 2 Kernel Diagnoses = {A1=U} “Smallest” sets of modes that remove all conflicts 10/03/03 copyright Brian Williams, 2003

Generate Kernels From Conflicts A1=U or M1=U or M2=U removes conflict 1. A1=U or A2=U or M1=U or M3=U removes conflict 2 Kernel Diagnoses = {M1=U} {A1=U} “Smallest” sets of modes that remove all conflicts 10/03/03 copyright Brian Williams, 2003

Generate Kernels From Conflicts A1=U or M1=U or M2=U removes conflict 1. A1=U or A2=U or M1=U or M3=U removes conflict 2 Kernel Diagnoses = {A2=U, M2=U} {M1=U} {A1=U} “Smallest” sets of modes that remove all conflicts 10/03/03 copyright Brian Williams, 2003

Generate Kernels From Conflicts 3/6/00 Generate Kernels From Conflicts A1=U or M1=U or M2=U removes conflict 1. A1=U or A2=U or M1=U or M3=U removes conflict 2 Kernel Diagnoses = {M2=U, M3=U} {A2=U, M2=U} {M1=U} {A1=U} “Smallest” sets of modes that remove all conflicts 10/03/03 copyright Brian Williams, 2003

Diagnosis by Divide and Conquer Given model Phi and observations OBS 1. Find all symptoms 2. Diagnose each symptom separately (each generates a conflict → candidates) 3. Merge diagnoses (set covering → kernel diagnoses) General Diagnostic Engine [de Kleer & Williams, 87] 10/03/03 copyright Brian Williams, 2003

Exploring the Improbable When you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sherlock Holmes. The Sign of the Four. 10/03/03 copyright Brian Williams, 2003

Conflict-Directed A*: Generating The Best Kernel A1=U, M1=U , M2=U Conflicts A1=U M1=U M2=U A2=U M1=U M3=U A1=U A1=U, A2=U, M1=U, M3=U A1=U M1=U M1=U  A2=U M2=U  M3=U Insight: Kernels found by minimal set covering Minimal set covering is an instance of breadth first search. 10/03/03 copyright Brian Williams, 2003

Conflict-Directed A*: Generating The Best Kernel A1=U, M1=U , M2=U Conflicts A1=U M1=U M2=U M1=U A1=U, A2=U, M1=U, M3=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. 10/03/03 copyright Brian Williams, 2003