-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Implementation bug in Prioritized Experience Replay #329
Labels
bug
Something isn't working
Comments
I fixed this bug by modifying the 'update_ids()' function in class SumTree. I recall that I modified the iterate depth in that function. You can check the sum of all nodes of the binary tree, i.e., the tree[0], by ensuring that 'update_ids()' function functions correctly. However, it seems the weight calculation also embeds some bugs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
File "/home/moderngangster/Codes/APC-Flight/ElegantRL/examples/../elegantrl/agents/AgentSAC.py", line 43, in update_net
obj_critic, state = self.get_obj_critic(buffer, self.batch_size)
File "/home/moderngangster/Codes/APC-Flight/ElegantRL/examples/../elegantrl/agents/AgentSAC.py", line 81, in get_obj_critic_per
states, actions, rewards, undones, next_ss, is_weights, is_indices = buffer.sample_for_per(batch_size)
File "/home/moderngangster/Codes/APC-Flight/ElegantRL/examples/../elegantrl/train/replay_buffer.py", line 134, in sample_for_per
_is_indices, _is_weights = sum_tree.important_sampling(batch_size, beg, end, self.per_beta)
File "/home/moderngangster/Codes/APC-Flight/ElegantRL/examples/../elegantrl/train/replay_buffer.py", line 267, in important_sampling
assert 0 <= i
The text was updated successfully, but these errors were encountered: