PDDL syntax for effect with semantic meaning of "one of type"

209 views Asked by At

I am struggling with defining the effect of an action. The scenario is the following: I have two balls (a and b). Each of them can be taken and put. As soon as one of the balls is put, one of the lamps L1, L2, L3 goes on (it does not matter which one) I have defined a, b - ball, L1, L2, L3 - lamp and I have an action with the following definition:

(:action put 
 :parameters (?b - ball)
 :precondition
   (and
     (ballTaken ?b)
   )
 :effect
   (and
    (not( ballTaken ?b))
    (... **one of the lamps goes on**...)
   )
)

How can I express this "one of the lamps goes on" in pddl? So, basically - how can I use objects which are not given as parameters to the action in the effect ? Thank you!

1

There are 1 answers

2
haz On BEST ANSWER

That's a non-deterministic effect...is that what you wanted? If it's arbitrary and you don't care which, then use a parameter for the lamp. If you want one of them to randomly be selected, then use non-deterministic planning notation...

(oneof (on lamp1) (on lamp2) (on lamp3))