【PDDL语法学习】 了解领域文件(Domain)第四篇
作者:互联网
原文地址:https://planning.wiki/ref/pddl22/domain
推荐通过原文了解更多没有翻译到位的内容。
简介
PDDL2.2的域语法向域添加了非常小的更改。但是,与对PDDL的任何更新一样,它引入了新的 requirements,但惟一的新语法是派生谓词,谓词的定义方式与 actions 的定义方式类似,并且在域文件的同一节中定义。
先引入一个简单的实例:
(define
(domain railways)
(:requirements :derived-predicates :timed-initial-literals)
(:types
train station - object
)
(:predicates
(train-not-in-use ?t - train)
(train-has-guard ?t - train)
(train-has-driver ?t - train)
(train-usable ?t - train)
)
(:functions
... - omitted
)
(:durative-action MOVE-TRAIN
... - omitted
)
(:derived (train-usable ?t - train)
(and
(train-has-guard ?t)
(train-has-driver ?t)
)
)
(:derived
... - omitted
)
)
内容
- Requirements
- Deeived Predicates
- Timed Initial Literals
Requirements
(:requirements <requirement_name>)
PDDL2.2在PDDL语法中添加的Requirements。
- :derived-predicates
- :timed-initial-literals
1、Derived Predicates:
(:derived <predicate_name> <logical_expression>)
派生谓词是通过命名派生结果的谓词来声明的,并通过计算逻辑表达式来计算值。
注意,派生谓词的声明类似于actions,因为派生谓词的每个声明都使用 :derived关键字。
(:derived (train-usable ?t - train)
(and
(train-has-guard ?t)
(train-has-driver ?t)
)
)
上面的例子指定了火车只有在有火车和司机的情况下才可用。
2、Timed Initial Literals:
(:requirements :timed-initial-literals)
允许在定义Problem时使用定时初始字面值。
(:init
; 火车在step=10/sec=10的时候处于空闲状态,其中的数值设置由规划器默认设置为时间还是步骤
(at 10 (train-not-in-use t1))
References
- PDDL - The Planning Domain Definition Language, [Ghallab, M. Howe, A. Knoblock, C. McDermott, D. Ram, A. Veloso, M. Weld, D. Wilkins, D.]
- PDDL2.1: An Extension to PDDL for Expressing Temporal Planning Domains, [Fox, M. Long, D.]
- PDDL2.2: The Language for the Classical Part of the 4th International Planning Competition[Edelkamp, S. Hoffmann, J.]
- PDDL Examples
- OPTIC - Optimising Preferences and Time Dependent Costs
标签:PDDL,Domain,requirements,派生,derived,train,谓词,第四篇 来源: https://blog.csdn.net/dongbox_/article/details/121679226