Source:
Local role: Declarative strategy tree composed of StrategyNode objects and their StrategyOutcomeBranch links.
Big-picture role: Current strategy-layer root object. It is the first model-level structure that chains action projections through successive perceived states.
Inheritance:
Parameters and fields:
- id: str
- actor_id: str
- goal_id: Optional[str]
- root_node_id: str
- nodes: list[StrategyNode]
- projection_policy: str
Methods:
add_node(node) -> Noneget_node(node_id) -> Optional[StrategyNode]validate_tree() -> Noneto_dict() -> dictfrom_dict(data) -> Strategy
Important behavior:
- validates that
root_node_idexists - validates branch ids are unique per node
- validates branch child references
- validates that child nodes consume the parent node’s projected successor perception when a parent branch links to that child
Builder functions in the same source module:
build_linear_strategy(...)build_branching_strategy(...)
See also:
