You are on page 1of 22

INT4204

INTELLIGENT SYSTEMS
KNOWLEDGE REPRESENTATION
AND EXPERT SYSTEM
EXPERT SYSTEM
Topic & Structure of The
Lesson
•Why representation
•Production Rule
•Factor Table

SLIDE ‹2› OF 9
Expert System Life
Cycle

SLIDE 3 OF 9
Knowledge
Acquisition
•Knowledge acquisition is the process of extracting, structuring and
organizing knowledge from a source, usually human experts, so it can
be used to build an ES.
•There are 3 main topic areas central to knowledge acquisition that
require consideration in all ES projects.
1. Domain must be evaluated to determine if the type of knowledge in the
domain is suitable for an ES.
2. The source of expertise must be identified and evaluated to ensure that
the specific level of knowledge required by the project is provided.
3. If the major source of expertise is a person, the specific knowledge
acquisition techniques and participants need to be identified.

SLIDE 4 OF 9 4
Knowledge
Acquisition
Knowledge Acquisition Technique
1. Observe the person solving real problems.
2. Through discussions, identify the kinds of data, knowledge and procedures
required to solve different types of problems.
3. Build scenarios with the expert that can be associated with different problem
types.
4. Have the expert solve a series of problems verbally and ask the rationale behind
each step.
5. Develop rules based on the interviews and solve the problems with them.
6. Have the expert review the rules and the general problem solving procedure.
7. Compare the responses of outside experts to a set of scenarios obtained from
the project's expert and the ES.

SLIDE 5 OF 9 5
Knowledge
Representation
1. This is on the second step on an expert system life cycle.
2. Knowledge from the domain expert will be changed into any one of
knowledge representation types - Knowledge Engineer
3. Help the programmer understand better and easy to code in the
knowledge
Knowledge
Representation
Production rules
It is the most popular form of knowledge representation.

IF THEN

antecedent consequent

situation action

premise conclusion
Rule-based reasoning:
rules
• A rule-based system, therefore, either
– identifies a pattern and draws conclusions about what it
means,
or
– identifies a pattern and advises what should be done
about it,
or
– identifies a pattern and takes appropriate action.

SLIDE 9 OF 9
Production rules
Typical rules in a rule-based expert system:

Rule 1: IF the battery is dead, THEN the car will not start.
Rule 2: IF (the board appropriates the money)
AND (delivery can be assured in less than 30 days)
THEN (purchase the laser printer)

Rule 3: IF (the contractor does not meet the completion


deadline), OR (there s a cost overrun), THEN (the
contract is void).
Production rules
Rule 1: IF (the customer has an account) AND (the account has not been
used for 90 days),
THEN (mark the account as “inactive”).
Rule 2: IF (the account is “inactive”)
THEN (call the customer to re-establish the
connections)
Rule 3: IF (the customer indicates unwillingness to do
further business),
THEN (delete the customer from the database).

Interrelated rules – Rule 3 invoked only if Rule 2 is fired.


Production Rule samples
Production Rule Sample

Sample 1

Sample 2
Multiple Conditions In
Production Rules
Production rules can have one or more conditions. Conditions can be combined
using the three keywords AND, OR and NOT (these are known as Boolean
operators)
Multiple Conditions In
Production Rules
It is also possible to combine conditions in more complicated ways using
the Boolean operators. Here is an example:

This single rule combines rules 1 and 2 listed above.


Representing
alternatives
Production rules that contain alternative conditions (linked with the OR
operator) can be represented in most expert systems as a number of
alternative rules each with the same conclusion. For example, the rule:
Example ‘Grades’
Rule-Base to determine the ‘grade’:

1. IF study THEN good_grade


2. IF not_study THEN bad_grade
3. IF sun_shines THEN go_out
4. IF go_out THEN not_study
5. IF stay_home THEN study
6. IF awful_weather THEN stay_home

Q1: If the weather is awful, do you get a good or bad grade?


Q2: When do you get a good grade?
Forward and Backward Reasoning

Forward reasoning
Facts are given. What is the conclusion?
A set of known facts is given; apply rules to derive new facts as
conclusions (forward chaining of rules) until you come up with a
requested final goal fact.
Backward reasoning
Hypothesis (goal) is given. Is it supported by facts?
A hypothesis (goal fact) is given; try to derive it based on a set of
given initial facts using sub-goals (backward chaining of rules) until
goal is grounded in initial facts.
Example ‘Grades’

1. IF study THEN good_grade


2. IF not_study THEN bad_grade
3. IF sun_shines THEN go_out
4. IF go_out THEN not_study
5. IF stay_home THEN study
6. IF awful_weather THEN stay_home

Forward reasoning rule chain


given fact: awful_weather 6,5,1
Backward reasoning
hypothesis/goal: good_grade 1,5,6
Knowledge Representation -
Factor tables
Case Study :Consider the following passage of text about different
methods of transport:
Factor tables
Factor table to represent the text on the last slide
From Factor Table to
Production Rules

You might also like