Part5.3 Knowledge-Based Systems
Part5.3 Knowledge-Based Systems
3 Knowledge-based Systems:
Rule-based Knowledge Systems
Knowledge-based Systems
(Expert Systems)
1
Rule-based systems:
Overview:
Deductive versus Reactive rule-systems
“Zookeeper”: a deductive rule-system
“Bagger”: a reactive rule-system
Procedures for inference in Rule-systems
Explanation facilities
2
Deductive Rule-
Systems:
Consist of rules of the form:
Winston’s notation:
Know Deduced
facts facts
AND gate 3
Basics for Deduction
Systems:
true true
assertions facts
false
The working memory = a collection of assertions
Know Deduced
facts facts
New
Hypothesis
hypothesis
4
ZOOKEEPER:
Winston’s simplification of MYCIN.
Robby robot attempts to identify animals in the ZOO.
Z1 If ?x has hair
Then ?x is a mammal
Z2 If ?x gives milk
Then ?x is a mammal
Z3 If ?x has feathers
Then ?x is a bird
Is a mammal
First rule fires
Has
hair
Z1
Fourth rule
Has hair Is a mammal
Z1
Second rule tried
Eats meat Is a carnivore
Z5
First rule used
Has a tawny color
Z9
Has dark spots Is a cheetah
9
Old backward/forward
choice:
Mostly: the branching factor argument.
Winston terminology: “fan out”, “fan in”
Also:
Are you able to gather more facts?
If not: just forward chain to see what you can
get as conclusions
If you are only interested in a specific question:
Is it a carnivore?
– Backward better
10
Example: Mycin
- Diagnoses Bacterial Infections of the blood.
How to choose antibiotic treatment, without knowing
exactly which organism?
11
Excerpt of sample
session:
> Male or female?
Male.
> Age?
55.
> Have you obtained positive cultures indicating general type?
Yes.
> What type of infection is it?
Primary bacteremia.
> When did symptoms first appear?
May 5.
> From where was the positive culture taken?
From the blood.
>…
12
Mycin (cont.)
About 500 If-Then rules .
Can recognize about 100 causes of infections.
Example rule:
If ?x ’s type is primary bacteremia
the suspected entry point of ?x is the gastrointestinal tract
the site of the culture of ?x is one of the sterile sites
Then there is evidence that ?x is bacteroides
13
Query-the-user facility:
Where do the questions come from? > Age?
55.
The query-the-user rule:
Any system includes a rule of the type
If query-the-user( ?x )
Then ?x
Here ?x could be any predicate
If we want to establish ?x and there is no information on ?x in the
rule-base, ask the user about ?x
14
Reactive Rule-Systems:
Consist of rules of the form:
15
BAGGER:
Winston’s simplification of XCON.
Robby robot attempts to help bagging in a supermarket.
Use a
database
of objects
16
Bagger’s Working
Memory:
Current step is “Check order”
17
Bagger rules:
B1 If step is “check order”
and patato chips are in not bagged
and Pepsi is NOT in not bagged
Then suggest to add Pepsi to not bagged
19
Bagger (cont.):
Current step is “bag the large items” Working memory
Current bag is Bag_1(empty)
Not bagged are bread, glop, granola (2),
ice cream, patato chips, Pepsi
21
Example: XCON
- System for Configuration of Computer Systems.
How to set up all components of a big main frame
computer system.
22
XCON (cont.)
About 10000 If-Then rules .
Can deal with about 200 components of VAX
Example rules:
systems.
If context is doing layout and assigning power supply
an sbi module has been put in a cabinet
the position the sbi module occupies is known
there is space available for a power supply
there is no available power supply
the voltage and frequency of components is known
Then add an appropriate power supply
24
Mixing Forward and
Backward Reasoning:
Many commercial systems promote their ability to provide
both forward and backward reasoning (together) on the
same set of rules.
25
One way to combine
forward and backward:
Assume that by forward reasoning we derived:
the facts a, b and d.
If there is a rule:
If a and b and c and d
Then e
then it may be a good idea to switch to backward reasoning to try to prove c (and
thus conclude e)
BUT: VERY hard to control this and completeness becomes VERY obscure.
26
Explanation facilities:
Expert Systems are supposed to provide explanations to
convince the user that their proposed conclusions are
reasonable.
27
All these systems
require FULL knowledge
of the world !
What if information is Missing?
Information is Unclear?
Information is Vague?
Information is Contradicting?
Information Only probabilistically available?
28
Q& A
Thank you.