rl_agent_trainer_base

The module rl_agent_trainer_base. Specifies the minimum interface that RL trainers should implement Base class for deriving RL agent trainers. Specifically, an RL trainer class should expose at least the following API

  • __init__(config: Config, agent: Agent) -> None:

  • train(self, env: Env, **options) -> TrainInfo:

class rl_agent_trainer_base.RLAgentTrainerConfig(n_episodes: int = 0)

The RLAgentTrainerConfig class. Basic configuration for RL trainers

class rl_agent_trainer_base.RLAgentTrainerBase(config: Config, algorithm: Algorithm)

The RLAgentTrainerBase class. Specifies the minimum interface that RL trainers should implement

__init__(config: Config, algorithm: Algorithm)

Constructor

Parameters
  • trainer (config The configuration of the) –

  • train (agent The agent to) –

abstract train(env: Env, **options) TrainInfo

Train the agent on the given environment

Parameters
  • on (env The environment to train) –

  • pass (options Any options that client code should) –

Return type

An instance of the TrainInfo class