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

Method update

numpy_ml/rl_models/agents.py:732–743  ·  view source on GitHub ↗

Update the parameters of the model following the completion of an episode. Flush the episode history after the update is complete.

(self)

Source from the content-addressed store, hash-verified

730 return total_reward, n_steps
731
732 def update(self):
733 """
734 Update the parameters of the model following the completion of an
735 episode. Flush the episode history after the update is complete.
736 """
737 H = self.hyperparameters
738 if H["off_policy"]:
739 self._off_policy_update()
740 else:
741 self._on_policy_update()
742
743 self.flush_history()
744
745 def greedy_policy(self, max_steps, render=True):
746 """

Callers

nothing calls this directly

Calls 3

_off_policy_updateMethod · 0.95
_on_policy_updateMethod · 0.95
flush_historyMethod · 0.80

Tested by

no test coverage detected