class maze.core.agent_deployment.policy_executor.PolicyExecutor(env: maze.core.agent_deployment.external_core_env.ExternalCoreEnv, policy: maze.core.agent.policy.Policy, rollout_done_event: threading.Event, exception_queue: queue.Queue)

Executes the provided policies in an Agent Deployment setting.

Policies are executed until the rollout_done event is set, indicating that the rollout has been finished. Then, a final reset is sent and execution stops. Expected to be run on a separate thread alongside the agent deployment running on the main thread.

  • env – Environment to step.

  • policy – Structured policy working with structured environments.

  • rollout_done_event – event indicating that the rollout has been finished.


Step the environment until the rollout is done.