PDDL forall effect with durative actions

风格不统一 提交于 2020-08-09 07:36:47

问题


I am both using durative actions and trying to be able to clear a predicate over all elements of a certain type. See below. Is this possible? If so, does anyone know the correct syntax? Thanks!

    (:durative-action init
      :parameters (?r - robot)
      :duration ( = ?duration 1)
      :condition (and
             (at start (robot_uninitialized ?r))
             (at start (robot_free ?r))
                 )
      :effect (and
          (at start(not(robot_free ?r)))
          (at end (assign (robot_on_fastener_number_in_sequence) 1))
          (at end (not(robot_uninitialized ?r)))
          (at end (robot_free ?r))
          (at end (forall (?f - fastener) (not(fastener_selected ?f))))
          )
    )

I am running the popf planner and the error provided is: Syntax error in timed effect.


回答1:


The VAL parser indeed shows the Syntax error in timed effect error. I tried to invert the order of at end and forall and it stopped complaining. As popf is using the same parser, it should be happy with that syntax too.

  :effect (and
      (forall (?f - fastener) 
          (at end (not (fastener_selected ?f)))
      )
  )

But in the condition, VAL accepts the syntax in the opposite order:

    :condition (and
        (at end (forall (?f - fastener) 
            (fastener_selected ?f))
        )
    )

Full example: http://editor.planning.domains/#read_session=BCBDpV4YQE



来源:https://stackoverflow.com/questions/62522485/pddl-forall-effect-with-durative-actions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!