; (c) 1993,1994 Copyright (c) University of Washington ; Written by Tony Barrett. ; All rights reserved. Use of this software is permitted for non-commercial ; research purposes, and it may be copied only for that use. All copies must ; include this copyright message. This software is made available AS IS, and ; neither the authors nor the University of Washington make any warranty about ; the software or its performance. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Monkey domain (from prodigy) ;;; dsw added location back despite cryptic comment below (define (domain monkey-domain) ; Comment: adding location caused fail (:requirements :strips :equality) (:predicates (location ?x) (on-floor) (at ?m ?x) (hasknife) (onbox ?x) (hasbananas) (hasglass) (haswater)) (:constants monkey box knife bananas glass waterfountain) ;; movement and clinbing (:action GO-TO :parameters (?x ?y) :precondition (and (location ?x) (location ?y) (not (= ?y ?x)) (on-floor) (at monkey ?y)) :effect (and (at monkey ?x) (not (at monkey ?y)))) (:action CLIMB :parameters (?x) :precondition (and (location ?x) (at box ?x) (at monkey ?x)) :effect (and (onbox ?x) (not (on-floor)))) (:action PUSH-BOX :parameters (?x ?y) :precondition (and (location ?x) (location ?y) (not (= ?y ?x)) (at box ?y) (at monkey ?y) (on-floor)) :effect (and (at monkey ?x) (not (at monkey ?y)) (at box ?x) (not (at box ?y)))) ;; getting bananas (:action GET-KNIFE :parameters (?y) :precondition (and (location ?y) (at knife ?y) (at monkey ?y)) :effect (and (hasknife) (not (at knife ?y)))) (:action GRAB-BANANAS :parameters (?y) :precondition (and (location ?y) (hasknife) (at bananas ?y) (onbox ?y)) :effect (hasbananas)) ;; getting water (:action PICKGLASS :parameters (?y) :precondition (and (location ?y) (at glass ?y) (at monkey ?y)) :effect (and (hasglass) (not (at glass ?y)))) (:action GETWATER :parameters (?y) :precondition (and (location ?y) (hasglass) (at waterfountain ?y) (at monkey ?y) (onbox ?y)) :effect (haswater)))