Why isn't father/2 recognized and why can't I load a file that calls father/2? theogony.pl mythos.pl swipl ...
Why isn't father/2 recognized and why can't I load a file that calls father/2? theogony.pl mythos.pl swipl ...
I want to write a predicate in Prolog, which creates a all possible segments of a given Size of a given List and returns the un-selected elements as a ...
I have a list L = [a, b, c] and I want to pick all unique non-repeating pairs: [a, b], [a, c], [b, c]. If I simply use the member function, it, of cou ...
Prolog newbie here. In SWI Prolog, I'm trying to figure out how to parse a simple line of CSV reversably, but I'm stuck. Here's what I've got: Now ...
I have a Prolog program containing some facts and rules about a drug called Diclogenta eye drops. I wanted to create a program where the user enters t ...
I have a prolog rule position_that_is_equals_to_two that sets X to the position at which the number 2 was found in the provided list of three elements ...
I have to solve a problem involving the WWESupercard game. The idea is to to take 2 cards and make them fight, comparing each stat alone and every com ...
how can i find all path of node that are connected between : a to g by using rules on Prolog ? The graph my simple code: ...
I have a set of facts in Prolog, such that: I want to know what's the most popular dish (burgers in the example above). I'm not interested in the 2 ...
I have been stuck on this problem for a couple of days. So given a balanced tree of the form t(Tree, Value, Tree), I want to find the depth of the lef ...
In Python it is common to marshal objects from JSON. I am seeking similar functionality in Prolog, either swi-prolog or scryer. For instance, if we h ...
I want to write the rule unique(List) that checks if all elements in List are unique. I'm not allowed to use member, but I am allowed to use 'not'. Th ...
How i can convert "• Robbery No. 1 occurred on Johnny's person on Tuesday in the park" to prolog rule/fact? How i can convert "• Robbery No. 1 occurr ...
I have previously asked about implementing the cut in a simple prolog meta-interpreter: handling the cut with a simple meta-interpreter A comment poi ...
The following is the classic "textbook" vanilla meta-interpreter for prolog. The following is simple program which establishes facts two relations ...
I'm trying to match things in compound terms. This is my term: I am trying to match the use of the arguments source_account and destination_accoun ...
I am a complete amateur on Prolog so my question might be very basic. I want to automatically generate a list from 1 to N, then split it into even and ...
Good evening, I am trying to read a csv file in Prolog containing all the countries in the world. Executing this code: I get a list of Terms of th ...
The scenario is to mimic rolling 3 six-sided die in Prolog while trying to obey the recursive nature of prolog. This is easily done with the Fibonacci ...
I'm getting two errors when I run my code geneholtproj6.swipl:165:2: Syntax error: Operator expected /geneholtproj6.swipl:291:3: Syntax error: Operato ...