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

RewardForwardFilter to compute intrinsic returns for normalize intrinsic reward #16

Open
boscotsang opened this issue Apr 28, 2019 · 2 comments

Comments

@boscotsang
Copy link

In ppo_agent.py, it compute the running estimate of intrinsic returns with rff_int.
rffs_int = np.array([self.I.rff_int.update(rew) for rew in self.I.buf_rews_int.T])
In reinforcement learning, returns are computed by sum{\gamma^t * r_t}. However in rff_int, it seems that it compute the returns by sum{\gamma^(T-t) * r_t) which discounted the reward forward.
What's the reason for compute the intrinsic returns forward?
Thanks!

@4kasha
Copy link

4kasha commented May 1, 2019

Hi,

According to this comment, it seems just for convenience.
Modifying to self.I.buf_rews_int.T[::-1] will not change its std significantly, I think.

@alirezakazemipour
Copy link

Exactly. 👍
I think they have made a mistake!!!
It must have been self.I.buf_rews_int.T[::-1] as 4kasha has mentioned.

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

3 participants