我在计划方面是新手,我正在寻求数字流利的帮助。这是一个样例领域和问题,它不是以我认为的方式工作的。
域:
(define (domain tequila)
(:requirements :typing :fluents)
(:types
bottle
)
(:functions
(amount ?b - bottle)
)
(:predicates
(bottle-finished ?b - bottle)
)
(:action drink
:parameters (?b - bottle)
:precondition (>= (amount ?b) 1)
:effect (decrease (amount ?b) 1)
)
(:action done-drinking
:parameters (?b - bottle)
:precondition (= (amount ?b) 0)
:effect (bottle-finished ?b)
)
)问题是:
(define (problem drink)
(:domain tequila)
(:objects
casamigos-anejo - bottle
)
(:init
(= (amount casamigos-anejo) 4)
)
; drink all the tequila
(:goal
(bottle-finished casamigos-anejo)
)
)我正在使用editor.planning.domains运行这些文件。我原以为计划是“喝,喝完了”,但它发现的计划是“喝完了”。有人能解释我是否做错了什么,或者它是否工作正常,我的期望是错误的(我确信我是从程序的角度考虑的)?谢谢。
发布于 2021-04-15 01:08:05
我知道这是一个老问题,但我已经为一个类似的问题挣扎了好几天!
我也需要使用:fluents,并且找到一个能够理解它的计划器并不是那么容易。
我终于找到了这个完美工作的METRIC-FF (patched version,我用的是这个)。
我试过你的代码,结果如下:
ff: parsing domain file
domain 'TEQUILA' defined
... done.
ff: parsing problem file
problem 'DRINK' defined
... done.
no metric specified. plan length assumed.
checking for cyclic := effects --- OK.
ff: search configuration is EHC, if that fails then best-first on 1*g(s) + 5*h(s) where
metric is plan length
Cueing down from goal distance: 5 into depth [1]
4 [1]
3 [1]
2 [1]
1 [1]
0
ff: found legal plan as follows
step 0: DRINK CASAMIGOS-ANEJO
1: DRINK CASAMIGOS-ANEJO
2: DRINK CASAMIGOS-ANEJO
3: DRINK CASAMIGOS-ANEJO
4: DONE-DRINKING CASAMIGOS-ANEJO
time spent: 0.00 seconds instantiating 2 easy, 0 hard action templates
0.00 seconds reachability analysis, yielding 1 facts and 2 actions
0.00 seconds creating final representation with 1 relevant facts, 2 relevant fluents
0.00 seconds computing LNF
0.00 seconds building connectivity graph
0.00 seconds searching, evaluating 6 states, to a max depth of 1
0.00 seconds total time我希望这能帮助其他一直在与这样的问题作斗争的人。
发布于 2020-04-24 21:01:06
不幸的是,目前,在线求解器只处理经典计划(ADL等)的扩展,不包括数值流畅。这种情况有望在不久的将来改变,但目前在线求解器无法处理这类问题。
发布于 2021-10-26 04:20:15
@haz,我不能让你的项目工作,但我检查了你捆绑包中的所有计划器,似乎没有一个真正的做数值计划。Metric-FF真的是唯一一个做数值规划的吗?当涉及到数值规划时,LPG是一堆垃圾。
https://stackoverflow.com/questions/61402519
复制相似问题