Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extensions to FOL. When the form of the statements provides useful information Rule-based systems Frame systems When FOL isn’t enough Default reasoning.

Similar presentations


Presentation on theme: "Extensions to FOL. When the form of the statements provides useful information Rule-based systems Frame systems When FOL isn’t enough Default reasoning."— Presentation transcript:

1 Extensions to FOL

2 When the form of the statements provides useful information Rule-based systems Frame systems When FOL isn’t enough Default reasoning and circumscription Reasoning with uncertainty Degrees of membership (fuzzy logic) Reasoning about belief

3 What Does  Really Mean? HasChildren  MotherA  Bdefinition of B Raining  Wet A  BA causes B Fever  InfectionA  BA is a symptom of B B causes A LikeBig  GetHummerA  Bwhenever A occurs, B usually does too So how should we reason with these very different things?

4 Rule-Based Systems The logic: a  b is equivalent to:  a  b So, given:fever  infection  fever  infection fever Conclude: infection Given: fever  infection  fever  infection  infection Conclude:  fever But are these two inferences equally useful?

5 An Example for a Design Task: XCON (1982) From XCON (1982): If: the most current active context is distributing massbus devices, and there is a single-port disk drive that has not been assigned to a massbus, and there are no unassigned dual-port disk drives, and the number of devices that each massbus should support is known, and there is a massbus that has been assigned at least one disk drive that should support additional disk drives, and the type of cable needed to connect the disk drive to the previous device on the massbus is known Then: assign the disk drive to the massbus.

6 An Example for a Diagnosis Task: Mycin (1975) If: (1) the stain of the ogranism is gram-positive, and (2) the morphology of the organism is coccus, and (3) the growth conformation of the organism is clumps Then: there is suggestive evidence (0.7) that the identity of the organism is staphylococcus.

7 Simple Examples Today eXpertise2Go: http://www.expertise2go.com/http://www.expertise2go.com/ AcquiredIntelligence: http://www.aiinc.ca/demos/http://www.aiinc.ca/demos/ (whales, graduate school) DecisionScript: http://www.vanguardsw.com/decisionscript/Examples.htm http://www.vanguardsw.com/decisionscript/Examples.htm

8 Implementation of Rule-Based Systems Prolog: The KB:reply(sampcor) :- a, b A query:?- reply(X) Use backward chaining to answer the question. Expert system shells: Typically combine methods If (1) the suggested technique category is correlation and regression analysis, and (2) one of the values of the desired correlation/regression result is a measure of the degree to which 2 variables move together Then the suggested analysis approach is to calculate a sample correlation coefficient If a  b  reply(sampcor)

9 Expert System Shells Some rules are best used in forward chaining mode. For example, data collection and reasoning from symptoms. Other rules (e.g., how to achieve goals) are best used in backward chaining mode. All these rules may also want to exploit other kinds of knowledge, like default information associated with classes of objects:

10 Inheritance, Again birds canfly T ISA ISA robinsostriches canfly F Instance-of Instance-of TweetyRichy Scooter is a bird. Can Scooter fly?

11 Inheritance Objects inherit from their parents: Scooter inherits from Bird the facts that: its birthmode is eggs, and it has two wings Should Scooter inherit from Bird the fact that it can fly?

12 Default Reasoning The importance of default reasoning Default reasoning is nonmonotonic. Techniques for default reasoning Inheritance The closed world assumption Circumscription Maintaining consistency in nonmonotonic reasoning systems

13 Default Reasoning - Examples Inheritance from superclasses:  x bird(x)  canfly(x) UNLESS ostrich(x) The “normal” case:  x bird(x)  canfly(x) UNLESS (broken-wing(x)  sick(x)  in(oil-slick, x)) The closed world assumption: can cats fly? Abduction: infection  feverGiven fever, can we conclude infection?

14 Default Reasoning in Nonmonotonic Inference in FOL systems is monotonic: The addition of any new assertion that is consistent with the KB will never cause a formula that was previously true to become false. Default reasoning may be nonmonotonic: Birds can fly. Tweety is a bird.  Tweety can fly. But what if we now learn: Tweety is an ostrich. or Tweety has a broken wing.

15 Implementing Inheritance birds canfly T ISA ISA robinsostriches canfly F Instance-of Instance-of TweetyRichy If we implement inheritance procedurally, we don’t have to write the UNLESS clauses. We assume Tweety isn’t an ostrich.

16 The Closed World Assumption The CWA: Any ground atomic sentences that are not asserted to be true in the KB can be assumed to be false. We make the closed world assumption for two reasons: We have to. In any complex domain, there may be a huge number of possible facts and there isn’t time to mention each of them explicitly: A database of classes mentions the ones that are offered. An inventory database mentions all the objects on hand. An airline scheduling system assumes that it will be told if the power is out or the terminal has burned down or is held by terrorists or there is a storm. It is consistent with felicitous human communication.

17 Implementing the CWA: Negation as Failure A common way to implement the CWA: Interpret failure to prove p as a proof of  p. Example:  hasonhand(x)  uses(x)  mustorder(x) How do we prove  hasonhand(x)?

18 Circumscription  x bird(x)  canfly(x) UNLESS (broken-wing(x)  sick(x)  in(oil-slick, x)) Is different from:  x bird(x)   broken-wing(x)   sick(x)   in(oil-slick, x)  canfly(x) Or:  x bird(x)   adult(x)  withmother(x) One way to implement this is to create the predicate Abnormal:  x bird(x)  canfly(x) UNLESS Abnormal(x) (broken-wing(x)  sick(x)  in(oil-slick, x))  Abnormal(x)

19 Circumscription Then we circumscribe Abnormal, i.e., we prefer models in which Abnormal is true of the smallest possible number of individuals consistent with the rest of the KB. But what happens if we are told just: bird(Tweety)and then we conclude canfly(Tweety) Then we are told: broken-wing(Tweety) How do we undo the conclusion canfly(Tweety)?

20 Abbott, Babbitt, and Cabot

21 Truth Maintenance Systems The basic idea: Associate with each assertion one or more justifications. Believe any assertion with at least one valid justification. Each justification is composed of two parts: An IN-list An OUT-list We will define the operation of a TMS that operates as a service to a separate reasoning system. The TMS doesn’t make choices. It is just a bookkeeper.

22 The Structure of a Justification

23 Before Alibis

24 Abbott’s Situation, with Alibi

25 Babbitt’s Situation

26 Cabot’s Situation

27 The Big Picture

28 New Facts Come In

29 Deciding How to Resolve the Conflict

30 Abduction Examples: infection  fever measles  spots raining  wetsidewalks If given: fever, can we conclude infection? spots, can we conclude measles? wetsidewalks, can we conclude raining?

31 Uncertainty and Fuzziness Degrees of truth John is tall. John is very tall. Probability of truth John is in Austin (p =.6) Coin is heads (p =.5) Certainty of belief John is in Austin (c =.2)a wild guess Coin is heads(c = 1)sure it’s 50/50

32 When Must We Deal with Uncertainty? Diagnosis: Observe: spots, fever, headache. What’s wrong with the patient? Observe: clothes are wrinkled and hot. What’s wrong with the dryer? Interpretation: Speech understanding Language understanding Image understanding Data interpretation Planning: If I turn the steering wheel, where will the car go?

33 Probabilistic Reasoning P(strep) = x (the probability that a random person has strep right now) P(staph) = y (similar) Suppose that we can use the same drug in either case, so we want to know P(strep  staph) =

34 Probabilistic Reasoning P(strep) = x (the probability that a random person has strep right now) P(staph) = y (similar) Suppose that we can use the same drug in either case, so we want to know P(strep  staph) = P(strep) + P(staph) - P(strep  staph)

35 Probabilistic Reasoning Suppose There are Three Factors P(a  b  c) = P(a) + P(b) + P(c) - P(a  b) - P(a  c) - P(b  c) +P(a  b  c) P(a  b  c) = P(a  b  c) - P(a) - P(b) - P(c) + P(a  b) + P(a  c) + P(b  c)

36 Conditional Probability P(measles  spots) = P(measles | spots) P(spots) definition P(measles  spots) = P(spots | measles) P(measles) P(measles | spots) = P(measles  spots) definition P(spots) P(measles | spots) = P(spots | measles)  P(measles) Bayes Rule P(spots)

37 Examples from Diagnosis and Interpretation P(measles | spots) = P(spots | measles)  P(measles) P(spots) P(word x | sound y) = P(sound y | word x)  P(word x) P(sound y) Word = Argmax(P(sound y | word x)  P(word x)) x

38 Naïve Bayes Classifier What if Multiple Observations Are Available? P(measles | spots  fever) = P(spots  fever | measles)  P(measles) P(spots  fever) Assume spots and fever are independent: = P(spots  fever | measles)  P(measles) P(spots  fever) = P(spots|measles)  P(fever | measles)  P(measles) P(spots)  P(fever) Disease = Argmax(P(spots|x)  P(fever |x)  P(x) ) x

39 Not Quite So Naïve Bayes Classifier Comparing chicken pox (pox) to measles: P(measles | spots  fever) = P(spots  fever | measles)  P(measles) P(spots  fever) Assume spots and fever are independent given measles or pox and measles and pox are independent: = P(spots|measles)  P(fever | measles)  P(measles) P(spots  fever) = P(spots|measles)  P(fever | measles)  P(measles) P(spots|measles)*P(fever|measles)*P(measles) + P(spots|pox)* P(fever|pox)*P(pox) Disease = Argmax(P(spots|x)  P(fever |x)  P(x) ) x

40 Learning Naïve Bayes Classification An important aspect of naïve Bayes classification is that a classifier can be learned. Where do numbers like p(spots | measles) come from? Answer: patientdiagnosisfevercoughspotssore throatsneezesachy 1MeaslesYes No Yes 2MeaslesYesNoYesNo Yes 3MeaslesYesNo 4ChickenpoxYesNoYes No 5ChickenpoxYesNoYesNo

41 Various ad hoc Approaches Unfortunately, it often happens that we don’t have all the joint probabilities required to compute true probabilities for our conclusions. So a variety of approximate methods are used. http://www.expertise2go.com/webesie/tutorials/Inference/Conf idence1.htm


Download ppt "Extensions to FOL. When the form of the statements provides useful information Rule-based systems Frame systems When FOL isn’t enough Default reasoning."

Similar presentations


Ads by Google