PPOActorStepProcessor
python
PPOActorStepProcessor(env_states: Sequence[PPOActorEnvironmentRuntime], step_buffers: PPOActorStepBuffers, trajectory_runtime: PPOActorTrajectoryRuntime, *, potential_shaping: PotentialRewardShapingConfiguration | None = None, restart_pool: RestartPool | None = None, max_episode_actions: int = 0) -> NoneProcesses PPO environment step results into rollout state.
Initialize the step processor.
Parameters:
env_states(Sequence[PPOActorEnvironmentRuntime]) – Per-environment actor state objects.step_buffers(PPOActorStepBuffers) – Mutable per-step rollout buffers.trajectory_runtime(PPOActorTrajectoryRuntime) – Shared trajectory coordinator.potential_shaping(PotentialRewardShapingConfiguration | None) – Optional potential-based reward shaping configuration.restart_pool(RestartPool | None) – Optional pool harvesting restart points from completed episodes.max_episode_actions(int) – Actor-wide cap on any episode's actions; 0 leaves them uncapped.
Methods
handle_reset_result
python
handle_reset_result(result: MultiEnvResult) -> NoneApply one environment reset result after a completed episode.
Parameters:
result(MultiEnvResult) – The reset result returned by OakEmu.
process_step_results
python
process_step_results(results: list[MultiEnvResult], *, starting_step: int) -> PPOProcessedStepBatchProcess one synchronous PPO environment step.
Parameters:
results(list[MultiEnvResult]) – One environment result per stepped environment.starting_step(int) – The actor step count before processing this batch.
Returns:
PPOProcessedStepBatch– The processed batch summary.
refresh_potential_snapshot
python
refresh_potential_snapshot() -> NoneRebuild the lock-free potential snapshot from the store. Call once per rollout; per-step shaping then reads the snapshot without locking. A no-op when shaping is disabled.