I'm trying to rule to check if someone likes a friend other than the one stated in the argument. So for example,
likes(Alice,Bob).
likes(Bob,Alice).
likes(Alice,Jeff).
likes(Jeff,Alice).
I'm trying to create a rule friends(X,Y)
that if both of them like each other, we look for another pair that either X
or Y
is linked to. Any help?