simulatecraft.core.runner¶
simulatecraft.core.runner
¶
Async simulation loop: Environment + Agents + EventBus.
The Runner never inspects what kind of Brain an agent uses. All observability flows through the EventBus; with zero subscribers everything still runs.
RunnerConfig
¶
Bases: BaseModel
tick_rate=None runs as fast as possible (batch mode); a number paces realtime.
Runner
dataclass
¶
Runner(environment: Environment, agents: list[Agent] = list(), bus: EventBus = EventBus(), config: RunnerConfig = RunnerConfig(), _running: bool = False, _paused: bool = False, _step_requests: int = 0, _stop_reason: str = '', _control_lock: Lock = Lock())
remove_agent
¶
Remove an agent from the runner (does not disconnect Minecraft).
Source code in src/simulatecraft/core/runner.py
start
async
¶
Run until max_ticks / empty env / stop(). Returns when finished.
Source code in src/simulatecraft/core/runner.py
set_tick_rate
¶
Ticks per second. None = run as fast as possible.
Source code in src/simulatecraft/core/runner.py
adjust_tick_rate
¶
Multiply current rate (e.g. 2.0 faster, 0.5 slower). Overspeed → unlimited.
Source code in src/simulatecraft/core/runner.py
step_once
async
¶
Execute exactly one tick regardless of pause state.