People from other languages often get a little confused with these predicate things, especially as their syntax looks similar to functions in other languages. In this post we contrast predicates and functions and demonstrate the advantage of using predicates over functions.
A key idiom in Prolog is the idea that it runs both forwards and backwards. If you've never programmed in Prolog before, this can be mind-blowing! You can write one "function" and get many different uses out of it. In this post we'll take a look at what this means as a teaser that might tempt you into giving Prolog a go.
Transitive relations show up a lot in AI code, in this post we look at a couple of ways to code them that depend on what you can assume about your domain and what Prolog you're using.
When we start doing knowledge representation in Prolog, we start needing to describe the properties of relations so we can infer more than is in our recorded data. Symmetry, reflexivity and transitivity are the three main relationship properties you'll end up using. In this interactive post we take a look at how they can be encoded.