summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-11-22 22:35:43 -0600
committerHombreLaser <sebastian-440@live.com>2022-11-22 22:35:43 -0600
commitfd84d337bd6869a84c468868a6328e432ed9baea (patch)
tree6447630c35358b03d3e7a2599bb761faa743c145
parent0a945d8466e37a7b672dcf7e661ce71eb2b99b09 (diff)
Añadido dominio y ejemplo
-rw-r--r--domain.pddl30
-rw-r--r--example_problem.pddl7
2 files changed, 37 insertions, 0 deletions
diff --git a/domain.pddl b/domain.pddl
new file mode 100644
index 0000000..6250683
--- /dev/null
+++ b/domain.pddl
@@ -0,0 +1,30 @@
+(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 (in ?x ?origin))
+ (at ?x ?destination)
+ (in ?y ?x))) ;; Person in train.
+
+ (: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)))) \ No newline at end of file
diff --git a/example_problem.pddl b/example_problem.pddl
new file mode 100644
index 0000000..2eede06
--- /dev/null
+++ b/example_problem.pddl
@@ -0,0 +1,7 @@
+(define (problem EXAMPLE)
+ (:domain METRO)
+ (:objects A B C D - station
+ T - train
+ M - person)
+ (:INIT (connected A B) (connected B C) (connected C D) (at T A) (in M T))
+ (:goal (on M D))) \ No newline at end of file