我是 PDDL 的新手,我正在尝试解决机器人清洁器问题,但我不明白为什么会遇到这个问题。
读取输入... [t=0s] 简化转换... 完成!完成阅读输入![t=0s] 构建因果图...完成![t=0s] 打包状态变量...完成![t=0s] 变量:1 事实:每个状态 2 个字节:4 完成初始化全局数据 [t=0s] 进行最佳首次搜索并重新打开封闭节点,(实际)边界 = 2147483647 正在初始化 FF 启发式...正在初始化附加启发式。 .. 简化 0 个一元运算符... 完成![0 一元运算符] 初始状态是死胡同。完全探索状态空间——无解!实际搜索时间:0s [t=0s] 扩展 0 状态。重新打开 0 个状态。评估了 1 个州。评估:1 生成 0 个状态。死胡同:0 个状态。注册状态数:1 搜索时间:0s 总时间:0s 搜索停止,没有找到解决方案。峰值内存:2936 KB
(define (domain floor-tile)
(:requirements :typing)
;; We have two types: robots and the tiles, both are objects
(:types robot tile - object)
;; define all the predicates as they are used in the probem files
(:predicates
;; described what tile a robot is at
(robot-at ?r - robot ?x - tile)
;; indicates that tile ?x is above tile ?y
(up ?x - tile ?y - tile)
;; indicates that tile ?x is below tile ?y
(down ?x - tile ?y - tile)
;; indicates that tile ?x is right of tile ?y
(right ?x - tile ?y - tile)
;; indicates that tile ?x is left of tile ?y
(left ?x - tile ?y - tile)
;; indicates that a tile is clear (robot can move there)
(clear ?x - tile)
;; indicates that a tile is cleaned
(cleaned ?x - tile)
)
(:action clear
:parameters (?r - robot?x - tile ?y - tile)
:precondition (and (robot-at ?r ?x) (clear ?x))
:effect (when (cleaned ?x) (not(clear ?x)))
)
(:action clean-up
:parameters (?r - robot ?x - tile ?y - tile)
:precondition (and (up ?y ?x) (robot-at ?r ?x) (clear ?y))
:effect (and (robot-at ?r ?y) (not(robot-at ?r ?x)))
)
(:action clean-down
:parameters (?r - robot?x - tile ?y - tile)
:precondition (and (down ?y ?x) (robot-at ?r ?x) (clear ?y))
:effect (and (robot-at ?r ?y) (not(robot-at ?r ?x)))
)
(:action up
:parameters (?r - robot?x - tile ?y - tile)
:precondition (and (up ?y ?x) (robot-at ?r ?x) (clear ?y))
:effect (and (robot-at ?r ?y) (not(robot-at ?r ?x)))
)
(:action down
:parameters (?r - robot?x - tile ?y - tile)
:precondition (and (down ?y ?x) (robot-at ?r ?x)(clear ?y))
:effect (and (robot-at ?r ?y) (not(robot-at ?r ?x)))
)
(:action right
:parameters (?r - robot?x - tile ?y - tile)
:precondition (and (right ?y ?x) (robot-at ?r ?x) (clear ?y))
:effect (and (robot-at ?r ?y) (not(robot-at ?r ?x)))
)
(:action left
:parameters (?r - robot?x - tile ?y - tile)
:precondition (and (left ?y ?x) (robot-at ?r ?x) (clear ?y))
:effect (and (robot-at ?r ?y ) (not(robot-at ?r ?x)))
)
)
问题:
(define (problem prob001)
(:domain floor-tile)
(:objects tile_0-1 tile_0-2
tile_1-1 tile_1-2
tile_2-1 tile_2-2 - tile
robot1 - robot
)
(:init
(robot-at robot1 tile_1-1)
(clear tile_0-1)
(clear tile_0-2)
(clear tile_1-2)
(clear tile_2-1)
(clear tile_2-2)
(up tile_1-1 tile_0-1)
(up tile_1-2 tile_0-2)
(up tile_2-1 tile_1-1)
(up tile_2-2 tile_1-2)
(down tile_0-1 tile_1-1)
(down tile_0-2 tile_1-2)
(down tile_1-1 tile_2-1)
(down tile_1-2 tile_2-2)
(right tile_0-2 tile_0-1)
(right tile_1-2 tile_1-1)
(right tile_2-2 tile_2-1)
(left tile_0-1 tile_0-2)
(left tile_1-1 tile_1-2)
(left tile_2-1 tile_2-2)
)
(:goal (and
(cleaned tile_0-1)
(cleaned tile_0-2)
(cleaned tile_1-1)
(cleaned tile_2-2)
))
)