Source:
Local role: Minimal concrete ProjectionTool that turns action/perception/resource inputs into explicit assumptions and one projected successor perceived state without executing actions or building strategy nodes.
Big-picture role: First-order strategizing helper: it prepares both the assumption basis and the next perceived state that later strategy-building steps may consume.
Inheritance:
Methods:
project_action(action, perception, resources=()) -> ActionProjection- Builds ProjectionAssumption entries for actor binding, source context, space binding, each
ResourceEffect(indexed aseffect:{idx}:…), and eachActionPrerequisite(indexed asprerequisite:{idx}:…). - For
consume/transfereffects, verifies that the resource has aPerceivedMembershipineffect.source_id(oraction.space_idas fallback); setssatisfied=Falsewhen the resource is not perceived there. - Calls
_build_projected_perception_stateand attaches the result asprojected_state. - Status is
"projected"when all required resources are satisfied and the actor matches;"partial"if resources or actor mismatch;"blocked"otherwise.
- Builds ProjectionAssumption entries for actor binding, source context, space binding, each
- inherited
project_actions(actions, perception, resources=()) -> ProjectionBatch
Resource projection modes:
- Discrete (
resource_mode != "stock"orquantity == 1.0): consume removesPerceivedMembership, produce appends one, transfer moves membership between spaces. - Stock (
resource_mode == "stock"andquantity != 1.0): writes a cumulative delta toperception.context["projected_stock_deltas"]instead of changing memberships.
Related module-level function:
See also:
