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.

is_sequential_only()

Check if the action body contains only sequential statements (i.e., no preamble and promotable).

long_str()

short_str()

Attributes

argument_names

The names of the arguments.

argument_types

The types of the arguments.

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.

effects

The effects of the action.

always

Whether the action is always feasible.

__init__(name, arguments, goal, body, preconditions, effects, always=True)[source]#

Initialize a new action.

Parameters:
__new__(**kwargs)#
assign_body_program_scope(scope_id)[source]#

Assign the program scope to the body.

Parameters:

scope_id (int) –

Return type:

CrowActionOrderingSuite

is_sequential_only()[source]#

Check if the action body contains only sequential statements (i.e., no preamble and promotable).

Return type:

bool

long_str()[source]#
short_str()[source]#
always: bool#

Whether the action is always feasible.

property argument_names: Tuple[str, ...]#

The names of the arguments.

property argument_types: Tuple[ObjectType | ValueType, ...]#

The types of the arguments.

arguments: Tuple[Variable, ...]#

The arguments of the action.

body: CrowActionOrderingSuite#

The body of the action.

effects: Tuple[CrowEffect, ...]#

The effects of the action.

goal: ValueOutputExpression#

The goal of the action.

name: str#

The name of the action.

preconditions: Tuple[CrowPrecondition, ...]#

The preconditions of the action.