Source:
Local role: Deterministic batch of ActionProjection instances for one actor/perception context.
Big-picture role: Batch transport object for first-order projection over a candidate action set.
Inheritance:
- dataclass
Parameters and fields:
- actor_id: str
- source_perception_id: str
- source_id: str
- projections: list[ActionProjection]
- metadata: dict
Methods:
to_dict() -> dictfrom_dict(data) -> ProjectionBatch
Example:
from ometeotl_core.model.projection import DefaultProjectionTool
tool = DefaultProjectionTool()
batch = tool.project_actions([action1, action2], perception, resources=[resource])
print(batch.actor_id)
for proj in batch.projections:
print(proj.action_id, proj.status)
data = batch.to_dict()
batch2 = batch.__class__.from_dict(data)
See also:
