Skip to content

Commit

Permalink
Fix bug in PCN
Browse files Browse the repository at this point in the history
  • Loading branch information
wilrop committed Feb 15, 2024
1 parent d39ac0e commit b191a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion morl_baselines/multi_policy/pcn/pcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def evaluate(self, env, max_return, n=10):
horizons = np.float32(horizons)
e_returns = []
for i in range(n):
transitions = self._run_episode(env, returns[i], np.float32(horizons[i] - 2), max_return, eval_mode=True)
transitions = self._run_episode(env, returns[i], np.float32(horizons[i]), max_return, eval_mode=True)
# compute return
for i in reversed(range(len(transitions) - 1)):
transitions[i].reward += self.gamma * transitions[i + 1].reward
Expand Down

0 comments on commit b191a4a

Please sign in to comment.