artificial-intelligence - 开发规划算法时的问题
问题描述
我正在尝试使用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)
)
)
)
我想要实现的是
- 机器人在房间里
- 当人进入房间时,机器人需要检测到人
- 迎接人类
- 它必须检测房间中的其他物体(如杯子、水果等)
当我运行此代码时,我将出现以下错误。
solution-impossbible
ff: parsing domain file
domain 'SP' defined
... done.
ff: parsing problem file
problem 'TEST12' defined
... done.
ff: goal can be simplified to FALSE. No plan will solve it
我正确地遵循了语法,但它抛出了这个错误。我不知道该怎么做。谁能告诉我一个方向,如果可能的话,可以给我一些调试资源PDDL
吗?
解决方案
输出本身不是错误。它只是表明没有计划解决您的问题。问题是它(detected ?p ?l)
永远不会被任何操作添加并且不在您的初始状态,因此您将永远无法实现它。您可能希望将其添加为detect
动作的效果(而不是(at ?r ?l)
?)。
推荐阅读
- python - Django Channels:应用程序内部异常:消息类型app_consumer.notification_message没有处理程序
- python - 执行散列 python 代码(base64、sha256 或其他)
- postgresql - 使用带有 postgis 的 ST_Intersection 的错误结果
- ios - dyld:找不到符号 - iOS
- maven - 根据配置文件属性条件执行maven插件
- asp.net-web-api2 - 自定义 XML 格式化程序仅添加所需的命名空间
- amazon-web-services - 基于标签限制访问时无法访问其他角色
- mysql - MySQL多边形搜索过程
- android - 将 React Native 代码集成到现有的 android 项目中
- ios - 如何在 iOS 的应用内购买中获得活动产品的取消订阅?