concepts.dm.crow.planners.regression_planning_impl.crow_regression_planner_astar_v2.CrowPlanningState2#

class CrowPlanningState2[source]#

Bases: NamedTuple

The planning state for the A* search algorithm.

Methods

clone([program, state, csp, scopes, ...])

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

iter_program_statements()

make_empty(program, state, csp[, ...])

print()

Attributes

commit_csp

Whether to commit the CSP.

commit_execution

Whether to commit the behavior execution.

commit_sketch

Whether to commit the sketch.

csp

The current constraint satisfaction problem.

latest_scope

The latest scope id.

left_statements

The (left) statements that have been executed.

program

The current program that is being expanded (middle).

right_statements

The statements that are waiting to be expanded.

scopes

The current scopes.

state

The current state of the planning.

statements_evaluations

Whether a statement has been evaluated.

__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, program, state, csp, scopes, latest_scope, left_statements, right_statements, statements_evaluations, commit_sketch=False, commit_csp=False, commit_execution=False)#

Create new instance of CrowPlanningState2(program, state, csp, scopes, latest_scope, left_statements, right_statements, statements_evaluations, commit_sketch, commit_csp, commit_execution)

Parameters:
clone(program=UNSET, state=UNSET, csp=UNSET, scopes=UNSET, latest_scope=UNSET, left_statements=UNSET, right_statements=UNSET, statements_evaluations=UNSET, commit_sketch=UNSET, commit_csp=UNSET, commit_execution=UNSET)[source]#
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_program_statements()[source]#
Return type:

Iterator[CrowAchieveExpression | CrowBindExpression | CrowRuntimeAssignmentExpression | CrowAssertExpression | CrowControllerApplicationExpression | CrowBehaviorApplicationExpression]

classmethod make_empty(program, state, csp, commit_execution=False, commit_sketch=False, commit_csp=False)[source]#
print()[source]#
commit_csp: bool#

Whether to commit the CSP.

commit_execution: bool#

Whether to commit the behavior execution.

commit_sketch: bool#

Whether to commit the sketch.

csp: ConstraintSatisfactionProblem#

The current constraint satisfaction problem.

latest_scope: int#

The latest scope id.

left_statements: Tuple[CrowControllerApplier, ...]#

The (left) statements that have been executed.

program: CrowBehaviorOrderingSuite | None#

The current program that is being expanded (middle).

right_statements: Tuple[RegressionStatement2, ...]#

The statements that are waiting to be expanded.

scopes: Dict[int, dict]#

The current scopes.

state: CrowState#

The current state of the planning.

statements_evaluations: Dict[int, bool]#

Whether a statement has been evaluated.