concepts.dm.crow.planners.regression_planning_impl.crow_regression_planner_iddfs_v1.CrowPlanningState3#

class CrowPlanningState3[source]#

Bases: NamedTuple

CrowPlanningState3(result, program, right_statements, commit_execution)

Methods

clone([result, program, right_statements, ...])

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

iter_from_right()

This is a helper function to iterate over the right-most statement of the program.

iter_program_statements()

make_empty(state, program[, commit_execution])

print()

Attributes

commit_execution

Whether to commit the behavior execution.

program

The current program that is being expanded (middle).

result

The current planning result.

right_statements

The statements that are waiting to be expanded.

__add__(value, /)#

Return self+value.

__getitem__(key, /)#

Return self[key].

__init__()#
__iter__()#

Implement iter(self).

__len__()#

Return len(self).

__mul__(value, /)#

Return self*value.

static __new__(_cls, result, program, right_statements, commit_execution=False)#

Create new instance of CrowPlanningState3(result, program, right_statements, commit_execution)

Parameters:
clone(result=UNSET, program=UNSET, right_statements=UNSET, commit_execution=UNSET)[source]#
Return type:

CrowPlanningState3

count(value, /)#

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)#

Return first index of value.

Raises ValueError if the value is not present.

iter_from_right()[source]#

This is a helper function to iterate over the right-most statement of the program.

  • When self.right_statements is empty, this function iterates over the right-most statement of the middle program.

  • When self.right_statements is not empty, this function simply pops the right-most statement and returns the new planning state.

Return type:

Iterator[Tuple[CrowPlanningState3, CrowBehaviorOrderingSuite | CrowBehaviorForeachLoopSuite | CrowBehaviorWhileLoopSuite | CrowBehaviorConditionSuite | CrowBindExpression | CrowAssertExpression | CrowRuntimeAssignmentExpression | CrowControllerApplicationExpression | CrowAchieveExpression | CrowUntrackExpression | CrowBehaviorApplicationExpression | CrowBehaviorEffectApplicationExpression | CrowBehaviorCommit, CrowBehaviorOrderingSuite | None, int]]

iter_program_statements()[source]#
Return type:

Iterator[CrowBehaviorOrderingSuite | CrowBehaviorForeachLoopSuite | CrowBehaviorWhileLoopSuite | CrowBehaviorConditionSuite | CrowBindExpression | CrowAssertExpression | CrowRuntimeAssignmentExpression | CrowControllerApplicationExpression | CrowAchieveExpression | CrowUntrackExpression | CrowBehaviorApplicationExpression | CrowBehaviorEffectApplicationExpression | CrowBehaviorCommit]

classmethod make_empty(state, program, commit_execution=True)[source]#
print()[source]#
commit_execution: bool#

Whether to commit the behavior execution.

program: CrowBehaviorOrderingSuite | None#

The current program that is being expanded (middle).

result: CrowPlanningResult3#

The current planning result.

right_statements: Tuple[ScopedCrowExpression, ...]#

The statements that are waiting to be expanded.