Public Member Functions | Private Member Functions | Private Attributes
rgoap.common.Action Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def __str__
def apply_effects
 following was for forward planner
def apply_preconditions
def check_freeform_context
 following for backward planner
def cost
def has_satisfying_effects
def is_valid
 following for executor
def run
def validate_cost

Private Member Functions

def _generate_variable_preconditions

Private Attributes

 _effects
 _preconditions

Detailed Description

Definition at line 284 of file common.py.


Constructor & Destructor Documentation

def rgoap.common.Action.__init__ (   self,
  preconditions,
  effects 
)

Definition at line 286 of file common.py.


Member Function Documentation

Definition at line 293 of file common.py.

Definition at line 290 of file common.py.

def rgoap.common.Action._generate_variable_preconditions (   self,
  var_effects,
  worldstate,
  start_worldstate 
) [private]
Let the action itself generate variable preconditions for its variable effects.

Must be implemented if the action contains variable effects.

Definition at line 373 of file common.py.

def rgoap.common.Action.apply_effects (   self,
  worldstate 
)

following was for forward planner

Definition at line 337 of file common.py.

def rgoap.common.Action.apply_preconditions (   self,
  worldstate,
  start_worldstate 
)
worldstate: the worldstate to apply this action's preconditions to
start_worldstate: needed to let actions optimize their variable precondition parameters

Definition at line 357 of file common.py.

following for backward planner

Override to add context checks required to run this action that cannot be satisfied by the planner.

Definition at line 345 of file common.py.

def rgoap.common.Action.cost (   self)
Return this action's cost value

Override to apply own cost calculation. The returned cost must not be
less than the number of declared effects!

To check this when overriding use validate_cost:
    def cost(self):
return self.validate_cost(..custom cost calculation..)

Definition at line 296 of file common.py.

def rgoap.common.Action.has_satisfying_effects (   self,
  worldstate,
  start_worldstate,
  unsatisfied_conditions 
)
Return True if at least one of own effects matches unsatisfied_conditions.

Definition at line 349 of file common.py.

def rgoap.common.Action.is_valid (   self,
  worldstate 
)

following for executor

Return whether this action is applicable from the given worldstate
on, i.e. all preconditions are valid.

Definition at line 328 of file common.py.

def rgoap.common.Action.run (   self,
  next_worldstate 
)
next_worldstate: the worldstate that this action should lead to when run

Definition at line 319 of file common.py.

def rgoap.common.Action.validate_cost (   self,
  cost 
)
Can be used to validate custom cost calculations, see cost()

Definition at line 308 of file common.py.


Member Data Documentation

Definition at line 286 of file common.py.

Definition at line 286 of file common.py.


The documentation for this class was generated from the following file:


rgoap
Author(s): Felix Kolbe
autogenerated on Sun Oct 5 2014 23:53:02