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

Method run_episode

numpy_ml/rl_models/agents.py:1752–1771  ·  view source on GitHub ↗

Run the agent on a single episode without performing `Q`-function backups. Parameters ---------- max_steps : int The maximum number of steps to run an episode. render : bool Whether to render the episode during training.

(self, max_steps, render=False)

Source from the content-addressed store, hash-verified

1750 Q[(s, a)] += self.lr * update
1751
1752 def run_episode(self, max_steps, render=False):
1753 """
1754 Run the agent on a single episode without performing `Q`-function
1755 backups.
1756
1757 Parameters
1758 ----------
1759 max_steps : int
1760 The maximum number of steps to run an episode.
1761 render : bool
1762 Whether to render the episode during training.
1763
1764 Returns
1765 -------
1766 reward : float
1767 The total reward on the episode.
1768 steps : float
1769 The number of steps taken on the episode.
1770 """
1771 return self._episode(max_steps, render, update=False)
1772
1773 def train_episode(self, max_steps, render=False):
1774 """

Callers

nothing calls this directly

Calls 1

_episodeMethod · 0.95

Tested by

no test coverage detected