Skip to content

Commit

Permalink
notes on the invalid issue KCL-Planning#22
Browse files Browse the repository at this point in the history
  • Loading branch information
guicho271828 committed Jan 28, 2018
1 parent efc868f commit a3d89ee
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ jdepend:
.PHONY : test
test: all
issue-21/run.sh
# issue-22/run.sh

# DO NOT DELETE THIS LINE -- makemake depends on it.

Expand Down
32 changes: 32 additions & 0 deletions issue-22/domain.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
(define (domain lights)
(:requirements :conditional-effects)
(:predicates
(light-on ?r)
(in ?r)
(CONNECTED ?r ?rn)
)

(:action toggle-light
:parameters (?room ?rightroom)
:precondition (and
(CONNECTED ?room ?rightroom))
:effect
(when (light-on ?room)
(and
(not (light-on ?room))
(when (in ?room) (and
(not (in ?room))
(in ?rightroom)))))))

;; Nested cond-effect is not allowed in the BNF definition of PDDL 3.1.
;; This issue is therefore invalid
;;
;; <effect> ::= (and <c-effect>*)
;; <effect> ::= <c-effect>
;; <c-effect> ::=:conditional−effects (forall (<typed list (variable)>) <effect>)
;; <c-effect> ::=:conditional−effects (when <GD> <cond-effect>)
;; <c-effect> ::= <p-effect>
;; <p-effect> ::= (not <atomic formula(term)>)
;; <p-effect> ::= <atomic formula(term)>
;; <cond-effect> ::= (and <p-effect>*)
;; <cond-effect> ::= <p-effect>
1 change: 1 addition & 0 deletions issue-22/plan
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(toggle-light room1 room2)
13 changes: 13 additions & 0 deletions issue-22/problem.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(define (problem p01)
(:domain lights)
(:objects
room1
room2
)
(:init
(light-on room1)
(in room1)
(CONNECTED room1 room2)
)
(:goal (in room2))
)
7 changes: 7 additions & 0 deletions issue-22/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

dir=$(dirname $(readlink -ef $0))

cd $dir

../validate -v domain.pddl problem.pddl plan

0 comments on commit a3d89ee

Please sign in to comment.