/* Domain: objects are equivalent, i.e. the order in which they are taken does not matter. Not easy: destination may be different from home */ (define (domain briefcase) (:requirements :typing) (:fluents (atRobby ?x - loc) (at ?x - obj ?l -loc) (in ?x - obj) ) (:constants (home - loc)) (:action go :parameters (?from ?to - loc) :precondition (atRobby ?from) :effect (atRobby ?to) (not(atRobby ?from)) :only-if ; either go to the robot's destination ; or go to a place where an object can be taken ; or dropped (or (exists (?x - obj) (and (initially (at ?x ?to))(at ?x ?to))) (exists (?x - obj) (and (goal (at ?x ?to))(in ?x))) (goal (atRobby ?to)) ) ; move from home or from a place where initially ; there is something or something has to be dropped (or (exists (?x - obj)(initially (at ?x ?from))) (exists (?x - obj)(goal(at ?x ?from))) (initially (atRobby ?from))) :next ; either do something in the place where you get ; or there is nothing left to do (or (exists (?x - obj) (or (take ?x ?to)(drop ?x ?to))) (forall (?x - obj ?y -loc) (implies (goal (at ?x ?y)) (at ?x ?y)))) ) (:action take :parameters (?x - obj ?room - loc) :precondition (atRobby ?room)(at ?x ?room) :effect (in ?x)(not (at ?x ?room)) :only-if (initially (at ?x ?room)) (not (goal (at ?x ?room))) :s-asap ) (:action drop :parameters (?x - obj ?room - loc) :precondition (in ?x)(atRobby ?room) :effect (not (in ?x)) (at ?x ?room) :only-if (goal(at ?x ?room)) (forall (?y - obj) (implies (goal (at ?y ?room))(in ?y))) :s-asap ) )