reagent.gym.runners package

Submodules

reagent.gym.runners.gymrunner module

reagent.gym.runners.gymrunner.evaluate_for_n_episodes(n: int, env: reagent.gym.envs.env_wrapper.EnvWrapper, agent: reagent.gym.agents.agent.Agent, max_steps: Optional[int] = None, gammas: Sequence[float] = (1.0,), num_processes: int = 0) numpy.ndarray

Return an np array A of shape n x len(gammas) where A[i, j] = ith episode evaluated with gamma=gammas[j]. Runs environments on num_processes, via multiprocessing.Pool.

reagent.gym.runners.gymrunner.run_episode(env: reagent.gym.envs.env_wrapper.EnvWrapper, agent: reagent.gym.agents.agent.Agent, mdp_id: int = 0, max_steps: Optional[int] = None) reagent.gym.types.Trajectory

Return sum of rewards from episode. After max_steps (if specified), the environment is assumed to be terminal. Can also specify the mdp_id and gamma of episode.

Module contents