Planning with Preferences using Logic Programming

This page contains the source codes presented in the paper "Planning with Preferences using Logic Programming". The codes are changed frequently and you might experience some problems because I keep changing the predicate names to better reflect the role they play in the program. Please contact me if you have any questions and comments. To avoid conflicts with built-in predicates in SMODELS, some of the predicates in the source files have different names than what we have in the paper, for example, 'isand' and 'isor' stand for 'and' and 'or', respectively.

Overview

  1. Requirement: SMODELS and LPARSE
  2. The SICSTUS-Prolog translator (translate.pl) from domain in B into its logic program encoding is here.
  3. Domain independent axioms
  4. The set of rules Õsat
  5. Examples

Here are the encodings of some examples from the paper. I am working on a translation from formula of the form desire(j) (respectively, preference(j)) where j is a desire (respectively, preference) written in the prefix notation (in PROLOG) into the set of atoms Õj encoding j and the set of rules computing w(a,n). Please check back in a few weeks. Below are the encoding of some of the preferences described in the paper.

  1. The action theory (Example 1) in PROLOG (exp.pl). The result of the translation utility is a program in SMODELS (exp.smo). 
  2. Prefer to take the train or the bus (exp1-occ)
  3. Prefer not to call taxi (exp2-notaxi)
  4. Time preference (time)
  5. Cost preference (cost)
  6. Prefer time over cost (time-cost)
  7. Prefer cost over time (cost-time)

Note:

  1. To use the translator, you will need SICSTUS. Compile translate.pl in SICSTUS and then issues the goal gen. Enter the file name encoding the action theory (in this case exp).
  2. Command for computing a preferred trajectory using SMODELS:

        lparse -c length=2 exp.pl preference-file axioms sat | smodels   

        (preference-file is the name of the file encoding the preference, e.g., exp1-occ, time, cost-time, etc.)

Last Update 06/29/2004