td_zero

TD(0) algorithm

class td_zero.TDZero(algo_config: TDAlgoConfig)

Implements TD(0) algorithm

__init__(algo_config: TDAlgoConfig) None

Constructor. Initialize the agent with the configuration instance needed

Parameters

config (The configuration of the agent) –

actions_before_training_begins(env: Env, **options) None

Execute any actions the algorithm needs before

Parameters
  • env (The environment to train on) –

  • options (Any options passed by the client code) –

Return type

None

do_on_training_episode(env: Env, episode_idx: int, **options) EpisodeInfo

Train the agent on the environment at the given episode.

Parameters
  • env (The environment to train on) –

  • episode_idx (The episode index) –

  • options (Any options passes by the client code) –

Return type

An instance of the EpisodeInfo class