forked from KCL-Planning/VAL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notes on the invalid issue KCL-Planning#22
- Loading branch information
1 parent
efc868f
commit a3d89ee
Showing
5 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(toggle-light room1 room2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |