jshop2基本概念

本文介绍了jshop2中的基本概念,包括Atom原子、动作、方法和Axioms原语。动作表示状态的转换,如拾取和放下物品;方法用于解决子任务,如交换两个物体的位置;Axioms原语定义了满足特定条件的状态。求解过程从目标任务开始,通过应用方法和动作更新状态,直至满足约束条件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Atom原子 (have ?a)

动作
(:operator (!pickup ?a) //名称 参数
  () //状态
  ((clear ?a) (on-table ?a)) //删除
  ((holding ?a)))    //添加

方法
(:method (swap ?x ?y) //名称 参数
         //名字1,可省略
     ((have ?x) (not (have ?y)))  //状态1
     ((!drop ?x) (!pickup ?y))  //步骤1(任务列表)
     ((have ?y) (not (have ?x)))  //状态2
     ((!drop ?y) (!pickup ?x))))  //步骤2

Axioms原语 (:- (need-to-move ?x)  //名称 参数, 当其任意状态为true时,原语为true
        ;; need to move x if x needs to go from one block to another //状态1名称,可省略
        ((on ?x ?y) (goal (on ?x ?z)) (not (same ?y ?z)))   //状态1
        ;; need to move x if x needs to go from table to block
        ((on-table ?x) (goal (on ?x ?z)))
        ;; need to move x if x needs to go from block to table
        ((on ?x ?y) (goal (on-table ?x)))
        ;; need to move x if x is on y and y needs to be clear
        ((on ?x ?y) (goal (clear ?y)))
        ;; need to move x if x is on z and something else needs to be on z
        ((on ?x ?z) (goal (on ?y ?z)) (not (same ?x ?y)))
        ;; need to move x if x is on something else that needs to be moved
        ((on ?x ?w) (need-to-move ?w))
    )

领域 (defdomain basic (
  (:operator (!pickup ?a) () () ((have ?a))) //动作
  (:operator (!drop ?a) ((have ?a)) ((have ?a)) ())

    (:method (swap ?x ?y)  //方法
      ((have ?x) (not (have ?y)))
      ((!drop ?x) (!pickup ?y))
      ((have ?y) (not (have ?x)))
      ((!drop ?y) (!pickup ?x)))))


问题 (defproblem problem basic //名称
  ((have kiwi))   //当前状态1
  ((swap banjo kiwi)))  //目标任务1
  
计划
[ 1 ]    (!drop kiwi) //动作
[ 2 ]    (!pickup banjo)

任务 = 动作/方法/状态
动作 = 状态变更
状态 = 原子/原语

求解过程:

目标任务 --方法--> 任务列表 --动作--> 状态 --约束--> 满足

            目标任务
    |
   |--方法--|
  子任务      子任务
     |
  |--动作--|
状态(约束)    状态
  |
 |-满足检查-|
  原子       原子

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值