コード例 #1
0
 def __init__(self,
              name,
              parameters,
              condition,
              effect,
              refinement=tuple(),
              cost=None):
     Action.__init__(self, name, parameters, condition, effect, cost=cost)
     Refinable.__init__(self, refinement)
コード例 #2
0
 def __init__(self, min_safe_p=.95):
     obj, d1, d2 = Param(OBJ), Param(DIST), Param(DIST)
     Action.__init__(
         self,
         self.__class__.__name__,
         [obj, d],
         And(
             BClean(obj, d1),
             IsClean(d1, d2),
             #BAtAbove(obj, p1, min_safe_p)
         ),
         And(
             BClean(obj, d2),
             #Not(At(obj, p1)),
             Not(BClean(obj, d1))),
         cost=1)
コード例 #3
0
 def __init__(self, min_safe_p=.95):
     obj, p1, p2, b = Param(OBJ), Param(POSE), Param(POSE), Param(BELIEF)
     Action.__init__(
         self,
         self.__class__.__name__,
         [obj, p1, p2, b],
         And(
             #At(obj, p1),
             BAt(obj, p1, b),
             BAtAbove(obj, p1, min_safe_p)),
         And(
             #At(obj, p2),
             BAt(obj, p2, b),
             #Not(At(obj, p1)),
             Not(BAt(obj, p1, b))),
         cost=1)