Runner

class tensorforce.execution.Runner(agent, environment, max_episode_timesteps=None, evaluation_environment=None, save_best_agent=None)[source]

Tensorforce runner utility.

Parameters:
  • agent (specification | Agent object) – Agent specification or object, the latter is not closed automatically as part of runner.close() (required).
  • environment (specification | Environment object) – Environment specification or object, the latter is not closed automatically as part of runner.close() (required).
  • max_episode_timesteps (int > 0) – Maximum number of timesteps per episode, overwrites the environment default if defined (default: environment default).
  • evaluation_environment (specification | Environment object) – Evaluation environment or object, the latter is not closed automatically as part of runner.close() (default: none).
  • save_best_agent (string) – Directory to save the best version of the agent according to the evaluation (default: best agent is not saved).