MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / run_episode

Method run_episode

numpy_ml/rl_models/agents.py:65–84  ·  view source on GitHub ↗

Run the agent on a single episode. Parameters ---------- max_steps : int The maximum number of steps to run an episode render : bool Whether to render the episode during training Returns ------- reward : float

(self, max_steps, render=False)

Source from the content-addressed store, hash-verified

63
64 @abstractmethod
65 def run_episode(self, max_steps, render=False):
66 """
67 Run the agent on a single episode.
68
69 Parameters
70 ----------
71 max_steps : int
72 The maximum number of steps to run an episode
73 render : bool
74 Whether to render the episode during training
75
76 Returns
77 -------
78 reward : float
79 The total reward on the episode, averaged over the theta samples.
80 steps : float
81 The total number of steps taken on the episode, averaged over the
82 theta samples.
83 """
84 raise NotImplementedError
85
86 @abstractmethod
87 def update(self):

Callers 1

_train_episodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected