Skip to content

World

sakshi.world

World-model helpers.

SimulationResult dataclass

Result of forward-model prediction.

predicted_state: dict[str, Any] instance-attribute

action_applied: str instance-attribute

confidence: float = 0.5 class-attribute instance-attribute

discrepancy: dict[str, Any] | None = None class-attribute instance-attribute

WorldSimulator

Simple forward model for predicting action outcomes.

simulate(current_state: dict[str, Any], last_action: dict[str, Any] | None = None) -> SimulationResult async

Predict the next state given current state and optional action.

detect_discrepancy(predicted: SimulationResult, actual_state: dict[str, Any]) -> dict[str, Any]

Compare predicted state against actual perceived state.

extract_last_action(cycle_trace: CycleTrace) -> dict[str, Any] | None

Extract ACT phase output from a completed cycle trace.