0% found this document useful (0 votes)
41 views12 pages

Rule Based Expert Systems

Rule based expert systems represent knowledge as IF-THEN rules and use an inference engine to apply rules to facts in order to solve problems in a specific domain. The knowledge base contains rules and the database contains facts. The inference engine matches rules to facts and executes rule conclusions. Rules can be chained forward from facts or backward from goals to derive solutions. Metarules define strategies for using domain rules. While rules provide a natural knowledge representation, rule-based systems have limitations such as opaque rule relations and inability to learn.

Uploaded by

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

Rule Based Expert Systems

Rule based expert systems represent knowledge as IF-THEN rules and use an inference engine to apply rules to facts in order to solve problems in a specific domain. The knowledge base contains rules and the database contains facts. The inference engine matches rules to facts and executes rule conclusions. Rules can be chained forward from facts or backward from goals to derive solutions. Metarules define strategies for using domain rules. While rules provide a natural knowledge representation, rule-based systems have limitations such as opaque rule relations and inability to learn.

Uploaded by

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

Rule based expert systems

• Knowledge is a theoretical or practical understanding of a subject or


a domain. Knowledge is also the sum of what is currently known,
and apparently knowledge is power. Those who possess knowledge
are called experts.
• The human mental process is internal, and it is too complex to be
represented as an algorithm. However, most expert are capable of
expressing their knowledge in the form of rules for problem solving.
• the term rule in AI, 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. They are most commonly used type of knowledge
representation. A rule provides some description of how to solve a
problem .
Rule (knowledge base)
• Any rule consists of two parts:
a) The IF part (antecedent – premise or condition)
b) The THEN part (consequent – conclusion or action)

IF <antecedent>
THEN <consequent>
• A rule can have multiple antecedents joined by he 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>
Rules as a knowledge representation
technique
• 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 use mathematical operators to define an object as
numerical and assign it to the numerical value.
• Rules can represent relations, recommendation, directive, strategy,
heuristics
• Heuristic example:
IF the spill is liquid
AND the ‘spill PH’ < 6
AND the ‘spill smell’ is vinegar
THEN the ‘spill material’ is ‘acetic acid’
Structure of rule-based Expert
System
• A production system model, which laid the foundation of the modern rule
based expert systems - Newell and Simon (CMU), 1970s.
• Solve problems by applying their knowledge (expressed as production rules) to
a given problem represented by problem-specific information.
• The production rules (stored in the long term memory) and problem-specific
information, facts (are stored in the short-term memory).
Complete structure of a rule based
expert system
Basic structure of a rule based
expert system

• The Knowledge base contains the domain knowledge useful for problem solving.

 Each rule specifies a relation, recommendation, directive, strategy, heuristics.


 IF (condition) THEN (action) – When the condition part of the rule is satisfied,
the rule is a said to fire and the action part is executed

• The Database includes a set of facts used to match against the IF (condition) parts
of the rules stored in the knowledge base.
• „The Inference Engine caries out the reasoning whereby the expert system reaches
a solution. It links the rules given in the knowledge base with the facts provided in
the database.
• The explanation facilities enable the user to ask the expert system how a
particular condition is reached and why a specific fact is needed. An expert system
must be able to explain its reasoning and justify its advice, analysis or conclusion. „
• The user interface is the means of communication between a user seeking a
solution and an expert system
Characteristics Of An Expert System

• High-quality performance (speed of reaching a solution) - built to perform at a


human expert level in a narrow, specialized domain.
• Expert systems apply heuristics to guide the reasoning and thus reduce the
search area for a solution.
• A unique feature of Expert systems is explanation capability – enable the
experts to review its own reasoning and explain its decisions.
• They employ symbolic reasoning when solving a problem (symbol – used to
represent different types of knowledge such as facts, rules, concepts).

Inference chain:
• In a rule-based expert system, the domain of knowledge is represented by a set
of IF THEN production rules and data is represented by facts about current
situation. The inference engine compares each rule in knowledge base with facts
in the database.
• The matching of the rule IF parts to the facts produces inference chains. The
inference chain indicates how an expert system applies rules to reach conclusion.
Forward Chaining
• Data-driven reasoning starts from the known data and proceeds forward with
that data.
• „Each time only the topmost rule is executed.
• „When fired, the rule adds a new fact in the database.
• „Any rule can be executed only once.
• „The match-fire cycle stops when no further rules can be fired.
When to use it:
• Forward chaining is a technique for gathering information and then inferring
from it whatever can be inferred.
• „Many rules may be executed that have nothing to do with established goal.
• If our goal is to infer only one particular fact, the forward chaining inference
technique would not be efficient.
Backward chaining
• It is the goal-driven reasoning
• The expert system has a goal (a hypothetical solution) - the inference engine
attempts to find the evidence to prove it.
• …The knowledge base is searched to find rules that might have the desired
solution
• …Such rules must have the goal in their THEN (action) parts.
• I…f such a rule is found and its IF (condition) part matches data in the database,
then the rule is fired and the goal is proved. However, this is rarely the case.
Process:
• The engine puts aside the rule it is working with (“stack”) and set up a new
goal, a subgoal, to prove the IF part of this rule.
• „Then the knowledge base is searched again for rules that can prove the
subgoal.
• „The engine repeats the process of stacking the rule until no rules are found in
the knowledge base to prove the current subgoal.
How to choose between forward
and backward chaining?
• „If an expert first needs to gather some information and then tries to infer
from it whatever can be inferred, the forward chaining inference engine can
be chose.
• If the expert begins with a hypothetical solution and then attempts to find
facts to prove it, the backward chaining inference engine can be chose.

Conflict resolution:
• If there exist two or more rules with the same IF part both of them can be set
to fire when the condition part is satisfied. They represent a conflicting set.
• Conflicting resolution – a method for choosing a rule to fire when more than
one rule can be fired in a given cycle.
• Methods are
1. Fire the rule with the highest priority
2. Fire the most specific rule (longest matching strategy)
3. Fire the rule that uses the data most recently entered in the database.
Metaknowledge and rules

• Metaknowledge can be simply defined as knowledge about knowledge.


Metaknowledge is knowledge about the use and control of domain knowledge
in a expert system.
• In rule-based expert systems, metaknowledge is represented by metarules. A
metarule determines a strategy for the use of task-specific rules in expert
system.

Metarules
• Metarule 1:
Rules supplied by experts have higher priorities than rules supplied by
novices
• „Metarule 2:
Rules governing the rescue of human lives have higher priorities than rules
concerned with clearing overloads on power system equipment.
Advantages of rule-based expert system
• Natural knowledge representation : an expert usually explains the problem-
solving procedure with “In such-and-such situation, I do so-and-so”. represented
quite naturally as IF-THEN production rules.
• „Uniform structure: production rules have uniform IF-THEN structure. Each rule
is an independent piece of knowledge (self-documented)
• Separation of knowledge from its process: 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.
• „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 system
• Opaque relations between rules: Rule-based systems make it difficult to
observe how individual rules serve the overall strategy.
• „Ineffective search strategy: The inference engine applies an exhaustive search
through all the production rules during each cycle (inefficient for large rules).
• Inability to learn : In general, rule-based expert systems do not have an ability
to learn from experience. Unlike a 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

You might also like