Homework 3 (Chapter 7 & 8)
Homework 3 (Chapter 7 & 8)
Homework 3 (Chapter 7 & 8)
1. Fires are classified according to the principal burning material. Traslate the following
information to rules for determining fire class:
Run the program and print out the results to show that your program works for one
material from each of the fire classes.
It is necessary to identify all the people with certain features. Write separate rules to identify
the following groups of people:
a) Anyone with blue or green eyes who has brown hair and is from France.
b) Anyone who does not have blue eyes or black hair and does not have the same color hair
and eyes.
c) Two people, the first having brown or blue eyes, not having blond hair, and a German
nationality; the second having green eyes, the same hair color as the first person, and any
noationality. The second person’s eyes may be brown if the first person’s hair is brown.
The rules should print out a message for each person found, e.g:
Test your program with at least two facts for each group (the facts should fit the description
of the group). You can define the facts using deffacts construct. E.g: the following deffact
fits the description for group a):
Run your program and print out the result. You also need to hand in a printout of
your program.