|
Rules |
Facts (Assertions) |
|
R1: IF X is a mamual THEN X is a crocodile; R2: IF X is not a crocodile AND X lives underwater THEN X is a manatee; R3: IF X is a mamual AND X lives underwater THEN X is a hippo; R4: IF X is a crocodile OR X is a hippo THEN X is dangerous; R5: IF X is not a crocodile THEN X is safe; |
A1: Spike is a mamual; A2: Fido is a mamual; A3: Fido lives under water; A4: Rover is a crocodile; |
Run forward chaining on the above knowledge base to answer the following questions. The answer should be in the following tabular format (Note: completely show your work step by step):
|
Inferred facts |
Matched Rules |
|
|
1 |
||
|
2 |
a)
First it will search for Fido
R1 Fido is mamual then Fido is crocodile
R4 gives Fido is dangerous
Spike is mamual then it is a crocodile
R4 gives spike is dangerous
Rover is crocodile then R4 gives Rover is dangerous
b)
R1 gives Fido is crocodile
R4 gives Fido is dangerous
R5 False
R1 gives spike is crocodile
R4 gives spike is dangerous
R5 False
R4 gives Rover is dangerous
R5 False
So None of them are safe
Rules Facts (Assertions) R1: IF X is a mamual THEN X is a crocodile; R2: IF...