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.
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.
In Prolog, Difference Lists are a very powerful and useful tool. They're also difficult to understand and can result in difficult to read code. In this post we'll address both of these issues.
Prolog programs have both logical and procedural meanings. In this post we'll take a look at procedural ideas more commonly associated with functional programming than Prolog, namely: map, filter and reduce (foldl and foldr). We'll code them and then query them.
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.
If you've been doing some reading, you may have come across the notion of frames as a data structure, but little available information on what they are and how they work. Implementations of frames are even rarer. In this post we'll examine what they are and consider alternative representations and implementations.
Golog is a logic programming language for dynamic domains based in Situation Calculus with an interpreter written in Prolog. The classic example from the book is that of an elevator. Here we present an interactive version of that program.
Prolog allows us to declare our own operators, this allows us to quickly take a bunch of predicates and query them in a bodge-job controlled "semi-natural" language.