summaryrefslogtreecommitdiff
path: root/domain.pddl
blob: 6c4e364e7ab031a422e9e9ddc15d70fc2324a03a (plain)
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
(define (domain METRO)
  (:requirements :strips :typing)
  (:types person
	  station
	  train)
  (:predicates (at ?x - train ?y - station)
	       (in ?x - person ?y - train)
	       (on ?x - person ?y - station)
	       (connected ?x - station ?y - station))

  (:action goto
	   :parameters (?origin - station ?destination - station ?x - train ?y - person)
	   :precondition (and (connected ?origin ?destination) (at ?x ?origin) (in ?y ?x))
	   :effect
	   (and (not (at ?x ?origin))
		(at ?x ?destination)
		(in ?y ?x))) ;; Person in train.

  (:action gofrom
	   :parameters (?destination - station ?origin - station ?x - train ?y - person)
	   :precondition (and (connected ?destination ?origin) (at ?x ?origin) (in ?y ?x))
	   :effect
	   (and (not (at ?x ?origin))
		(at ?x ?destination)
		(in ?y ?x)))

  (:action exit
	   :parameters (?x - train ?y - person ?destination - station)
	   :precondition (and (in ?y ?x) (at ?x ?destination))
	   :effect
	   (and (not (in ?y ?x))
		(on ?y ?destination)))

  (:action getin
	   :parameters (?x - train ?y - person)
	   :precondition (and (not (in ?y ?x)))
	   :effect
	   (and (in ?y ?x))))