concepts.dm.crow.action.CrowAction#
- class CrowAction[source]#
Bases:
object
An action definition in the CROW planner has the following components:
name: the name of the action.
arguments: the arguments of the action.
goal: the goal of the action.
body: the body of the action.
preconditions: the preconditions of the action. This is equivalent to having an “assert” statement at the beginning of the body.
effects: the effects of the action. This section will update the state of the world.
Methods
assign_body_program_scope
(scope_id)Assign the program scope to the body.
Check if the action 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 action.
The arguments of the action.
The goal of the action.
The body of the action.
The preconditions of the action.
The effects of the action.
Whether the action is always feasible.
- __init__(name, arguments, goal, body, preconditions, effects, always=True)[source]#
Initialize a new action.
- Parameters:
name (str) – the name of the action.
arguments (Sequence[Variable]) – the arguments of the action.
goal (ValueOutputExpression) – the goal of the action.
body (CrowActionOrderingSuite) – the body of the action.
preconditions (Sequence[CrowPrecondition]) – the preconditions of the action.
effects (Sequence[CrowEffect]) – the effects of the action.
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 action 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: CrowActionOrderingSuite#
The body of the action.
- effects: Tuple[CrowEffect, ...]#
The effects of the action.
- goal: ValueOutputExpression#
The goal of the action.
- preconditions: Tuple[CrowPrecondition, ...]#
The preconditions of the action.