Introduction to AI
CT017-3-1 Ver 1.0
Knowledge Representation 1
Topic & Structure of The Lesson
• Why representation
• Production Rule
• Factor Table
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 2 of 21
Learning Outcomes
• At the end of this topic, You should be able
to
• Knowledge Representation 1
• Why representation
• Production rule
• Factor Table
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹3› of 24
Key Terms You Must Be Able To
Use
• If you have mastered this topic, you should be able to use the following
terms correctly in your assignments and exams:
• Production Rule
• Factor Table
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹4› of 24
Expert System in industry
• https://www.youtube.com/watch?
v=14utNTCmR8c
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 5 of 9
Recap – Expert System Life
Cycle
1. Knowledge Acquisition – interview with
domain expert / Human expert
2. Knowledge Representation
- Production rule – factor table
- Semantic network – lecture class
- Frame – next week tutorial
3. Development / Testing - programmer
Job of Knowledge engineer
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 6 of 9
Knowledge Representation
• This is on the second step on an expert
system life cycle.
• Knowledge from the domain expert will be
changed into any one of knowledge
representation types - Knowledge
Engineer
• Help the programmer understand better
and easy to code in the knowledge
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹ 5 of 24
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 6 of 24
Production rules
It is the most popular form of knowledge
representation
IF THEN
antecedent consequent
situation action
premise conclusion
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹8› of 24
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).
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹9› of 24
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.
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 10 of 24
Production Rule samples
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 12 of 24
Representing domain knowledge
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 13 of 24
Production Rule sample
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 14› of 24
AND sample
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 15 of 24
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)
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 16 of 24
• 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.
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 1 7 of 24
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:
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹18 of 24
Knowledge representation
Case Study :Consider the following passage of text about different methods of
transport:
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 19› of 24
Refer to notes uploaded
• Please now check the word document
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 20 of 9
Factor tables
• Factor table to represent the text on the last slide
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 20› of 24
From factor table to production
rules
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide 21 of 24
Summary of Main Teaching Points
• It is important to understand the order in
which the facts are read, that the ‘verb’ or
link term is placed outside the brackets
and the objects to which it applies are
inside.
• Also the first object is applied by the link to
the second (if there is one).
• In other words we would read the following
fact
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹23› of 24
Question and Answer Session
Q&A
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹24› of 24
What we will cover next
• Knowledge Representation 2
CT017-3-1 Introduction in Artificial Intelligence Knowledge Representation 1 Slide ‹25› of 24