Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
December 2010
Lecture 12: Knowledge Representation and Reasoning Part 3 (Rule based Systems)
Preview:
So far, we have learned how to represent knowledge in a relatively declarative, static way (as a bunch of things that are true) via PL, Semantic Nets or Frames. Here, we will learn how to represent knowledge in terms of a bunch of rules that tell you what you should do or what you could conclude in different situations.
KR can be classified into 3 categories : 1. Logic-based representation ()
Propositional Logic Semantic Networks, Frames
This lecture
3
Preview: (cont.)
These rules can be called Production Rules Expert systems that use a knowledge base consisting of production rules are called rule-based systems that 1) can express heuristic knowledge Heuristics vs. rigid rules Heuristic: A rule of thumb; a guideline. Most domain knowledge is in the form of heuristics, rather than rigid rules Ex: , rather than: > 10 =
241-320 Design Architecture & Engineering for Intelligent System
Preview: (cont.)
2) Can capture a domain experts knowledge in propositional, qualitative form Procedural vs. propositional Most programming languages are procedural: first do this, then this, then this Most human expert knowledge is propositional: If A is true, then B is true So, conventional programming languages are not necessarily the most intuitive way to represent domain knowledge.
241-320 Design Architecture & Engineering for Intelligent System
Preview: (cont.)
3) Can capture a domain experts knowledge in propositional, qualitative form Quantitative vs. qualitative Humans tend to represent their knowledge qualitatively, e.g. John is tall, but Jim is taller. As opposed to quantitative: Johns height is 65. Jims height is 68. So, probably a good idea to represent expert knowledge that way.
Knowledge Representation and Reasoning - part 3 (Rule-based)
Preview: (cont.)
4) Can separate the knowledge from the reasoning (inference) and from the specific facts 5) easy to understand (i.e. `knowledge' is visible). Reasoning + knowledge + facts Human expertise typically breaks down into: Ability to reason Knowledge about the domain (e.g. migraines) Facts about the particular situation (e.g. this patients symptoms) => Able to Explan the reasoning (e.g. Why do you think I have a
migraine? Well, because you have a frequent, intense pain in ..)
241-320 Design Architecture & Engineering for Intelligent System
Outline
Rule-Based Systems Production Rules vs. Logic Advantages & disadvantages Visualising the rule base Reasoning with a rule base Forward chaining Backward chaining
Rule-Based Systems
In Logic (and semantic nets) we represent knowledge in a declarative, static way - as some facts and rules that are true. Rules in Logic say what is TRUE when some conditions are given. Rule-based systems are based on rules that say what to do, given various conditions. IF <this is the case> THEN <do this> A special engine will take control when rules are invoked.
241-320 Design Architecture & Engineering for Intelligent System
10
11
12
13
easy to understand the knowledge `content'. explanation for the reasoning is easily shown i.e. a list of which rules fired (and in which order) during reasoning. maintenance (or modification) is easy, provided the rule base structured well. uncertainty can incorporated into the knowledge base.
Disadvantages (or limitations)
rule bases can be very large (thousands of rules) rules may not reflect the actual decision making the only structure in the KB is through the rule chaining
241-320 Design Architecture & Engineering for Intelligent System
14
Outline
Rule-Based Systems Production Rules vs. Logic Advantages & disadvantages Visualising the rule base Reasoning with a rule base Forward chaining Backward chaining
15
A logical AND between any two or more rule clauses is shown by joining the arcs. If there is no join then a logical OR is assumed. To simplify the structure of the graph, the nodes will be represented abstractly [using letters etc].
241-320 Design Architecture & Engineering for Intelligent System
16
goal
17
18
Outline
Rule-Based Systems Production Rules vs. Logic Advantages & disadvantages Visualising the rule base Reasoning with a rule base Forward chaining Backward chaining
19
20
21
J K
22
Forward chaining:
Advantages & DisAdvantage
Good for answering What is the situation? kind of questions (e.g. What kind of animal is this?) Fires a lot of rules, and generates a lot of facts that might be irrelevant to the problem
23
24
The graph clearly shows that fact D is root of the tree. Hence, the objective is to determine this fact. Note also that the leaf nodes (A11, A12, A21, A22, A3, B1, B2, C1, C21, C22, C3) represent `facts' that cannot be inferred from the rule base but instead have to be 'asked for' (in other words they are inputs)
241-320 Design Architecture & Engineering for Intelligent System
25
Applications
Backward chaining systems have been fairly widely used in E.g., medical expert systems, where start with set of hypotheses on possible diseases - try to prove each one, asking additional diagnostic questions when fact is unknown.
26
Backward chaining:
Advantages & DisAdvantage
Efficient way to prove or disprove a particular hypothesis. Sometimes more efficient with a small set of hypotheses Less efficient than forward chaining if large number of hypotheses
27
28
29
30