-
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.
- Loading branch information
root
committed
Aug 18, 2018
1 parent
7a1cd48
commit 0af974e
Showing
7 changed files
with
338 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
; Taken from http://picat-lang.org/aips02/driverlog.pddl | ||
|
||
(define (domain driverlog) | ||
(:requirements :typing) | ||
(:types location locatable - object | ||
driver truck obj - locatable | ||
|
||
) | ||
(:predicates | ||
(at ?obj - locatable ?loc - location) | ||
(in ?obj1 - obj ?obj - truck) | ||
(driving ?d - driver ?v - truck) | ||
(link ?x ?y - location) (path ?x ?y - location) | ||
(empty ?v - truck) | ||
) | ||
|
||
|
||
(:action LOAD-TRUCK | ||
:parameters | ||
(?obj - obj | ||
?truck - truck | ||
?loc - location) | ||
:precondition | ||
(and (at ?truck ?loc) (at ?obj ?loc)) | ||
:effect | ||
(and (not (at ?obj ?loc)) (in ?obj ?truck))) | ||
|
||
(:action UNLOAD-TRUCK | ||
:parameters | ||
(?obj - obj | ||
?truck - truck | ||
?loc - location) | ||
:precondition | ||
(and (at ?truck ?loc) (in ?obj ?truck)) | ||
:effect | ||
(and (not (in ?obj ?truck)) (at ?obj ?loc))) | ||
|
||
(:action BOARD-TRUCK | ||
:parameters | ||
(?driver - driver | ||
?truck - truck | ||
?loc - location) | ||
:precondition | ||
(and (at ?truck ?loc) (at ?driver ?loc) (empty ?truck)) | ||
:effect | ||
(and (not (at ?driver ?loc)) (driving ?driver ?truck) (not (empty ?truck)))) | ||
|
||
(:action DISEMBARK-TRUCK | ||
:parameters | ||
(?driver - driver | ||
?truck - truck | ||
?loc - location) | ||
:precondition | ||
(and (at ?truck ?loc) (driving ?driver ?truck)) | ||
:effect | ||
(and (not (driving ?driver ?truck)) (at ?driver ?loc) (empty ?truck))) | ||
|
||
(:action DRIVE-TRUCK | ||
:parameters | ||
(?truck - truck | ||
?loc-from - location | ||
?loc-to - location | ||
?driver - driver) | ||
:precondition | ||
(and (at ?truck ?loc-from) | ||
(driving ?driver ?truck) (link ?loc-from ?loc-to)) | ||
:effect | ||
(and (not (at ?truck ?loc-from)) (at ?truck ?loc-to))) | ||
|
||
(:action WALK | ||
:parameters | ||
(?driver - driver | ||
?loc-from - location | ||
?loc-to - location) | ||
:precondition | ||
(and (at ?driver ?loc-from) (path ?loc-from ?loc-to)) | ||
:effect | ||
(and (not (at ?driver ?loc-from)) (at ?driver ?loc-to))) | ||
|
||
|
||
) |
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,48 @@ | ||
(define (problem DLOG-2-2-2) | ||
(:domain driverlog) | ||
(:objects | ||
driver1 - driver | ||
driver2 - driver | ||
truck1 - truck | ||
truck2 - truck | ||
package1 - obj | ||
package2 - obj | ||
s0 - location | ||
s1 - location | ||
s2 - location | ||
p1-0 - location | ||
p1-2 - location | ||
) | ||
(:init | ||
(at driver1 s2) | ||
(at driver2 s2) | ||
(at truck1 s0) | ||
(empty truck1) | ||
(at truck2 s0) | ||
(empty truck2) | ||
(at package1 s0) | ||
(at package2 s0) | ||
(path s1 p1-0) | ||
(path p1-0 s1) | ||
(path s0 p1-0) | ||
(path p1-0 s0) | ||
(path s1 p1-2) | ||
(path p1-2 s1) | ||
(path s2 p1-2) | ||
(path p1-2 s2) | ||
(link s0 s1) | ||
(link s1 s0) | ||
(link s0 s2) | ||
(link s2 s0) | ||
(link s2 s1) | ||
(link s1 s2) | ||
) | ||
(:goal (and | ||
(at driver1 s1) | ||
(at truck1 s1) | ||
(at package1 s0) | ||
(at package2 s0) | ||
)) | ||
|
||
|
||
) |
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,59 @@ | ||
(define (problem DLOG-2-2-3) | ||
(:domain driverlog) | ||
(:objects | ||
driver1 - driver | ||
driver2 - driver | ||
truck1 - truck | ||
truck2 - truck | ||
package1 - obj | ||
package2 - obj | ||
package3 - obj | ||
s0 - location | ||
s1 - location | ||
s2 - location | ||
p0-1 - location | ||
p0-2 - location | ||
p1-0 - location | ||
p2-1 - location | ||
) | ||
(:init | ||
(at driver1 s0) | ||
(at driver2 s0) | ||
(at truck1 s0) | ||
(empty truck1) | ||
(at truck2 s1) | ||
(empty truck2) | ||
(at package1 s2) | ||
(at package2 s1) | ||
(at package3 s1) | ||
(path s0 p0-1) | ||
(path p0-1 s0) | ||
(path s1 p0-1) | ||
(path p0-1 s1) | ||
(path s0 p0-2) | ||
(path p0-2 s0) | ||
(path s2 p0-2) | ||
(path p0-2 s2) | ||
(path s2 p2-1) | ||
(path p2-1 s2) | ||
(path s1 p2-1) | ||
(path p2-1 s1) | ||
(link s0 s2) | ||
(link s2 s0) | ||
(link s1 s0) | ||
(link s0 s1) | ||
(link s1 s2) | ||
(link s2 s1) | ||
) | ||
(:goal (and | ||
(at driver1 s1) | ||
(at driver2 s1) | ||
(at truck1 s2) | ||
(at truck2 s0) | ||
(at package1 s0) | ||
(at package2 s2) | ||
(at package3 s0) | ||
)) | ||
|
||
|
||
) |
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,59 @@ | ||
(define (problem DLOG-2-2-4) | ||
(:domain driverlog) | ||
(:objects | ||
driver1 - driver | ||
driver2 - driver | ||
truck1 - truck | ||
truck2 - truck | ||
package1 - obj | ||
package2 - obj | ||
package3 - obj | ||
package4 - obj | ||
s0 - location | ||
s1 - location | ||
s2 - location | ||
p0-1 - location | ||
p2-0 - location | ||
p2-1 - location | ||
) | ||
(:init | ||
(at driver1 s1) | ||
(at driver2 s0) | ||
(at truck1 s1) | ||
(empty truck1) | ||
(at truck2 s2) | ||
(empty truck2) | ||
(at package1 s0) | ||
(at package2 s0) | ||
(at package3 s1) | ||
(at package4 s1) | ||
(path s0 p0-1) | ||
(path p0-1 s0) | ||
(path s1 p0-1) | ||
(path p0-1 s1) | ||
(path s2 p2-0) | ||
(path p2-0 s2) | ||
(path s0 p2-0) | ||
(path p2-0 s0) | ||
(path s2 p2-1) | ||
(path p2-1 s2) | ||
(path s1 p2-1) | ||
(path p2-1 s1) | ||
(link s1 s0) | ||
(link s0 s1) | ||
(link s1 s2) | ||
(link s2 s1) | ||
(link s2 s0) | ||
(link s0 s2) | ||
) | ||
(:goal (and | ||
(at driver2 s2) | ||
(at truck1 s1) | ||
(at truck2 s2) | ||
(at package1 s1) | ||
(at package2 s1) | ||
(at package3 s2) | ||
)) | ||
|
||
|
||
) |
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,72 @@ | ||
(define (domain letseat) | ||
|
||
(:requirements :typing) | ||
|
||
(:types | ||
location locatable - object | ||
bot cupcake - locatable | ||
robot - bot | ||
) | ||
|
||
(:predicates | ||
(on ?obj - locatable ?loc - location) | ||
(holding ?arm - locatable ?cupcake - locatable) | ||
(arm-empty) | ||
(path ?location1 - location ?location2 - location) | ||
) | ||
|
||
|
||
(:action pick-up | ||
:parameters | ||
(?arm - bot | ||
?cupcake - locatable | ||
?loc - location) | ||
:precondition | ||
(and | ||
(on ?arm ?loc) | ||
(on ?cupcake ?loc) | ||
(arm-empty) | ||
) | ||
:effect | ||
(and | ||
(not (on ?cupcake ?loc)) | ||
(holding ?arm ?cupcake) | ||
(not (arm-empty)) | ||
) | ||
) | ||
|
||
(:action drop | ||
:parameters | ||
(?arm - bot | ||
?cupcake - locatable | ||
?loc - location) | ||
:precondition | ||
(and | ||
(on ?arm ?loc) | ||
(holding ?arm ?cupcake) | ||
) | ||
:effect | ||
(and | ||
(on ?cupcake ?loc) | ||
(arm-empty) | ||
(not (holding ?arm ?cupcake)) | ||
) | ||
) | ||
|
||
(:action move | ||
:parameters | ||
(?arm - bot | ||
?from - location | ||
?to - location) | ||
:precondition | ||
(and | ||
(on ?arm ?from) | ||
(path ?from ?to) | ||
) | ||
:effect | ||
(and | ||
(not (on ?arm ?from)) | ||
(on ?arm ?to) | ||
) | ||
) | ||
) |
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,19 @@ | ||
(define (problem letseat-simple) | ||
(:domain letseat) | ||
(:objects | ||
arm - robot | ||
cupcake - cupcake | ||
table - location | ||
plate - location | ||
) | ||
|
||
(:init | ||
(on arm table) | ||
(on cupcake table) | ||
(arm-empty) | ||
(path table plate) | ||
) | ||
(:goal | ||
(on cupcake plate) | ||
) | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.