Prolog is rather popular for Expert Systems. Why? Well because it's homoiconic and because we have DCG's, we can reify a query to make it explain itself. That's a lot of jargon, in this post we'll break it down and make some explanations.
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.
Reification is a tool in the bag of tricks that can be quite tricky to understand. Rather than waffle on in the abstract, let's take a look at a few examples.
Under the open world assumption a fact can be True, False or Unknown. Prolog operates in a closed world where predicates are either True or False. Let's see if we can open Prolog up a little.
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.