From the hub, in category: "AI"

Homoiconic Prolog: Explain yourself!

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, a deeper dive.

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 By Example

Reify: (v) To represent something abstract as a concrete thing.

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.


Introduction to CLP(FD) for Resource Management

This post is external to PrologHub

Introduction to using CLP(FD). A guide from scenario description, to mathematical representation, to code, for the kind of problems that are typical in the Operational Research/Management Science domain. We're maximizing profit or minimizing spending given some constraints on resources.


Using A* for Planning

This post is external to PrologHub

Create a domain for planning in and code A* to search for a path to the goal.


Opening the World with Three-Valued Logic.

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.


Game tree tutorial

This post is external to PrologHub

An example of what computer science textbooks call "adversarial search" using the minimax and alpha-beta theorems to create an AI game player written in Prolog.