Please enable JavaScript.
Coggle requires JavaScript to display documents.
Rule Based Systems (Rule based reasoning rules (The essence of a rule…
Rule Based Systems
-
Backward Chaining
Backward chaining starts with a desired conclusion and decides if the existing facts support the derivation of a value for this conclusion.
-
In backward chaining an expert system has the goal and the expert system and the inference engine attempt to find the eveidence to prove it.
Backward chaining consists of the following steps:
1) form a stack initially composed of all the top level goals defined in the system
2) Consider the first goal from the stack. Gather all rules capable of satisfying this goal.
3) For each of these rules, examine in turn the rule’s premises:
a) If all premises for a rule is satisfied then execute the rule to derive its conclusion. Since a value has been derived for the current goal remove this goal and return to step 2.
b) If a premise of a rule is not satisfied, look for rules that derive the specified value for the parameter used in this premise.if any can be found, then consider this parameter as a subgoal, place it on the top of the stack and go to step 2.
c) If step b cannot find a rule to derive the specified value for the current parameter, then query the user for its value and add it to the database. If this value satisfies the current premise then continue with the rule’s next premise. If the premise is not satisfied then considered the next rule.
4) If all rules that satisfy the current goal have been attempted and all have failed to derive a value, then this goal remains undetermined. Remove it from stack and go back to step 2. If the stack is empty then halt and announce completion.
Introduction
Eg of a rule with multiple antecedents IF<antecedent> AND<antecedent> AND<antecedent> THEN<consequent>
Eg consequent of a rule with multiple clauses IF<antecedent> THEN<consequent> <consequent> <consequent>
-
The production model is based on the idea that humans solve problem by applying their knowledge to a given problem represented by a specific problemspecific information.
The production rules are stored in a long term memory and the problem-specific information or facts in the short term memory.
-
-
-
Forward Reasoning
a) Matching:-Rules in the knowledge base are compared to known facts to decide which rules is satisfied
b) Conflict resolution:-It is possible that the matching phase will find multiple rules that are satisfied.
c) Execution:-The firing of the rule which has 2 outcomes. First outcome is that a new fact is derived an added to the database, or a new rule can be added to the set of rules that the system considers for execution.
Conflict Resolution
How to resolve?
Fire the rule with the highest priority
Eg. Rule 1
(priority 100)
IF the season is autumn
AND the sky is cloudy
AND the forecast is drizzle
THEN‘signature of the parent’ is required
Rule 2
(priority 90)
IF the season is autumn
AND the sky is cloudy
THEN‘signature of the parent’ is required
Fire the most specific rule
Eg. Rule 1
IF the season is autumn
AND the sky is cloudy
AND the forecast is drizzle
THEN ‘signature of the parent’ is required
Rule 2
IF the season is autumn
THEN ‘signature of the parent’ is not required
Fire the rule most recently entered to the database.
Eg. Rule 1
IFthe season is autumn
THEN‘signature of the parent’ is required []
Rule 2
IFthe season is autumn
THEN‘signature of the parent’ is not required