mirror of
https://github.com/RAIRLab/Spectra.git
synced 2024-11-28 20:03:18 -05:00
85 lines
No EOL
3.1 KiB
Clojure
85 lines
No EOL
3.1 KiB
Clojure
{:definitions
|
|
{:name "demo 1"
|
|
:background [
|
|
(forall [?x ?room1 ?room2]
|
|
(if (not (= ?room1 ?room2))
|
|
(if (in ?x ?room1) (not (in ?x ?room2))) ))
|
|
(not (= room1 room2))
|
|
(not (= prisoner commander))
|
|
(not (= self prisoner))
|
|
(not (= self commander))
|
|
(person prisoner)
|
|
(person commander)
|
|
]
|
|
: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)))]})
|
|
|
|
|
|
|
|
(define-action accompany [?person ?room1 ?room2]
|
|
{:preconditions [(not (= ?room1 ?room2))
|
|
(in ?person ?room1)
|
|
(in self ?room1)
|
|
(open (door ?room1))
|
|
(open (door ?room2))]
|
|
|
|
:additions [(in ?person ?room2)
|
|
(in self ?room2)]
|
|
|
|
:deletions [(in ?person ?room1)
|
|
(in self ?room1)]})
|
|
|
|
(define-action move [?person ?room2 ?room1]
|
|
{:preconditions [(not (= ?room1 ?room2))
|
|
(in ?person ?room2)
|
|
(open (door ?room1))
|
|
(open (door ?room2))]
|
|
|
|
:additions [(in ?person ?room1)]
|
|
|
|
:deletions [(in ?person ?room2)]})
|
|
|
|
(define-action get-interrogated [?room]
|
|
{:preconditions [(in commander ?room)
|
|
(in prisoner ?room)]
|
|
|
|
:additions [(interrogates commander prisoner)]
|
|
|
|
:deletions []})
|
|
]
|
|
}
|
|
|
|
:goals {G1 {:priority 1.0
|
|
:state [(not (open (door room1)))]}
|
|
|
|
G2 {:priority 1.0
|
|
:state [(in prisoner room1)]}
|
|
|
|
G3 {:priority 1.0
|
|
:state [(forall [?room]
|
|
(if (in prisoner ?room)
|
|
(in self ?room)))]}
|
|
|
|
G4 {:priority 2.0
|
|
|
|
:state [(interrogates commander prisoner)]}
|
|
|
|
G5 {:priority 1.0
|
|
:state [(in prisoner room2)
|
|
(in self room2)]}
|
|
|
|
|
|
}
|
|
|
|
} |