concepts.dm.crow.behavior.CrowBehavior#
- class CrowBehavior[source]#
Bases:
object
A behavior definition in the CROW planner has the following components:
name: the name of the behavior.
arguments: the arguments of the behavior.
goal: the goal of the behavior.
body: the body of the behavior.
preconditions: the preconditions of the behavior. This is equivalent to having an “assert” statement at the beginning of the body.
effects: the effects of the behavior. This section will update the state of the world.
heuristic: the heuristic of the behavior. This is used to guide the search process.
minimize: the expression to minimize. This is used to guide the search process.
Methods
assign_body_program_scope
(scope_id)Assign the program scope to the body.
Check if the behavior body contains only sequential statements (i.e., no preamble and promotable).
long_str
()Attributes
The names of the arguments.
The types of the arguments.
The name of the behavior.
The arguments of the behavior.
The goal of the behavior.
The body of the behavior.
The effects of the behavior.
The heuristic of the behavior.
The expression to minimize.
Whether the behavior is always feasible.
- __init__(name, arguments, goal, body, effect_body=None, heuristic=None, minimize=None, always=True)[source]#
Initialize a new behavior.
- Parameters:
name (str) – the name of the behavior.
arguments (Sequence[Variable]) – the arguments of the behavior.
goal (ValueOutputExpression | None) – the goal of the behavior.
body (CrowBehaviorOrderingSuite) – the body of the behavior.
effect_body (CrowBehaviorOrderingSuite | None) – the body of the effects.
heuristic (CrowBehaviorOrderingSuite | None) – the heuristic of the behavior.
minimize (ValueOutputExpression | None) – the expression to minimize.
always (bool)
- __new__(**kwargs)#
- assign_body_program_scope(scope_id)[source]#
Assign the program scope to the body.
- Parameters:
scope_id (int)
- Return type:
- is_sequential_only()[source]#
Check if the behavior body contains only sequential statements (i.e., no preamble and promotable).
- Return type:
- property argument_types: Tuple[ObjectType | ValueType, ...]#
The types of the arguments.
- body: CrowBehaviorOrderingSuite#
The body of the behavior.
- effect_body: CrowBehaviorOrderingSuite#
The effects of the behavior.
- goal: ValueOutputExpression#
The goal of the behavior.
- heuristic: CrowBehaviorOrderingSuite | None#
The heuristic of the behavior.
- minimize: ValueOutputExpression | None#
The expression to minimize.