0% found this document useful (0 votes)
51 views8 pages

Lecture # 15 & 16 PDF

The document discusses expert systems, defining them as computer programs that represent and reason with specialized knowledge to solve problems or give advice. It explains that expert systems derive their problem-solving power primarily from their knowledge bases rather than their reasoning methods. A variety of domains are listed that expert systems can be applied to, such as medicine, mathematics, engineering, and business.

Uploaded by

nahel abdallah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views8 pages

Lecture # 15 & 16 PDF

The document discusses expert systems, defining them as computer programs that represent and reason with specialized knowledge to solve problems or give advice. It explains that expert systems derive their problem-solving power primarily from their knowledge bases rather than their reasoning methods. A variety of domains are listed that expert systems can be applied to, such as medicine, mathematics, engineering, and business.

Uploaded by

nahel abdallah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

From previous lecture….

8 EXPERT SYSTEM Chapter 7

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

Conceptual Graph 15 minutes Conceptual Graph 15 minutes

• 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

What are Expert System? What are Expert System?


• “The first principle of knowledge engineering is that • Human experts are able to perform at a successful
the problem-solving power exhibited by an intelligent level because they know a lot about their areas of
agent’s performance is primarily the consequence of expertise.
its knowledge base, and only secondarily a • For example, a doctor uses his/her knowledge to
consequence of the inference method employed. diagnose fever of a patient.
Expert systems must be knowledge-rich even if they • He/she will use check the patient’s body temperature,
are methods-poor. “ observe whether there are any fever symptoms and in
• “The power resides in the knowledge.” the end will provide medications to cure the fever.

- EDWARD FEIGENBAUM, Stanford University

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

• In AI specific definition: • First, if the program consists knowledge.


– An Expert System is a computer program that • Second, that knowledge must be focused on
represents and reasons with knowledge of some specific domain.
specialists subject with a view to solving problems
or giving advice. • Lastly, that knowledge must be capable of
solving problems directly.

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

General Expert System categories:


The Nature of Expertise
• There are a wide
1. Interpretation – forming high-level conclusions from
range domains that 1. Medicine 6. Computer
collections of raw.
Science
an Expert System can 2. Prediction – projecting probable consequences of given
be used to solve 2. Mathematics 7. Business
situations.
problems. 3. Diagnosis – determining the cause of malfunctions in
3. Engineering 8. Law complex situations based on observable symptoms.
4. Design – finding a configuration and of system
4. Chemistry 9. Defense components that meets performance goals while
satisfying a set of design constraints.
5. Geology 10. Education 5. Planning – devising a sequence of actions that will
achieve a set of goals given certain starting conditions
and run-time constraints.
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 9 8/30/2006 CSC 3301- Semester 1 (2006-2007) - 10
Amelia Ritahani Ismail Amelia Ritahani Ismail

General Expert System categories: What is the State of the Art?

7. Instruction – assisting in the education process in • Someone (your expert) must:


technical domains. 1. Be able to perform the task
8. Control – governing the behavior of a complex 2. Know how they perform the task
environment. 3. Be able to explain how they perform the task
4. Have the time to explain how they perform the task
5. Be motivated to cooperate in the enterprise

Reference: Peter Jackson, “Introduction to Expert System”,


Third Edition, Addisson Wesley, 2004

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

Overview of Expert System Overview of Expert System


Technology Technology
• The user interacts with the system through a user interface.
• The heart of the expert system is the knowledge base which
contains the knowledge of a particular application domain.
• The knowledge base contains both general knowledge base and
case specific information.
• The inference engine applies the knowledge to the solution of
actual problems.

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

Overview of Expert System Overview of Expert System


Technology Technology
• Researches have developed guidelines to
4. The problem domain is well structured and does
determine whether a problem is appropriate for not require commonsense reasoning.
expert solution:
1. The need for the solution justifies the cost and effort of
5. The problem may not be solved using traditional
building an expert system. computing methods.
2. Human expertise is not available in all situations where it 6. Cooperative and articulate experts exist.
is needed. 7. The problem is of proper size and scope.
3. The problem may be solved using symbolic reasoning.

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

:Rule-Based Expert System: The knowledge base: prolog


(using prolog own syntax for rules )
Rule 1: if hall_wet.
hall_wet and kitchen_dry
then
A knowledge base to diagnose leaks bathroom_dry. PROLOG FACTS
leak_in_bathroom
Rule 2: if In water appliances in a house window_closed.
hall_wet and bathroom_dry
then
problem in the kitchen.
Rule 3: if leak_in_bathroom:- hall_wet, kitchen_dry.
window_closed or no_rain AND / OR GRAPH ?
then
no_water_from_outside
problem_in_kitchen:- hall_wet, bathroom_dry.
Rule 4: if
problem_in_kitchen andno_water_from_outside
no_water_from_outside:- window_closed; no_rain.
then
leak_in_kitchen
leak_in_kitchen:- problem_in_kitchen,
no_water_from_outside.

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

The knowledge base: prolog Disadvantages…


• Check the hypothesis • This syntax may not be the most suitable for
?-leak_in_kitchen.
Yes a user unfamiliar with prolog. (the expert
• Changing the pieces of evidence (the prolog facts): need to read, specify and modify rules)
hall_wet.
bathroom_dry. • The KB is not syntactically distinguishable
no_rain. from the rest of the pogram.
• Check the hypothesis
?-leak_in_kitchen.
No

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

Modifying your knowledge base Adding Facts


if
:-op( 800, fx, if)
:-op( 700, xfx, then). then
hall_wet and kitchen_dry fact(hall_wet).
:-op( 300, xfy, or). leak_in_bathroom.
:-op( 200, xfy, and). if
fact(bathroom_dry).
hall_wet and bathroom_dry
then fact(window_closed).
problem_in_kitchen.
if
window_closed or no_rain
then
no_water_from_outside.
if
problem_in_kitchen and
no_water_from_outside
then
leak_in_kitchen.

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

Forward & Backward Chaining

Hall_wet • Backward Chaning we start with hypothesis


FORWARD (such as leak in the kitchen) and work
backwards.
Leak_in_bathroom
• Forward chaining does not start with
hypothesis, but with some confirmed findings.
BACKWARD
– Once we have observed that the hall is wet and
Kitchen_dry
the bathroom is dry, then we conclude that there
is a problem in the kitchen.
– If CONDITION then CONCLUSION

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 and P2) :-


is_true( P1),
is_true( P2).

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

Operators precedence Model-Based and Case-Based

• Operators name are atoms • Human expertise is an extremely complex


• Operator’s precedence must be in some range amalgamation of theoretical knowledge .
which depends on the implementation. • Through years of experience, human experts
• We will assume that the range is between 1 to develop very powerful rules for dealing with
1200 commonly encountered situations.

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 and Case-Based Model-Based and Case-Based

• 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

Model-Based and Case-Based Hybrid Design


• Case-based:
 Shares a common structure. For each new • An important area of research and application is the
problem they: combination of different reasoning models.
1. Retrieve appropriate cases from memory. • With a hybrid architecture two or more paradigms
2. Modify a retrieved case so that it will apply to the are integrated to get a cooperative effect where the
current situation. strengths of one system can compensate for the
3. Apply the transformed case.
weakness of another.
4. Save the solution, with a record of success or failure,
for future use.

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

Hybrid Design Hybrid Design

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

ES examples - MYCIN (cont’d) :Rule-Based Expert System:

• Starting rule: “If there is an organism


requiring therapy, then, compute the possible
therapies and pick the best one.”
• It first tries to see if the disease is known.
Otherwise, tries to find it out.

8/30/2006 CSC 3301- Semester 1 (2006-2007) -


Amelia Ritahani Ismail
45 8/30/2006 The and/or graphCSC
searched in the
3301- Semester car diagnosis
1 (2006-2007)
Amelia Ritahani Ismail
- example, with the46
conclusion of Rule 4 matching the first premise of Rule 1

• Based on the and-or graph, create your


knowledge base representation using
PROLOG. Include the following to your
programs
– GIVE NAME FOR your PROBLEM (X)
– User-defined operators
– Your own facts
– If-then rules
– BACKWARD CHAINING
– Sample queries
8/30/2006 CSC 3301- Semester 1 (2006-2007) - 47
Amelia Ritahani Ismail

You might also like