An Inference engine used in expert systems, that can carry out forward chaining and backward chaining.
-
Input file: data/in.txt.
-
Input format:
- First line => Query.
- Second line => Facts base
- Rest => Knowledge base.
-
For examples, check the file: data/example_in.txt
-
Forward Chaining:
The program prints the applicable rule and the facts base for each iteration, the final result includes wether the query is proven or not, and the execution sequence.
-
Backward Chaining:
At iteration it prints the fact to establish, the premise to established. Also, the proven facts are marked between brackets. at the end, the final line of the output summarize wether the query is prooven or not.
- For more information about Forward Chaining.
- For more information about Backward Chaining.