DrappaV
DrappaV

Reputation: 21

Problem with PDDL code using conditional effects

I'm trying to solve a Pacman-styled PDDL problem and there's a particular scenario I've been stuck on for days now. I'm getting the classic

ff: goal can be simplified to FALSE. No plan will solve it

which means the issue is trivial and logic related. However, I'm new to PDDL and can't seem to figure out what's causing it.

The problem is simple, Pacman (P) has to eat the Food (F), but two ghost agents (G) are blocking it. To get past them, Pacman needs to consume the Capsule (C), making him invisible.

(Edit: I've deleted the question as it was part of an assignment. I managed to solve the issue and will post the solution as soon as the assignment is graded.)

Upvotes: 0

Views: 1993

Answers (1)

nirlipo
nirlipo

Reputation: 31

In this thread: About PDDL in AI planning @haz mentioned a good methodology to debug your PDDL Model when the goail is unreachable from the initial state.

The best way to test this out is to follow the following strategy: (1) write down a plan you know will solve it; (2) starting with the first action, set the goal to the precondition; (3) repeat to the end. If that fails, start changing the initial state to what you expect the complete state to be during the execution of the plan. – haz May 1 at 2:04

I uploaded a new version which is able to find a solution (if Ghosts are not in the path of foods):

http://editor.planning.domains/#read_session=c7Vez9nrti

Two main issues:

  • you never delete GhostPos, but it appears in the goal formula
  • If GhostPos is on the way to a FoodPos, then you can never reach the food as the move action requires not to be a Ghost.

Upvotes: 0

Related Questions