I'm new in Prolog SWI can you help me to solve this. Suppose have a database with predicates likes (person1, person2) and hobbies (person1, hobby). Now, how can I design a rule such that the system answers that two people have the same kind of liking or not depending on their hobbies.
likes (john, jake).
true
A likes B iff A has a hobby H and B has a hobby H
. – Eugene Sh.checkhobby
doesn't even use thehobbies
data. It's a little confusing what you're really after here. This is sounding like you just need to go read the beginning chapters of a beginning Prolog book, or try a Prolog tutorial. – lurker