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

Error in Priority Update for Prioritized Replay #13

Open
qfettes opened this issue Jun 3, 2018 · 1 comment
Open

Error in Priority Update for Prioritized Replay #13

qfettes opened this issue Jun 3, 2018 · 1 comment

Comments

@qfettes
Copy link

qfettes commented Jun 3, 2018

It looks like you're updating the priorities in the replay buffer according to the weighted and squared TD error.

loss  = (q_value - expected_q_value.detach()).pow(2) * weights
prios = loss + 1e-5
replay_buffer.update_priorities(indices, prios.data.cpu().numpy())

However, the algorithm in the original paper updates the priority only according to the absolute value of the TD error, which is not weighted. I believe this is a mistake in your implementation

@mneira10
Copy link

Can confirm:
image
Transition priorities are updated with the magnitude of the TD error (lines 11-12).
Paper for reference

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

2 participants