Relative Content

Tag Archive for prologswi-prolog

Unbound Variables being Printed in Prolog

I have created a program in prolog that plays wordle. The user chooses a word, the computer guesses a word and the user tells what the colors of the letters are. The words the computer guesses are all unbound variables:

Fail driven loops

I am trying to understand the fail driven loop for an graph for example but i dont understant how it works and when to use it. When to use fail driven loops and when to use normal recursiv? I have some examples to check if they are correct or not.
The first example has to verify that there are no vertex in graph having an edge with the given weight.

Syntax error: Operator expected in Prolog

I am writing a small interpreter in SWI Prolog and run into the following problem: I need to write a predicate that will determine if logical expression is true. I already have a predicate