类人PDDL计划-计划不能包括类人反应和条件结果



我是PDDL和AI规划领域的新手。事实上,我正在制定一个计划,让人形机器人在一个场景中与人类互动。场景如下

  1. 人类进入房间(房间内有机器人和一些物体(
  2. 机器人检测人类
  3. 检测后向人类致意
  4. 然后人类要了一个杯子
  5. 机器人假设人类想喝咖啡,并在人类服药的时间对人类做出反应(药物和咖啡之间应该有1小时的间隔(
  6. 人类会随着时间而反应
  7. 如果时间与1小时的间隔相匹配,机器人会回应说它会找到杯子
  8. 机器人检测桌子上的杯子
  9. 机器人回应人类杯子在桌子上
  10. 人挑杯子
  11. 机器人在检测到人类拿着杯子后迎接人类

我的PDDL域文件逻辑如下:

(define (domain sp)
(:requirements :typing :strips :adl)

(:types    location agent item - object 
robot human speak - agent 
room - location
fruit cup table - item
clear polite listenatt - speak)
(:predicates    
(at ?o - object ?l - location)
(detected_human ?p - human  ?l - room)
(greeted ?r - robot ?p - human)
(detected_cup ?c - cup  ?l - room)
(holded ?c - cup ?p - human)
(medichecked ?r - robot ?p - human)
(human_asked ?p - human)
(robot_responded ?r - robot ?cl - clear ?pl - polite)
)

(:action detect_human
:parameters (?p - human ?r - robot ?l - location)
:precondition (at ?r ?l)
:effect (detected_human ?p ?l)
)
(:action detect_cup
:parameters (?p - human ?c - cup ?r - robot ?l - location )
:precondition (and (detected_human ?p ?l) 
(human_asked ?p) 
(medichecked ?r ?p) 
)
:effect (detected_cup ?c ?l) 
)
(:action greet
:parameters (?r - robot ?p - human ?l - location ?pl - polite ?cl - clear)
:precondition (and (at ?r ?l) (detected_human ?p ?l)) 
:effect (and (greeted ?r ?p) (robot_responded ?r ?cl ?pl))
)
(:action hold
:parameters (?c - cup ?p - human ?l - location ?r - robot ?cl - clear ?pl - polite)
:precondition (and (detected_human ?p ?l) 
(detected_cup ?c ?l) 
(robot_responded ?r ?cl ?pl) 
(medichecked ?r ?p) 
) 
:effect (holded ?c ?p)
)    

(:action check_medi
:parameters (?p - human ?l - location ?r - robot)
:precondition (human_asked ?p) 
:effect (medichecked ?r ?p)
)  

(:action human_ask
:parameters (?p - human ?l - location ?r - robot)
:precondition (and (detected_human ?p ?l) (greeted ?r ?p))
:effect (human_asked ?p)
)  

(:action robot_respond
:parameters (?p - human ?l - location ?r - robot ?cl - clear ?pl - polite ?c -cup)
:precondition (and (at ?r ?l) (detected_human ?p ?l)) 
:effect (and (when (human_asked ?p) (robot_responded ?r ?cl ?pl))
(when (detected_cup ?c ?l) (robot_responded ?r ?cl ?pl)))
)  
)

我的PDDL问题文件如下:

(define (problem test12)
(:domain sp)
(:objects person0 - Human 
pepper0 - Robot 
apple - Fruit
cup0 - Cup
table0 - Table
room0 - Room
clear0 - Clear
polite0 - Polite)
(:init
(at pepper0 room0)

)
(:goal (holded cup0 person0)
)

目前它生成以下计划:


plan-found
(detect_human person0 pepper0 room0)
(greet pepper0 person0 room0 polite0 clear0)
(human_ask person0 room0 pepper0)
(check_medi person0 room0 pepper0)
(detect_cup person0 cup0 pepper0 room0)
(hold cup0 person0 room0 pepper0 clear0 polite0)

我希望预期的计划是这样的:


plan-found
(detect_human person0 pepper0 room0)
(greet pepper0 person0 room0 polite0 clear0)
(human_ask person0 room0 pepper0)
(robot_respond person0 polite0 clear0 room0)
(check_medi person0 room0 pepper0)
(robot_respond person0 polite0 clear0 room0)
(detect_cup person0 cup0 pepper0 room0)
(robot_respond person0 polite0 clear0 room0)
(hold cup0 person0 room0 pepper0 clear0 polite0)

我不知道为什么robot_respond行动从未出现在计划中,即使它在效果和前提条件中给出了。

如果在这个问题上有任何方向,我将不胜感激。一个多星期以来,我一直在努力使逻辑正确。

这是"机器人响应"动作不可或缺的吗?我的意思是,看起来你没有在动作中设置任何效果"机器人响应"作为其他人的条件,或者可能在动作"问候"中满足相同的谓词"(机器人响应("?

相关内容

  • 没有找到相关文章

最新更新