-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdomain.txt
51 lines (50 loc) · 2.93 KB
/
domain.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
;; Starcraft PDDL Domain - by Kory Becker http://primaryobjects.com/kory-becker
;; Example from the node.js strips library http://npmjs.org/strips
(define (domain starcraft)
(:requirements :strips :typing)
(:types builder building area)
(:action move
:parameters (?b - builder ?t1 - area ?t2 - area)
:precondition (and (scv ?b) (location ?t1) (location ?t2) (at ?b ?t1) (not (at ?b ?t2))
:effect (and (at ?b ?t2)) (not (at ?b ?t1))))
(:action collect-minerals
:parameters (?b - builder ?t1 - area)
:precondition (and (scv ?b) (location ?t1) (minerals ?t1) (not (empty ?t1)) (at ?b ?t1))
:effect (and (empty ?t1) (collected-minerals ?b)))
(:action build-supply-depot
:parameters (?b - builder ?t1 - area)
:precondition (and (scv ?b) (location ?t1) (collected-minerals ?b) (at ?b ?t1) not (building ?t1) not (minerals ?t1))
:effect (and (building ?t1) (depot ?t1) not (collected-minerals ?b)))
(:action build-barracks
:parameters (?b - builder ?t1 - area ?t2 - area)
:precondition (and (scv ?b) (location ?t1) (location ?t2) (depot ?t2) (collected-minerals ?b) (at ?b ?t1) not (building ?t1) not (minerals ?t1))
:effect (and (building ?t1) (barracks ?t1) not (collected-minerals ?b)))
(:action build-factory
:parameters (?b - builder ?t1 - area ?t2 - area)
:precondition (and (scv ?b) (location ?t1) (location ?t2) (barracks ?t2) (collected-minerals ?b) (at ?b ?t1) not (building ?t1) not (minerals ?t1))
:effect (and (building ?t1) (factory ?t1) not (collected-minerals ?b)))
(:action build-starport
:parameters (?b - builder ?t1 - area ?t2 - area)
:precondition (and (scv ?b) (location ?t1) (location ?t2) (factory ?t2) (collected-minerals ?b) (at ?b ?t1) not (building ?t1) not (minerals ?t1))
:effect (and (building ?t1) (starport ?t1) not (collected-minerals ?b)))
(:action build-fusion-core
:parameters (?b - builder ?t1 - area ?t2 - area)
:precondition (and (scv ?b) (location ?t1) (location ?t2) (starport ?t2) (collected-minerals ?b) (at ?b ?t1) not (building ?t1) not (minerals ?t1))
:effect (and (building ?t1) (fusion-core ?t1) not (collected-minerals ?b)))
(:action train-marine
:parameters (?b - builder ?t1 - area)
:precondition (and (collected-minerals ?b) (barracks ?t1))
:effect (and (marine ?t1) not (collected-minerals ?b)))
(:action train-tank
:parameters (?b - builder ?t1 - area)
:precondition (and (collected-minerals ?b) (factory ?t1))
:effect (and (tank ?t1) not (collected-minerals ?b)))
(:action train-wraith
:parameters (?b - builder ?t1 - area)
:precondition (and (collected-minerals ?b) (starport ?t1))
:effect (and (wraith ?t1) not (collected-minerals ?b)))
(:action train-battlecruiser
:parameters (?b - builder ?t1 - area ?t2 - area)
:precondition (and (collected-minerals ?b) (starport ?t1) (fusion-core ?t2))
:effect (and (battlecruiser ?t1) not (collected-minerals ?b)))
)