$30.99

Matched facts of volcano Essay

Matched facts of volcano, 513 words essay example

Essay Topic: volcano

Answer (Midterm)
Question 6.
Steps
Round1
1. Read rule 1, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete).
Rule 1 mountain(X1)  has(X1, vents) -> volcano(X1)
Matched facts mountain(krakatoa), X1=krakatoa
Since X1 is instantiated, R1 is therefore complete and can be fired. The new fact is then stored.
Rule becomes
mountain(krakatoa)  has(krakatoa, vents) -> volcano(krakatoa)
New fact volcano(krakatoa) is therefore stored.
2. Read rule 2, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete).
Rule 2 active(X2) v dormant (X2) -> located(X2, ring_of_fire)
Since there is no matched facts, R2 is not fired. Next is to proceed to the next rule.
3. Read rule 3, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete).
Rule 3 volcano(X3)  produces(X3, gas, lava, ash, cinder) -> active(X3)
Matched facts volcano(krakatoa), X3=krakatoa
Since X3 is instantiated, R3 is therefore complete and can be fired. The new fact is then stored.
Rule becomes
volcano(krakatoa) produces(krakatoa, gas, lava, ash, cinder) -> active(krakatoa)
New fact active(krakatoa) is therefore stored.
4. Read rule 4, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete).
Rule 4 volcano(X4) produces(X4, gas, lava, ash, cinder) -> dormant(X4)
Matched facts volcano(krakatoa),  X4=krakatoa
Rule becomes
volcano(krakatoa) produces (krakatoa, gas, lava, ash, cinder) ->
dormant(krakatoa)
New fact dormant(krakatoa) is therefore stored.
5. Proceed to the next rule but since there is no more rules, the second round is performed to check if there are rules that are not fired.
ROUND 2
1. Read rule 1, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete). Since the rule has been fired, the next rule is then read.
2. Read rule 2, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete). This rule has not been fired, so the rule is checked for matched facts etc.
Rule 2 active(X2) v dormant (X2) -> located(X2, ring_of_fire)
Matched facts active(krakatoa),  X2=krakatoa
Matched facts dormant(krakatoa), X2=krakatoa
Since X2 is instantiated, R2 is therefore complete and can be fired. The new fact is then stored.
Rule becomes
active(krakatoa) v dormant (krakatoa) -> located(krakatoa, ring_of_fire)
New fact located(krakatoa, ring_of_fire) is therefore stored.
3. Read rule 3, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete). Since the rule has been fired, the next rule is then read.
4. Read rule 4, find matched facts, perform instantiation, fire rule and store new facts (if rule is complete). Since the rule has been fired, the next rule is then read. There is no more rules to read and all rules read have been fired, thus, the process is stopped.
The conclusion is the last predicate that was fired  that is from rule R2
located(krakatoa, ring_of_fire)
OR
The conclusion can also be stated in natural language
"Krakatoa is located at the ring_of_fire".

Your sleepful night is just one step away.
You sleep, we work.