simulatecraft.core.environment¶
simulatecraft.core.environment
¶
Base Environment: subclass for any domain without touching the runner.
Snapshot
¶
Bases: BaseModel
Domain-agnostic full-state snapshot served over REST / rendered by viewers.
Environment
¶
Bases: ABC
Owns all mutable simulation state.
Contract
observemay return partial state (partial observability is supported).stepmutates state for one agent and returns a StepResult.agent_idsmust reflect dynamic membership (spawn/death/exit).tickadvances environment-owned state (weather, NPC timers, physics).
Source code in src/simulatecraft/core/environment.py
observe
abstractmethod
¶
observe(agent_id: str) -> Observation | Awaitable[Observation]
step
abstractmethod
¶
step(agent_id: str, action: Action) -> StepResult | Awaitable[StepResult]