-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Issue #99) Fix disc_episode_returns off-by-one error #100
Conversation
self.disc_episode_returns should be calculated before incrementing self.episode_lengths
Hi @Katze2664, Thanks for the contribution 😄 Indeed, I think you are right. Could you also update the tests? I don't really remember how I ended up with the values in the tests but they are not correct right now. Cheers, |
up @Katze2664 |
Hi @ffelten, sorry for the delay in updating the tests. I don't have much experience with writing tests but I will have a go at updating them. |
Corrected off-by-one error in calculation of discounted returns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
Hi @ffelten, the test case wasn't too difficult to modify. I replaced the faulty assertion with
but you can modify it if you disagree. |
Perhaps this needs to be raised as it's own issue, but while I was fixing the Extract from test report: =========================== short test summary info ===========================
|
@Katze2664 this is probably due to your version of Gymnasium. We are supporting Gymnasium 1.0 in another PR. |
self.disc_episode_returns should be calculated before incrementing self.episode_lengths