Skip to content

Commit

Permalink
(fix) Bug in sample() method of FiniteMDP related to done flag
Browse files Browse the repository at this point in the history
  • Loading branch information
omardrwch committed Dec 9, 2021
1 parent 091e156 commit 25a12f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rlberry/envs/finite/finite_mdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def sample(self, state, action):
prob = self.P[state, action, :]
next_state = self.rng.choice(self._states, p=prob)
reward = self.reward_fn(state, action, next_state)
done = self.is_terminal(self.state)
done = self.is_terminal(state)
info = {}
return next_state, reward, done, info

Expand Down

0 comments on commit 25a12f8

Please sign in to comment.