yawning_titan.experiment_helpers.sb3.train_and_eval#
- yawning_titan.experiment_helpers.sb3.train_and_eval(agent_name, environment, training_timesteps, n_eval_episodes)[source]#
Train and Evaluate an agent.
- Parameters:
agent_name – the algorithm name (str)
environment – An initlaised Open AI Gym environment
training_timesteps – total no. of training timesteps (int)
- Returns:
a trained Stable Baselines 3 agent eval_pol: the output from the Stable Baselines 3 ‘evaluate_policy’ function
- Return type:
chosen_agent