-
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.
Hooked in changes from ShadowProver and introduced grapevine domain
- Loading branch information
1 parent
f6e1dc1
commit 48971ad
Showing
3 changed files
with
129 additions
and
7 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
126 changes: 126 additions & 0 deletions
126
src/main/resources/org/rairlab/planner/problems/epistemic/grapevine.clj
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,126 @@ | ||
{:name "GrapeVine" | ||
:background [ | ||
(agent a) | ||
(agent b) | ||
(agent c) | ||
(room p1) | ||
(room p2) | ||
(not (= a b)) | ||
(not (= a c)) | ||
(not (= b c)) | ||
] | ||
:actions [ | ||
(define-action left [?a] { | ||
:preconditions [ | ||
(agent ?a) ; Type restriction | ||
(at ?a p2) | ||
] | ||
:additions [ | ||
(at ?a p1) | ||
(not (at ?a p2)) | ||
] | ||
:deletions [ | ||
(at ?a p2) | ||
(not (at ?a p1)) | ||
] | ||
}) | ||
|
||
|
||
(define-action right [?a] { | ||
:preconditions [ | ||
(agent ?a) ; Type restriction | ||
(at ?a p1) | ||
] | ||
:additions [ | ||
(at ?a p2) | ||
(not (at ?a p1)) | ||
] | ||
:deletions [ | ||
(at ?a p1) | ||
(not (at ?a p2)) | ||
] | ||
}) | ||
|
||
(define-action share-both [?a1 ?a2 ?a3 ?r] { | ||
:preconditions [ | ||
; Type restrictions | ||
(agent ?a1) | ||
(agent ?a2) | ||
(agent ?a3) | ||
(room ?r) | ||
; Precondition | ||
(at ?a1 ?r) | ||
(at ?a2 ?r) | ||
(at ?a3 ?r) | ||
(not (= ?a1 ?a2)) | ||
(not (= ?a1 ?a3)) | ||
(not (= ?a2 ?a3)) | ||
] | ||
:additions [ | ||
(Believes! ?a2 (the ?a1)) | ||
(Believes ?a3 (the ?a1)) | ||
(Believes ?a1 (Believes! ?a2 (the ?a1))) | ||
(Believes ?a1 (Believes! ?a3 (the ?a1))) | ||
] | ||
:deletions [ | ||
(not (Believes! ?a2 (the ?a1))) | ||
(not (Believes! ?a3 (the ?a1))) | ||
] | ||
}) | ||
|
||
(define-action share-single [?a1 ?a2 ?a3 ?r] { | ||
:preconditions [ | ||
; Type restrictions | ||
(agent ?a1) | ||
(agent ?a2) | ||
(agent ?a3) | ||
(room ?r) | ||
; Precondition | ||
(at ?a1 ?r) | ||
(at ?a2 ?r) | ||
(not (at ?a3 ?r)) | ||
(not (= ?a1 ?a2)) | ||
(not (= ?a1 ?a3)) | ||
(not (= ?a2 ?a3)) | ||
] | ||
:additions [ | ||
(Believes! ?a2 (the ?a1)) | ||
(Believes! ?a1 (Believes! ?a2 (the ?a1))) | ||
] | ||
:deletions [ | ||
(not (Believes! ?a2 (the ?a1))) | ||
] | ||
}) | ||
|
||
] | ||
:start [ | ||
; Locations | ||
(at a p1) | ||
(not (at a p2)) | ||
(at b p1) | ||
(not (at b p2)) | ||
(at c p1) | ||
(not (at c p2)) | ||
|
||
; Each agent has a secret | ||
(Believes! a (the a)) | ||
(Believes! b (the b)) | ||
(Believes! c (the c)) | ||
|
||
; No one believes a's secret | ||
(not (Believes! b (the a))) | ||
(not (Believes! c (the a))) | ||
] | ||
:goal [ | ||
(Believes! b (the a)) | ||
(Believes! a (Believes! b (the a))) | ||
(not (Believes! c (the a))) | ||
] | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|