+++ /dev/null
-; (c) 1993,1994 Copyright (c) University of Washington\r
-; Written by Tony Barrett.\r
-\r
-; All rights reserved. Use of this software is permitted for non-commercial\r
-; research purposes, and it may be copied only for that use. All copies must\r
-; include this copyright message. This software is made available AS IS, and\r
-; neither the authors nor the University of Washington make any warranty about\r
-; the software or its performance.\r
-\r
- \r
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
-;;; flat-tire domain (from Stuart Russell)\r
-\r
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
-;;; First the Strips version\r
-\r
-(define (domain flat-tire-strips)\r
- (:requirements :strips :equality)\r
-\r
- (:constants wrench jack pump)\r
- (:predicates (annoyed)\r
- (container ?c)\r
- (locked ?c)\r
- (open ?c)\r
- (in ?x ?c)\r
- (have ?x)\r
- (nut ?n)\r
- (hub ?h)\r
- (loose ?x ?h)\r
- (tight ?x ?h)\r
- (on-ground ?h)\r
- (unfastened ?h)\r
- (on ?x ?h)\r
- (wheel ?w)\r
- (free ?h)\r
- (inflated ?w)\r
- (intact ?w))\r
- \r
- (:action cuss\r
- :effect (not (annoyed)))\r
-\r
- (:action open-container\r
- :parameters (?c)\r
- :precondition (and (container ?c) (not (locked ?c)) (not (open ?c)))\r
- :effect (open ?c))\r
-\r
- (:action close-container\r
- :parameters (?c)\r
- :precondition (and (container ?c) (open ?c))\r
- :effect (not (open ?c)))\r
-\r
- (:action fetch\r
- :parameters (?x ?c)\r
- :precondition (and (container ?c) (in ?x ?c) (open ?c) (not (= ?x ?c)))\r
- :effect (and (have ?x)\r
- (not (in ?x ?c))))\r
-\r
- (:action put-away\r
- :parameters (?x ?c)\r
- :precondition (and (container ?c) (have ?x) (open ?c) (not (= ?x ?c)))\r
- :effect (and (in ?x ?c)\r
- (not (have ?x))))\r
-\r
- (:action loosen\r
- :parameters (?x ?h)\r
- :precondition (and (nut ?x) (hub ?h) (have wrench)\r
- (tight ?x ?h) (on-ground ?h) (not (= ?x ?h)))\r
- :effect (and (loose ?x ?h)\r
- (not (tight ?x ?h))))\r
-\r
- (:action tighten\r
- :parameters (?x ?h)\r
- :precondition (and (nut ?x) (hub ?h) (have wrench) (loose ?x ?h)\r
- (on-ground ?h) (not (= ?x ?h)))\r
- :effect (and (tight ?x ?h)\r
- (not (loose ?x ?h))))\r
-\r
- (:action jack-up\r
- :parameters (?h)\r
- :precondition (and (hub ?h) (on-ground ?h) (have jack))\r
- :effect (and (not (on-ground ?h))\r
- (not (have jack))))\r
-\r
- ;; jacking down wheel x on hub y (dependency would be better)\r
- (:action jack-down\r
- :parameters (?h)\r
- :precondition (and (hub ?h) (not (on-ground ?h)))\r
- :effect (and (on-ground ?h)\r
- (have jack)))\r
-\r
- (:action remove-nuts\r
- :parameters (?x ?h)\r
- :precondition (and (nut ?x) (hub ?h) (not (= ?x ?h))\r
- (not (on-ground ?h)) (not (unfastened ?h))\r
- (have wrench) (loose ?x ?h))\r
- :effect (and (have ?x) (unfastened ?h)\r
- (not (on ?x ?h)) (not (loose ?x ?h))))\r
-\r
- (:action put-on-nuts\r
- :parameters (?x ?h)\r
- :precondition (and (nut ?x) (hub ?h) (not (= ?x ?h))\r
- (have wrench) (unfastened ?h)\r
- (not (on-ground ?h)) (have ?x))\r
- :effect\r
- (and (loose ?x ?h) (not (unfastened ?h)) (not (have ?x))))\r
-\r
- (:action remove-wheel\r
- :parameters (?w ?h)\r
- :precondition (and (wheel ?w) (hub ?h) (not (= ?w ?h))\r
- (not (on-ground ?h)) (on ?w ?h) (unfastened ?h))\r
- :effect (and (have ?w) (free ?h) (not (on ?w ?h))))\r
-\r
- (:action put-on-wheel\r
- :parameters (?w ?h)\r
- :precondition (and (hub ?h) (wheel ?w) (not (= ?w ?h)) (have ?w)\r
- (free ?h) (unfastened ?h) (not (on-ground ?h)))\r
- :effect\r
- (and (on ?w ?h) (not (have ?w)) (not (free ?h))))\r
-\r
- (:action inflate\r
- :parameters (?w)\r
- :precondition (and (wheel ?w) (have pump) (not (inflated ?w))\r
- (intact ?w))\r
- :effect (inflated ?w)))\r
-\r
-\r