Gdomain.pddl

From IDSwiki
Jump to: navigation, search

Goldfinger Domain

The Goldfinger domain file, in pddl format, is shown below:

(define (domain goldfinger)
 (:requirements :typing)
 (:types         
   char location measure - object
   badchar goodchar - char
   golf-location - location
   card-location - location
 )
 (:predicates 
   (allies ?c1 ?c2 - char)
   (enemies ?c1 ?c2 - char)
   (unemployed ?c - char)
   (at ?c - char ?l - location)
   (played-cards ?c1 ?c2 - char ?l - location)
   (won-cards ?c1 ?c2 - char ?l - location)
   (playing-cards ?c1 ?c2 - char ?l - location)
   (attractive ?c - char)
   (seduced ?c1 ?c2 - char)
   (allegiance ?c1 ?c2 - char)
   (impressed-by ?c1 ?c2 - char)
   (be-the-boss ?c1 ?c2 - char)
   (alive ?c - char)
   (dead ?c - char)
   (killed ?c1 ?c2 - char)
   (different ?c1 ?c2 - char)	
   (assistant ?c1 ?c2 - char)
   (boss ?c1 ?c2 - char)
   (got-mission ?c - char)
   (playing-golf ?c1 ?c2 - char ?l - location)
   (played-golf ?c1 ?c2 - char ?l - location)
   (won-golf ?c1 ?c2 - char ?l - location)
   (asked-questions-of ?c1 ?c2 - char)
   (feeling-of-power ?c - char ?m - measure)
 )
 (:action travel-to
   :parameters
     (?c - char ?lf ?lt - location)
   :precondition
   (and
     (at ?c ?lf)
   )
   :effect
   (and
     (not (at ?c ?lf))
     (at ?c ?lt)
   ))
 (:action start-play-cards
   :parameters
     (?c1 ?c2 - char ?l - card-location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (different ?c1 ?c2)
   )
   :effect
   (and
     (playing-cards ?c1 ?c2 ?l)
   ))
 (:action win-cards
   :parameters
     (?c1 - goodchar ?c2 - char ?l - card-location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (playing-cards ?c1 ?c2 ?l)
   )
   :effect
   (and
     (played-cards ?c1 ?c2 ?l)
     (won-cards ?c1 ?c2 ?l)
     (attractive ?c1)
 ))
 (:action impress-at-cards
   :parameters
     (?c1 ?c2 ?c3 - char ?l - card-location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (playing-cards ?c1 ?c3 ?l)
   )
   :effect
   (and
     (impressed-by ?c2 ?c1)
 ))
 (:action seduce
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (alive ?c2)
     (attractive ?c1)
     (allegiance ?c2 ?c1)
   )
   :effect
   (and
     (seduced ?c1 ?c2)
 ))
 (:action change-allegiance
   :parameters
     (?c1 ?c2 ?c3 - char)
   :precondition
   (and
     (impressed-by ?c1 ?c3)
     (allegiance ?c1 ?c2)
     (be-the-boss ?c2 ?c1)
   )
   :effect
   (and
     (allegiance ?c1 ?c3)
     (not (allegiance ?c1 ?c2))
     (not (be-the-boss ?c2 ?c1))
   ))
 (:action have-killed
   :parameters
     (?c1 ?c2 ?c3 - char)
   :precondition
   (and
     (assistant ?c1 ?c2)
     (seduced ?c3 ?c2)
     (allegiance ?c2 ?c3)
     (alive ?c2)
   )
   :effect
   (and
     (be-the-boss ?c1 ?c2)
     (not (alive ?c2))
   ))
 (:action reward-loyalty
   :parameters
     (?c1 ?c2 - char)
   :precondition
   (and
     (assistant ?c1 ?c2)
     (allegiance ?c2 ?c1)
   )
   :effect
   (and
     (be-the-boss ?c1 ?c2)
   ))
 (:action get-mission
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (boss ?c2 ?c1)
   )
   :effect
   (and
     (got-mission ?c1)
   )
 (:action start-play-golf
   :parameters
     (?c1 ?c2 - char ?l - golf-location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (different ?c1 ?c2)
   )
   :effect
   (and
     (playing-golf ?c1 ?c2 ?l)
   ))
 (:action end-play-golf
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (playing-golf ?c1 ?c2 ?l)
   )
   :effect
   (and
     (played-golf ?c1 ?c2 ?l)
     (not (playing-golf ?c1 ?c2 ?l))
   ))
 (:action win-golf
   :parameters
     (?c1 - goodchar ?c2 - char ?l - location)
   :precondition
   (and
     (playing-golf ?c1 ?c2 ?l)
   )
   :effect
   (and
     (won-golf ?c1 ?c2 ?l)
     (played-golf ?c1 ?c2 ?l)
     (not (playing-golf ?c1 ?c2 ?l))
     (feeling-of-power ?c2 low)
     (not (feeling-of-power ?c2 high))))
 (:action ask-questions-during-golf
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (playing-golf ?c1 ?c2 ?l)
   )
   :effect
   (and
     (asked-questions-of ?c1 ?c2)
   ))
 (:action get-assistant-to-warn
   :parameters
     (?c1 ?c2 ?c3 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (at ?c3 ?l)
     (feeling-of-power ?c1 low)
     (assistant ?c1 ?c3)
     (allegiance ?c3 ?c1)
     (enemies ?c1 ?c2)
     (alive ?c3)
   )
   :effect
   (and
     (feeling-of-power ?c1 high)
     (not (feeling-of-power ?c1 low))
   ))
 (:action hire-assistant
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (unemployed ?c2)
   )
   :effect
   (and
     (assistant ?c1 ?c2)
     (allegiance ?c2 ?c1)
     (not (unemployed ?c2))
   ))
 (:action sack-assistant
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (assistant ?c1 ?c2)
     )
   :effect
   (and
     (unemployed ?c2)
     (not (assistant ?c1 ?c2))
     (not (allegiance ?c2 ?c1))
   ))
 (:action make-up
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (enemies ?c1 ?c2)
     (enemies ?c2 ?c1)
   )
   :effect
   (and
     (allies ?c1 ?c2)
     (allies ?c2 ?c1)
     (not (enemies ?c1 ?c2))
     (not (enemies ?c2 ?c1))
   ))
 (:action fall-out
   :parameters
     (?c1 ?c2 - char ?l - location)
   :precondition
   (and
     (at ?c1 ?l)
     (at ?c2 ?l)
     (allies ?c1 ?c2)
     (allies ?c2 ?c1)
   )
   :effect
   (and
     (enemies ?c1 ?c2)
     (enemies ?c2 ?c1)
     (not (allies ?c1 ?c2))
     (not (allies ?c2 ?c1))
   ))
)