From the hub

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.


How to write a compiler or interpreter in Prolog

This post is external to PrologHub

An example of using Prolog's definite clause grammar to write a compiler for a Pascal-like programing language. The example is taken from the open access textbook: "The Art of Prolog".


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.


is_Of and has_: Predicate Naming

Prolog is a declarative language, we have the joy of telling the computer what is, and run our programs by allowing the computer to deduce what is true. As programmers we often have to read code for ourselves and figure out what is true. This naming convention can help us do that by making our intentions explicit.


A Very Specific Prolog Warning

This post is external to PrologHub

If you're trying to pass an input file stream from Prolog to a foreign function, this may be useful. For the rest of you, hopefully it's at least somewhat interesting.


Framing Frames

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.