BEU 5173
ARTIFICIAL INTELLIGENCE
CHAPTER 2
RULE BASED EXPERT SYSTEMS
Session 1 2015/2016:W.R.W OMAR
Course overview
2.1 Introduction on what is knowledge
2.2 Rules as a knowledge representation technique
2.3 The main players in the expert system
development team
2.4 Structure of a rule-based expert system
2.5 Fundamental characteristics of an expert system
2.6 Forward and backward chaining inference
technique
2.7 MEDIA ADVISOR: a demonstration rule-based
expert systems
2.8 Conflict resolution
2.9 Advantages and disadvantages of rule-based
expert systems.
2.1 What is knowledge?
is a theoretical or practical understanding
of a subject or a domain.
is also the sim of what is currently known,
and apparently knowledge is power. Those
who possess knowledge are called experts.
Anyone can be considered a domain expert
if he or she has deep knowledge and strong
practical experience in a particular domain.
The human mental process is internal, and
it is too complex to be represented as an
algorithm
Expert system
An expert system is a computer system that
emulates the decision-making ability of a
human expert.
•Expert systems are designed to solve complex
problems by reasoning about knowledge, like an
expert, and not by following the procedure of a
developer as is the case in conventional
programming.
•Expert Systems are developed by interviewing
experts regarding their knowledge problem-
solving methodology, then embedding the
knowledge in the form of IF..THEN rules.
An Expert System (ES)
A knowledge-based information system
Contain knowledge about a specific, complex
application area
Acts as an expert consultant to end users
Experts are capable of expressing their
knowledge in the form of rules for
problem solving.
IF the ‘traffic light’ is ‘green’
THEN the action is go
IF the ‘traffic light’ is ‘red’
THEN the action is stop
Components of an Expert
System
[Link] expert system
2. The system Development
Knowledge Base
Facts about a specific subject area
Heuristics that express the reasoning procedures of
an expert (rules of thumb)
Software Resources
An inference engine processes the knowledge
and recommends a course of action
User interface programs communicate with
the end user
Explanation programs explain the reasoning
process to the end user
The Expert System
Knowledge Base
Interface Engine
User Interface
Let us see them one by one briefly −
Methods of Knowledge
Representation
Case-Based
Knowledge organized in the form of cases
Cases are examples of past performance,
occurrences, and experiences
Frame-Based
Knowledge organized in a hierarchy or
network of frames
A frame is a collection of knowledge about
an entity, consisting of a complex package
of data values describing its attributes
Object-Based
Knowledge represented as a network of objects
An object is a data element that includes both
data and the methods or processes that act on
those data
Rule-Based
Knowledge represented in the form of rules
and statements of fact
Rules are statements that typically take the
form of a premise and a conclusion (If, Then)
Decision Management
Loan portfolio analysis
Employee performance evaluation
Insurance underwriting
Diagnostic/Troubleshooting
Equipment calibration
Help desk operations
Medical diagnosis
Software debugging
Design/Configuration
Computer option installation
Manufacturability studies
Communications networks
Selection/Classification
Material selection
Delinquent account identification
Information classification
Suspect identification
Process Monitoring/Control
Process Monitoring/Control
Machine control (including robotics)
Inventory control
Production monitoring
Chemical testing
2.2 Rules as a knowledge
representation technique
The term rule in AI, which is the most commonly
used type of knowledge representation, can be
defined as an IF-THEN structure that relates given
information or facts in the IF part to some action in
the THEN part.
A rule provides some description of how to solve a
problem.
Rule are relatively easy to create and understand
Any rules consists of two parts: the IF part, called
the antecedent (premise or condition) and the THEN
part called the consequent (conclusion or action)
IF <antecedent>
THEN <consequent>
A rule can have multiple antecedents joined by
the
keywords AND (conjunction), OR (disjunction)
or
a combination of both.
IF <antecedent 1> IF <antecedent 1>
AND <antecedent 2> OR <antecedent 2>
AND <antecedent n> OR <antecedent n>
THEN <consequent> THEN <consequent>
The antecedent of a rule incorporates two parts:
an
object (linguistic object) and its value. The object
and its value are linked by an operator.
The operator identifies the object and assigns the
value. Operators such as is, are, is not, are not
are used to assign a symbolic value to a linguistic
object.
Expert systems can also used mathematical
operators to define an object as numerical and
assign it to the numerical value.
IF ‘age of the customer’ < 18
AND ‘cash withdrawal’ > 1000
THEN ‘signature of the parent’ is required
Rules can represent:
1. Relation: IF the ‘fuel tank’ is empty THEN the car
is dead
2. Recommendation: IF the season is autumn AND
the sky is cloudy AND the forecast is drizzle THEN
the advice is ‘take an umbrella’
3. Directive: IF the car is dead AND the ‘fuel tank’
is
empty THEN the action is ‘refuel the car’
4 Strategy: IF the car is dead THEN the action is
‘check the fuel tank’; step1 complete IF step1 is
complete AND the ‘fuel tank’ is full
THEN the action is ‘check the battery’; step2 is complete
4 Heuristic: IF the spill is liquid AND the ‘spill pH’
< 6 AND the ‘spill smell’ is vinegar THEN the ‘spill
material’ is ‘acetic acid’
2.3 The main players in the
expert system development
team
4
1 2 3
5
Domain Expert
· is a knowledgeable and skilled person capable of
solving problems in a specific area or domain
· the person’s expertise is to be captured in the
expert system
· could be more than one expert that contribute to
an expert system
· the expert must be able to communicate his or
her knowledge, be willing to participate in the
expert system development and commit a
substantial amount of time to the project
· is the most important person in the expert
system
development team
Knowledge Engineer
· is someone who is capable of designing,
building and testing an expert system
· interviews the domain expert to find out how a
particular problem is solved
· establishes what reasoning methods the expert
uses to handle facts and rules and decides
how to represent them in the expert system
· choose some development software or an
expert systems shell, or look at programming
languages for encoding the knowledge
· responsible for testing, revising and integrating
the expert system into the workplace
Programmer
· is the person responsible for the actual
programming, describing the domain
knowledge in terms that a computer can
understand.
· needs to have the skills in symbolic
programming in such AI language such as
Prolog.
· should also know conventional programming
Project Manager
language like C, Pascal, FORTRAN and Basic
· is the leader of the expert system development
team, responsible for keeping the project on
track
· makes sure that all deliverables and milestones
are met, interacts with the expert, knowledge
engineer, programmer and end-user
End-user
· often called the user
· is a person who uses the expert
system when it isdeveloped
· must not only be confident in the
expert systemperformance but also
feel comfortable using it
2.4 Structure of a rule-based
expert system
In early 70s, Newell and Simon from
Carnegie-Mellon University proposed a
production system model, the foundation
of the modern rule-based expert systems
The production model is based on the idea
that humans solve problems by applying
their knowledge (expressed as production
rules) to a given problem represented by
problem-specific information
The production rules are stored in the
long-term memory and the problem-
specific information or facts in the short-
term memory
Conflict resolution
Let us consider two simple rules for crossing a road.
And let us now add the third rule:
Rule 1:
IF the ‘traffic light’ is green
THEN the action is go
Rule 2:
IF the ‘traffic light’ is red
THEN the action is stop
Rule 3:
IF the ‘traffic light’ is red
THEN the action is go
We have two rules, Rule 2 and Rule 3, with the
same IF part. Thus both of them can be set
to fire when the condition part is satisfied.
These rules represent a conflict set.
The inference engine must determine which
rule to
fire from such a set
A method for choosing a rule to fire when
more than
one rule can be fired in a given cycle is called
conflict
resolution
Advantages of rule-based
expert systems
1. Separation of knowledge from its processing
· The structure of a rule-based expert system
provides an effective separation of the
knowledge base from the inference engine.
· This makes it possible to develop different
applications using the same expert system shell
2. Dealing with incomplete and uncertain
knowledge
· Most rule-based expert systems are capable of
representing and reasoning with incomplete and
uncertain knowledge.
Disadvantages of rule-based expert
systems
1. Opaque relations between rules.
· Although the individual production rules are
relatively simple and self-documented, their logical
interactions within the large set of rules may be
opaque.
. Rule-based systems make it difficult to observe
how individual rules serve the overall strategy.
2. Ineffective search strategy
· The inference engine applies an exhaustive
search through all the production rules during each
cycle.
· Expert systems with a large set of rules (over 100
rules) can be slow, and thus large rule-based
systems can be unsuitable for real-time
applications
3. Inability to learn
· In general, rule-based expert systems do
not have an ability to learn from the
experience.
· Unlike human expert, who knows when to
“break the rules”, an expert system cannot
automatically modify its knowledge base, or
adjust existing rules or add new ones.
· The knowledge engineer is still responsible
for revising and maintaining the system
Comparison of expert systems
with conventional systems and
human experts
Home work
To write a short report on your personal
interests in the field of AI.