I am new to PDDL and I am currently learning how to simple program to make a car move forward from pt0pt0 to pt1pt1.
However, I encountered a compilation error when I tried to run it on the PDDL editor. Can an experienced coder advise me on whats wrong with my code? Much appreciated, thanks.
problem.pddl
(define (problem parking)
(:domain grid_world)
(:objects agent1 - agent
pt0pt0 pt0pt1 pt1pt1 - gridcell
)
(:init (at pt0pt0 agent1) (forward_next pt0pt0 pt0pt1) (forward_next pt0pt1 pt1pt1))
(:goal (at pt1pt1 agent1))
)
domain.pddl
(define (domain grid_world )
(:requirements :strips :typing)
(:types car
agent - car
gridcell
)
(:predicates (at ?pt1 - gridcell ?car - car)
(forward_next ?pt1 - gridcell ?pt2 - gridcell)
)
(:action FOWARD
:parameters ( ?agent - car ?pt1 - gridcell ?pt2 - gridcell)
:precondition (and (at ?pt1 ?agent))
:effect (and (not (at ?pt1 ?agent)) (forward_next ?pt1 ?pt2) (at ?pt2 ?agent))
)
)