mirror of
https://github.com/RAIRLab/Spectra.git
synced 2026-01-19 00:51:00 +00:00
better toString for actions and some more tests.
This commit is contained in:
parent
8c78a2f8e5
commit
598f9b3dff
10 changed files with 307 additions and 44 deletions
|
|
@ -8,7 +8,7 @@
|
|||
:additions [R]
|
||||
:deletions [Q]})]
|
||||
|
||||
:expected-plan [a1]
|
||||
:expected-plans ([a1])
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -119,4 +119,54 @@
|
|||
[(define-action post-new-bid (?number)
|
||||
{:preconditions [(bid ?number)]
|
||||
:additions [(bid ($$sum 1 ?number))]
|
||||
:deletions [(bid ?number)]})]}
|
||||
:deletions [(bid ?number)]})]
|
||||
|
||||
:expected-plans ([(post-new-bid 0)
|
||||
(post-new-bid 1)
|
||||
(post-new-bid 2)
|
||||
(post-new-bid 3)
|
||||
(post-new-bid 4)])}
|
||||
|
||||
{:name "Moving Between Rooms"
|
||||
:background [ (not (= room1 room2))]
|
||||
:start [(In self room1)
|
||||
(In commander room2)
|
||||
(In prisoner room1)
|
||||
(Open (door room2))
|
||||
(not (Open (door room1))) ]
|
||||
:goal [(In prisoner room2)]
|
||||
:actions
|
||||
[(define-action open-door [?room]
|
||||
{:preconditions [(not (Open (door ?room)))]
|
||||
:additions [(Open (door ?room))]
|
||||
:deletions [(not (Open (door ?room)))]})
|
||||
|
||||
(define-action move-thing-from-to [?thing ?room1 ?room2]
|
||||
{:preconditions [(not (= ?room1 ?room2))
|
||||
(In ?thing ?room1)
|
||||
(Open (door ?room1))
|
||||
(Open (door ?room2))]
|
||||
|
||||
:additions [(In ?thing ?room2)]
|
||||
:deletions [(In ?thing ?room1)
|
||||
(In self ?room1)]})
|
||||
(define-action accompany-from-to [?thing ?room1 ?room2]
|
||||
{:preconditions [(not (= ?room1 ?room2))
|
||||
(In self ?room1)
|
||||
(In ?thing ?room1)
|
||||
(Open (door ?room1))
|
||||
(Open (door ?room2))]
|
||||
|
||||
:additions [(In ?thing ?room2)
|
||||
(In ?self ?room2)]
|
||||
:deletions [(In ?thing ?room1)
|
||||
(In self ?room1)]})]
|
||||
|
||||
:expected-plans ([(open-door room1)
|
||||
(accompany-from-to prisoner room1 room2)]
|
||||
|
||||
[(open-door room1)
|
||||
(move-thing-from-to prisoner room1 room2)])
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue