PolicyExecutor

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, num_candidates: int)

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.

Parameters
  • env – Environment to step.

  • policy – Structured policy working with structured environments.

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

run_rollout_loop()

Step the environment until the rollout is done.