在开发规划算法时遇到问题

我正在尝试使用PDDL开发一个算法。下面我尝试定义域和问题文件

Domain File:(define (domain sp) (:requirements :typing) (:types    location agent item - object             robot human - agent             room - location            fruit cup table - item)(:predicates            (at ?o - object ?l - location)        (detected ?p - human  ?l - room)        (greeted ?r - robot ?p - human)    )    (:action detect        :parameters (?p - human ?i - item ?r - robot ?l - location)        :precondition (at ?r ?l)        :effect (and (at ?p ?l) (at ?r ?l))    )    (:action greet        :parameters (?r - robot ?p - human ?l - location)        :precondition (and (at ?r ?l) (detected ?p ?l))         :effect (greeted ?r ?p)    ))Problem File:(define (problem test12)(:domain sp)(:objects person0 - Human           pepper0 - Robot           apple - Fruit          cup0 - Cup          table0 - Table          room0 - Room)(:init(at pepper0 room0))(:goal (and         (detected person0 room0)        (greeted pepper0 person0)        )))

我希望实现的目标是

  1. 机器人在房间里
  2. 当人类进入房间时,机器人需要检测到人类
  3. 向人类问好
  4. 然后它需要检测房间里的其他物体(如杯子、水果等)

当我运行这段代码时,我遇到了以下错误。

solution-impossbibleff: parsing domain filedomain 'SP' defined ... done.ff: parsing problem fileproblem 'TEST12' defined ... done.ff: goal can be simplified to FALSE. No plan will solve it

我正确地遵循了语法,但它抛出了这个错误。我不确定该如何处理。有人能给我指个方向吗?如果可能的话,还能提供一些PDDL的调试资源吗?


回答:

输出本身并不是一个错误。它只是表明你的问题没有解决方案。问题在于(detected ?p ?l)从未被任何动作添加,并且不在你的初始状态中,因此你永远无法实现它。你可能需要将其作为detect动作的效果添加(而不是(at ?r ?l))。

Related Posts

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注