simulo.Player
The playback contract — roll a trained policy through an environment.
A player loads a policy output and drives it for a bounded number of
episodes or steps, optionally in real time and optionally capturing video.
Structural mirror of simulo.core.player.Player.
play()
Section titled “play()”Player.play( num_episodes: Optional[int] = ..., num_steps: Optional[int] = ..., real_time: bool = ..., video_path: Optional[str] = ..., video_length: int = ..., deterministic: bool = ...,) -> Dict[str, Any]Run the policy and return playback metrics (e.g. mean episode return).
Bound the run with num_episodes or num_steps. real_time paces
stepping to the sim clock (for watching live); video_path captures up
to video_length frames to a file; deterministic disables action
sampling and takes the policy’s mean action.
load()
Section titled “load()”Player.load(path: str) -> NoneLoad the policy output (e.g. a checkpoint or exported policy) from path.
close()
Section titled “close()”Player.close() -> NoneRelease the player’s resources. Idempotent; call before closing the env.
Declared as:
@runtime_checkableclass PlayerProtocol(Protocol)