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.
This is a helper function to iterate over the right-most statement of the program.
make_empty
(state, program[, commit_execution])print
()Attributes
Whether to commit the behavior execution.
The current program that is being expanded (middle).
The current planning result.
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:
result (CrowPlanningResult3)
program (CrowBehaviorOrderingSuite | None)
right_statements (Tuple[ScopedCrowExpression, ...])
commit_execution (bool)
- clone(result=UNSET, program=UNSET, right_statements=UNSET, commit_execution=UNSET)[source]#
- Return type:
- 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]
- 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.