Lecture # 15 & 16 PDF
Lecture # 15 & 16 PDF
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 1 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 2
Amelia Ritahani Ismail Amelia Ritahani Ismail
• Problem: For each of the following statements: • Problem: For each of the following statements:
• a) translate the sentence into a conceptual graph,
• a) translate the sentence into a conceptual graph, and
and
b) translate the conceptual graph in to predicate b) translate the conceptual graph in part b to
calculus. predicate calculus.
•
1. Bob gave Tia a book.
2. Tia read the book. • 1. Joe gave Jane a cellphone.
3. Tia liked the book. 2. Jane called Joe with a cellphone.
4. There are no white elephants. 3. Basketball players are tall.
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 3 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 4
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 5 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 6
Amelia Ritahani Ismail Amelia Ritahani Ismail
1
What are Expert System? The Nature of Expertise
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 7 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 8
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 11 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 12
Amelia Ritahani Ismail Amelia Ritahani Ismail
2
Examples: A Java Whale Watcher at
Acquired Intelligence Inc.
• http://www.aiinc.ca/demos/whale.shtml
Knowledge Representation and
Expert System using PROLOG
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 13 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 14
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 15 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 16
Amelia Ritahani Ismail Amelia Ritahani Ismail
Architecture of a typical expert system for a particular problem domain
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 17 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 18
Amelia Ritahani Ismail Amelia Ritahani Ismail
3
Overview of Expert System
Rule-Based Expert System
Technology
• Rule-based expert system represent problem-solving
knowledge as if.. then.. rules.
• Is one of the oldest techniques for representing
domain knowledge in an expert system.
• Definition: An expert system based on a set of rules
that a human expert would follow in diagnosing a
problem.
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 19 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 20
Amelia Ritahani Ismail Amelia Ritahani Ismail
The role of mental or conceptual models in problem solving
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 21 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 22
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 23 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 24
Amelia Ritahani Ismail Amelia Ritahani Ismail
4
:BETTER WAY:
Defining your own prolog operator notation
Type of operators
• :-op( 800, fx, if) • :-op( 800, fx, if): we • Infix operators
• :-op( 700, xfx, then). want to use if as an – xfx
F represents the operators
operator, whose X and y represent arguments
• :-op( 300, xfy, or). – xfy
precedence is 800 and – yfx Infix: operator in between two
• :-op( 200, xfy, and). fx means it’s a kind of arguments.
prefix operator • Prefix operators
• :-op( 700, xfx, – fx Prefix: only one arguments and
– fy operators precedes argument
then).then is an
operator, precedence • Postfix operators Postfix: only one argument and
700 and it’s a kind of – xf operator follows arguments
infix operator – yf
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 25 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 26
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 27 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 28
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 29 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 30
Amelia Ritahani Ismail Amelia Ritahani Ismail
5
Backward Chaining QUERIES..
is_true( P) :-
fact( P). • ?-is_true(leak_in_kitchen).
is_true( P) :- • ?-is_true(no_water_from_outside)
if Condition then P, % A relevant rule
is_true( Condition). % whose condition is true
is_true( P1 or P2) :-
is_true( P1)
;
is_true( P2).
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 31 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 32
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 33 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 34
Amelia Ritahani Ismail Amelia Ritahani Ismail
• Model-based: • Model-based:
Definition: An expert system based on fundamental Qualitative model-based reasoning includes:
A description of each component in the device.
knowledge of the design and function of an object.
A description of the device’s internal structure.
Such systems are used to diagnose equipment Diagnosis of a particular problem requires observations of the
problems. device’s actual performance, typically measurements of its
inputs and outputs.
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 35 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 36
Amelia Ritahani Ismail Amelia Ritahani Ismail
6
Model-Based and Case-Based Model-Based and Case-Based
• Case-based: • Case-based:
Definition: An AI problem solving technique that Case-based reasoning (CBR) uses an explicit
catalogs experience into "cases" and matches the database of problem solutions to address new
current problem to the experience. problem-solving situations.
These solutions may be collected from human
Another powerful strategy – reasoning from cases,
examples of past problems and their solutions. experts through the knowledge engineering
process or may reflect the results of previous
search-based successes or failures.
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 37 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 38
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 39 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 40
Amelia Ritahani Ismail Amelia Ritahani Ismail
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 41 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 42
Amelia Ritahani Ismail Amelia Ritahani Ismail
7
Expert Systems: then and now
Hybrid Design
(cont’d)
• The AI industry has shifted focus and stabilized (AAAI members
5500- 7000)
• Expert systems continue to save companies money
– IBM’s San Jose facility has an ES that diagnoses problems on disk
drives
– Pac Bell’s diagnoses computer network problems
– Boeing’s tells workers how to assemble electrical connectors
– American Express Co’s helps in card application approvals
– Met Life’s processes mortgage applications
• Expert Sytem Shells: abstract away the details to produce an
inference engine that might be useful for other tasks. Many are
available.
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 43 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 44
Amelia Ritahani Ismail Amelia Ritahani Ismail