Skip to content
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

Rewards-to-Go issue #433

Open
Raymondliz opened this issue Dec 30, 2024 · 0 comments
Open

Rewards-to-Go issue #433

Raymondliz opened this issue Dec 30, 2024 · 0 comments

Comments

@Raymondliz
Copy link

When rewards-to-go is implemented in the on policy ALGOBuffer.finish_path(), looks all necessary info has been recorded in the rew_buf. The last_val for rews seems just a placeholder because the action has been sent out to agent and the reward has been seen and recorded.
The last_val for value function totally makes sense for bootstraping but reward?
My thinking is the rewards-to-go might be this

self.ret_buf[path_slice] = core.discount_cumsum(rews[:-1], self.gamma)

instead of

self.ret_buf[path_slice] = core.discount_cumsum(rews, self.gamma)[:-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant