Skip to content

Latest commit

 

History

History

golog

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A Golog Interpreter in Haskell

This is a Golog interpreter written in the purely functional programming language Haskell. Golog is an action language based on the situation calculus which is a formalism for reasoning about actions and change.

Besides toy examples it is currently used for plan recognition in traffic domains and control of a racing car in the video game TORCS.

It combines a number of features:

  • Transition semantics: programs can be executed step by step.
  • Standard imperative constructs: sequence, loop, if-then-else.
  • Nondeterministic constructs: branching, concurrency by interleaving (which can be locally limited by marking parts as atomic), plus a few macros such as pick-best-from-a-list.
  • Decision theory: nondeterminism may be resolved by looking for the highest reward.
  • Real world effects: using Haskell's IO system for side-effects, programs can be executed on-line with actions having real world effects. Also, a program can be executed off-line first (e.g., to search for the best execution) and the result can be synchronized with the real world.
  • Progression and regression: the interpreter is indifferent to whether progression or regression is used as reasoning mechanism. This is an implementation detail hidden to the interpreter. This allows for very fast progressive BATs!

The interpreter is implemented in Golog.Interpreter.

The whole system is written in Haskell. The interpreter exploits Haskell's laziness to build up a (potentially infinite) tree of situations and operates on this tree. The implementation is more compact, powerful, and efficient than previous prototypes in ECLiPSe-CLP and Mercury (see here for the code), two logical programming languages.

Contact: Christoph Schwering (schwering at gmail dot com).