prolog relation and comparison
问题 Let said I have these relations drive(adam, van). drive(betty, tank). drive(adam, truck). drive(adam, convertible). how do I write a condition to find out adam drives three different vehicles? I tried this, but this didn't work. drivethree(A):- drive(A, X), drive(A, Y), drive(A, Z), X = not(Y), X = not(Z), Y = not(Z). 回答1: At first, you might want to understand why your program does not work. After all, this might not be the only program that causes problems. Identify incorrect test cases The