user84209
user84209

Reputation: 13

How to specify empty preconditions in PDDL?

In my PDDL domain file, there are some actions which do not require preconditions, for example

(:action doSomthing
    :parameters (?t - t1)
    :precondition
    :effect (donesomething ?t)
)

When I run this in both PDDL Editor and VSCode (with PDDL Extension) I get an error.

I have tried the alternative styles, e.g.,

(:action doSomthing
    :parameters (?t - t1)
    :precondition()
    :effect (donesomething ?t)
)

or

(:action doSomthing
    :parameters (?t - t1)
    :precondition True
    :effect (donesomething ?t)
)

But the problem continues. For example, in VScode the following error is shown:

domain: syntax error in line 18, ')': domain definition expected

Upvotes: 0

Views: 39

Answers (1)

haz
haz

Reputation: 800

You can try :precondition (and)

Upvotes: 1

Related Questions