CSCI3406 Fuzzy Logic and Knowledge Based Systems AI - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

CSCI3406 Fuzzy Logic and Knowledge Based Systems AI

Description:

If that's the case, corn grown on it will rot. Therefore the problem is rot caused by low nitrogen. Backward chaining. More realistically, ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 35
Provided by: cseD1
Category:

less

Transcript and Presenter's Notes

Title: CSCI3406 Fuzzy Logic and Knowledge Based Systems AI


1
CSCI3406 Fuzzy Logic and Knowledge Based Systems
(AI)
Inferencing
2
Introduction
  • Inferencing is the 3rd stage of a KBS design and
    often linked to reasoning
  • Inferencing is the process of deriving correct
    appropriate answers and drawing correct
    conclusions for problems from knowledge that is
    maintained in a KBS
  • There are different types of Inferencing
  • In this lecture we cover some of the most popular
    and commonly used types of Inferencing

3
Topics of Discussion
  • Basic Components
  • Backward chaining
  • Forward chaining
  • Opportunistic Inferencing
  • Logical Inferencing
  • Closed World Assumption (CWA)
  • Logical contradiction
  • Other techniques

4
Basic Components
  • An Expert System can be described as
  • Expert system
  • inference engine
  • knowledge base
  • working memory
  • (external) data

5
Basic Components The knowledge base
  • The knowledge base contains the know-how of the
    human experts in a particular field. Such
    know-how is of two types
  • Facts - "deep knowledge".
  • Heuristics - "surface knowledge".  
  • Knowledge base is derived and implemented by
    means of knowledge acquisition and representation.

6
Basic Components The knowledge base Heuristics
  • Heuristic - a strategy to find the solution to a
    problem which is not guaranteed to work.
  • One sort of heuristic usually gives you the right
    answer but sometimes gives you the wrong answer
  • Another sort gives you an answer which isnt 100
    accurate.

7
Basic Components The knowledge base Heuristics
  • Humans use heuristics a great deal in their
    problem solving. Of course, if the heuristic does
    fail, it is necessary for the problem solver to
    either pick another heuristic, or know that it is
    appropriate to give up.
  • The rules, found in the knowledge bases of
    rule-based systems, are very often heuristics.

8
Basic Components The inference engine
  • The inference engine has two primary tasks
  • Inference the inference engine employs reasoning
    to examine existing facts and rules. It also
    updates stored knowledge and draws conclusions.
  • Control the inference engine's mechanism for
    controlling the search of the knowledge base.

9
Basic Components Working memory
  • An area of the Computer's RAM reserved for
    storing information regarding the current status
    of the problem e.g. conclusions reached so far,
    data input by the user and details of items
    within the knowledge base which have been checked.

10
Basic Components External Data Source
  • Some expert systems receive input data from
    external sources other than the user. Common
    forms of this data - known as sensor data
    include some biomedical test results (e.g., red
    cell count in blood), audible sounds and visual
    images. The system interprets the data and makes
    inferences based on that data.

11
Inference in a KBS
  • Two control strategies
  • forward chaining
  • backward chaining

12
Backward chaining
  • Backward chaining from the conclusion to the
    facts. Sometimes called a goal-driven approach
  • To chain backward, match a goal in working memory
    against 'conclusions' of rules in the rule-base.
    We start from an expectation of what is to happen
    (hypothesis), then seek evidence that
    supports (or contradicts) your expectation.
  • When one of them fires, this is liable to produce
    more goals.
  • So the cycle continues.
  • Often this entails formulating and
    testing intermediate hypotheses (or
    sub-hypotheses).
  • Backward chaining may use either depth first and
    breadth first search algorithms

13
Backward chaining
  • Example
  • IF
  • Customer wants comfort and Customer has
    enough_money
  • THEN
  • Salesperson recommends Rolls Royce
  •  And assume you are the sales person, and your
    question is do I recommend Rolls Royce to this
    customer or not?

14
Forward chaining
  • Forward chaining working from the facts to a
    conclusion. Sometimes called a data-driven approac
    h.
  • In this approach we start from available
    information as it comes in, or from a basic idea,
    then try to draw conclusions.
  • The computer analyses the problem by looking for
    the facts that match the IF portion of its
    IF-THEN rules.

15
Forward chaining
  • If we take the sales person example again,
    forward chaining would be the approach to use if
    the question was the customer wants comfort and
    has enough money, what shall I recommend to him?

16
Backward and Forward chaining
  • Here are two rules
  • If corn is grown on poor soil, then it will rot.
  • If soil hasn't enough nitrogen, then it is poor
    soil.
  • Forward chaining This soil is low in nitrogen
    therefore this is poor soil therefore corn grown
    on it will rot.
  • Backward chaining This corn is rotten therefore
    it must have been grown on poor soil therefore
    the soil must be low in nitrogen.

17
Forward chaining
  • More realistically,
  • the forward chaining reasoning would be there's
    something wrong with this corn. So I test the
    soil. It turns out to be low in nitrogen. If
    thats the case, corn grown on it will rot.
    Therefore the problem is rot caused by low
    nitrogen.

18
Backward chaining
  • More realistically,
  • the backward chaining reasoning would be there's
    something wrong with this corn. Perhaps it is
    rotten if so, it must have been grown on poor
    soil if so, the soil must be low in nitrogen. So
    test for low nitrogen content in soil, and then
    we'll know whether the problem is rot.

19
Forward backward chaining
  • The choice of strategy depends on the nature of
    the problem.
  • Assume the problem is to get from facts to a goal
    (e.g. symptoms to a diagnosis).

20
Forward backward chaining
  • Backward chaining is the best choice if
  • The goal is given in the problem statement, or
    can sensibly be guessed at the beginning of the
    consultation
  • or
  • The system has been built so that it sometimes
    asks for pieces of data (e.g. "please now do the
    gram test on the patient's blood, and tell me the
    result"), rather than expecting all the facts to
    be presented to it.

21
Forward backward chaining
  • Backward chaining
  • This is because (especially in the medical
    domain) the test may be
  • expensive,
  • or unpleasant,
  • or dangerous for the human participant
  • so one would want to avoid doing such a test
    unless there was a good reason for it.

22
Forward backward chaining
  • Forward chaining is the best choice if
  • All the facts are provided with the problem
    statement
  • or
  • There are many possible goals, and a smaller
    number of patterns of data
  • or
  • There isn't any sensible way to guess what the
    goal is at the beginning of the consultation.

23
Forward backward chaining
  • Note also that
  • a backwards-chaining system tends to produce a
    sequence of questions which seems focussed and
    logical to the user,
  • a forward-chaining system tends to produce a
    sequence which seems random unconnected.
  • If it is important that the system should seem to
    behave like a human expert, backward chaining is
    probably the best choice.

24
Forward backward chaining
  • Some systems use mixed chaining, where some of
    the rules are specifically used for chaining
    forwards, and others for chaining backwards. The
    strategy is for the system to chain in one
    direction, then switch to the other direction, so
    that
  • the diagnosis is found with maximum efficiency
  • the system's behaviour is perceived as "human".

25
Backward and Forward
  • Both backward and forward chaining techniques
    have their advantages and disadvantages and are
    often used in permutations.
  • Compare advantages and disadvantages of both
    techniques.
  • When this happens, a technique that is called
    opportunistic Inferencing is used.

26
Opportunistic Inferencing
  • The idea behind opportunistic Inferencing is that
    some asserted facts in the working memory might
    lead to the firing of set of rules, which leads
    to speed up the Inferencing process.
  • The Inferencing engine in FUZZYCLIPS can be used

27
Logical Inferencing
  • Logical Inferencing, which is sometimes referred
    to as problem solver or automated proof system,
    uses the logical representation to derive or
    entail conclusions.
  • Logic Inferencing is usually computationally
    complicated. Therefore, several assumptions are
    used in logic Inferencing.
  • The most famous assumption that is often used in
    logic-based models and systems is Closed World
    Assumption (CWA).

28
Closed World Assumption (CWA)
  • CWA assumes that the logical system is closed and
    therefore there are no possible external effects
    to change the composition of this system.
  • As a result anything that cannot be proved to be
    true in the model we can assume that it is be
    false.
  • This sometimes leads to difficulties, for an
    example, missing symptoms of an illness does not
    necessary that the patient does not have that
    illness. However, that is exactly what the system
    may conclude using the closed world assumption.

29
More Logical Inferencing
  • There are several logic-based models e.g.
    default logic, non-monotonic logic and situation
    calculus.
  • The logic-models are often very complicated to
    be translated into computable models.
  • We always seek that our models are sound and
    complete.
  • What do you think we mean by soundness and
    completeness?

30
Logical contradiction
  • One of the weaknesses, beside complexity, is that
    the logic-based systems suffer from is usually
    Logical Contradiction.
  • Logical contradiction happens when the system,
    for example, allows us to entail X and not X at
    the same time. Sometimes logical contradiction is
    defined within the context of KBS to be the case
    in which the system reaches a conclusion that is
    known by the user to be false.

31
Other Inferencing techniques
  • There are several Inferencing techniques may be
    used depending on the system domain. Here are
    some of the commonly used techniques
  • Model-based reasoning.
  • Case-based reasoning.
  • Monotonic and non-monotonic reasoning.
  • Truth maintenance systems.
  • Hypothetical reasoning.
  • Analogical reasoning.
  • Procedural reasoning.
  • Hierarchical reasoning.
  • Inductive and deductive reasoning.
  • Pattern matching.

32
Conclusion
  • In this lecture we looked at the 3rd aspect of
    knowledge based systems, namely, Inferencing.
  • There are different types of Inferencing (e.g.,
    backward forward chaining/ inferencing and
    logical inferencing)
  • Search algorithms are often used in Inferencing.

33
References
  • Lecture notes part 2.
  • E. Turban, Expert Systems and Applied Artificial
    Intelligence. New York Macmillan Publishing
    Company, 1992.

34
Next Steps
  • Next
  • Modelling uncertainty
Write a Comment
User Comments (0)
About PowerShow.com