Question: 1) Declare your own predicates, clauses and write a complete prolog program to implement the rule given below. friends ( P1,P2):- likes (P1,G), likes (P2,G),
1) Declare your own predicates, clauses and write a complete prolog program to implement the rule given below. friends ( P1,P2):- likes (P1,G), likes (P2,G), P1P2. (Hint: find all friends.) CPCS-331 Artificial Intelligence Department of Computer Science Lab Manual by, Muhammad Shuaib Qureshi 4 Lab:03 Compoundqueries whmuliplevariab 2) Assume the following "likes" facts knowledge base likes (ali, football). likes (ali, tennis). likes (ahmad, tennis). likes (ahmad, handball). likes (samir, handball). likes (samir, swimming). likes (khaled, horseriding)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
