mirror of
https://github.com/RAIRLab/Spectra.git
synced 2025-10-05 22:21:20 +00:00
More tweaks
This commit is contained in:
parent
598f9b3dff
commit
f3ddd342c6
22 changed files with 710 additions and 175 deletions
|
@ -1 +1,15 @@
|
|||
{:name "bidding problem"
|
||||
:background []
|
||||
:start [(bid 0)]
|
||||
:goal [(bid 5)]
|
||||
:actions
|
||||
[(define-action post-new-bid (?number)
|
||||
{:preconditions [(bid ?number)]
|
||||
:additions [(bid ($$sum 1 ?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)])}
|
||||
|
|
|
@ -1,30 +1,63 @@
|
|||
{:name "Sim"
|
||||
:background []
|
||||
:start [(In self room1)
|
||||
(In commander room2)
|
||||
(In prisoner room1)
|
||||
(Open (door room2))
|
||||
(not (Open (door room1))) ]
|
||||
{:definitions
|
||||
{:name "Moving Between Rooms"
|
||||
:background [(not (= room1 room2))
|
||||
(forall [?x] (iff (Locked ?x) (not (Open ?x))))
|
||||
(forall [?x ?y ?z] (if (and (In ?x ?y) (not (= ?z ?y)))
|
||||
(not (In ?x ?z))))]
|
||||
:start [(In self room1)
|
||||
(In commander room2)
|
||||
(In prisoner room1)
|
||||
(Open (door room2))
|
||||
(not (Open (door room1)))]
|
||||
:goal []
|
||||
:actions
|
||||
[(define-action open-door [?room]
|
||||
{:preconditions [(not (Open (door ?room)))]
|
||||
:additions [(Open (door ?room))]
|
||||
:deletions [(not (Open (door ?room)))]})
|
||||
|
||||
: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)]})
|
||||
|
||||
(define-action accompany-from-to [?thing ?room1 ?room2]
|
||||
{:preconditions [(In self ?room1)
|
||||
(In ?thing ?room1)
|
||||
(Open (door ?room1))
|
||||
(Open (door ?room2))]
|
||||
(define-action interrogate [?A ?B]
|
||||
{:preconditions [(In ?room ?A)
|
||||
(In ?room ?B)]
|
||||
|
||||
:additions [(In ?thing ?room2)
|
||||
(In ?self ?room2)]
|
||||
:deletions [(In ?thing ?room1)
|
||||
(In self ?room1)]})]
|
||||
:additions [(Interrogates ?A ?B)]
|
||||
:deletions [(In ?thing ?room1)
|
||||
(In self ?room1)]})]
|
||||
}
|
||||
|
||||
:expected-plans ([(open-door room1)
|
||||
(accompany-from-to prisoner room1 room2)])
|
||||
:goals {G1 {:priority 1
|
||||
:state [(not (Open (door room1)))]}
|
||||
|
||||
G2 {:priority 1
|
||||
:state [(In prisoner room1)]}
|
||||
|
||||
G3 {:priority 1
|
||||
:state [(forall [?room]
|
||||
(if (In prisoner ?room)
|
||||
(In self ?room)))]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
BIN
target/classes/edu/rpi/rair/utils/GoalTrackingProblem.class
Normal file
BIN
target/classes/edu/rpi/rair/utils/GoalTrackingProblem.class
Normal file
Binary file not shown.
BIN
target/classes/edu/rpi/rair/utils/RunDemo.class
Normal file
BIN
target/classes/edu/rpi/rair/utils/RunDemo.class
Normal file
Binary file not shown.
BIN
target/test-classes/edu/rpi/rair/GoalTrackerTest.class
Normal file
BIN
target/test-classes/edu/rpi/rair/GoalTrackerTest.class
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue