I\'ve got a predicate taking a single argument.When there is a solution, this single argument should equal some other argument I have (I have a predicate that goes from one argument to three).
Given fact likes([apples, oranges], john). how could I query likes([apples, oranges], Who). and likes([oranges, apples], Who).
I\'m trying to convert from this notation: A and (B or C) equ A and B or A and C) to standard logical notation i.e. things like and(A,B), or(A,B), neg(A)...
i have this code than runs perfectly .. returns a true .. when tracing the values are ok .. but its not returning back the answer .. it acts strangely when it ends and always return empty list .. unin
Sorry for the blunt title, but couldn\'t really generalize the question. Hope someone with Prolog experience can help me out here. So I\'ve got a database which basically lists universities and their
i\'m new at prolog and to improve my skills i\'m trying to make some exercise. At the moment I\'m stuck with a BFS, let assume the tree is something like this:
How can I save necessary terms to file? For example, save_to_file(File) :- tell(File), listing, told. saves all user terms to file File.
i\'m not very ex开发者_如何转开发perienced on Prolog and i\'m trying to solve an exercise that\'s about using a heuristic algorithm(f.e. A* or BFS or Hill-Climbing) to find a solution to a given probl
am making a function that will send me a list of all possible elemnts .. in each iteration its giving me the last answer .. but after the recursion am only getting the last answer back .. how can i ma
My code is supposed to stop when it finds stop in the file its reading from, but its not. I keep getting an error: