lagom.runner: Runner

class lagom.runner.BaseRunner[source]

Base class for all runners.

A runner is a data collection interface between the agent and the environment. For each calling of the runner, the agent will take actions and receive observation in and from an environment for a certain number of trajectories/segments and a certain number of time steps.

Note

By default, the agent handles batched data returned from VecEnv type of environment.

__call__(agent, env, T, **kwargs)[source]

Run the agent in the environment for a number of time steps and collect all necessary interaction data.

Parameters:
  • agent (BaseAgent) – agent
  • env (VecEnv) – VecEnv type of environment
  • T (int) – number of time steps
  • **kwargs – keyword arguments for more specifications.
class lagom.runner.Trajectory[source]
class lagom.runner.EpisodeRunner(reset_on_call=True)[source]