csle_agents.agents.c51_clean package

Submodules

csle_agents.agents.c51_clean.c51_clean_agent module

MIT License

Copyright (c) 2019 CleanRL developers https://github.com/vwxyzjn/cleanrl

class csle_agents.agents.c51_clean.c51_clean_agent.C51CleanAgent(simulation_env_config: SimulationEnvConfig, emulation_env_config: Optional[EmulationEnvConfig], experiment_config: ExperimentConfig, training_job: Optional[TrainingJobConfig] = None, save_to_metastore: bool = True)[source]

Bases: BaseAgent

A C51 agent using the implementation from CleanRL documentation

hparam_names() List[str][source]

Gets the hyperparameters

Returns

a list with the hyperparameter names

linear_schedule(duration: int, t: int) float[source]

Linear exploration rate schedule

Parameters
  • duration – training duration

  • t – the time step of the training

Returns

the updated exploration rate

make_env()[source]

Helper function for creating an environment in training of the agent

Returns

environment creating function

run_c51(exp_result: ExperimentResult, seed: int) Tuple[ExperimentResult, BaseEnv, QNetwork][source]

Runs C51 with given seed

Parameters
  • exp_result – the object to save the experiment results

  • seed – the random seed

Retur

the updated experiment results, the environment and the trained model

train() ExperimentExecution[source]

Implements the training logic of the C51 algorithm

Returns

the experiment result

Module contents