Version 6.4 of the FOIL inductive logic programming system is stored in the directory code/foil in the class directory on gamma2. For more information about the program, see the MANUAL file in the same directory. FOIL is written in C, and the compiled version is in the file bin/foil6.
For this homework, you will use FOIL to generate the following four logic theories (or their logical equivalent). Generate an appropriate domain (.d) file and run FOIL on each problem. You are encouraged to experiment with the other options. For each problem turn in your domain file, the FOIL output (or outputs if different options are tried), and a discussion of the difference (if any) between the FOIL-induced logic program and the versions below.
ancestor(X,Y) :- parent(X,Y). ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y).
append([ ],X,X). append(X,Y,Z) :- components(X,F,R), append(R,Y,W), components(Z,F,W).
factorial(0,1). factorial(1,1). factorial(X,Y) :- decrement(X,W), factorial(W,Z), product(X,Z,Y).
play(Outlook,Temp,Humidity,Windy) :- Outlook = overcast. play(Outlook,Temp,Humidity,Windy) :- Outlook = sunny, Humidity <= 75. play(Outlook,Temp,Humidity,Windy) :- Outlook = rain, Windy = false.