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

优先经验重放中的采样问题 #6

Open
Qltan opened this issue Jan 16, 2024 · 0 comments
Open

优先经验重放中的采样问题 #6

Qltan opened this issue Jan 16, 2024 · 0 comments

Comments

@Qltan
Copy link

Qltan commented Jan 16, 2024

在joyrl-book第8章的优先经验重放中,实现带有优先级的缓存区时,Buffer内的函数__len__(self)返回的是SumTree中存储的经验数量self.tree.count,而在notebook的代码实现中,len(self)函数返回的是SumTree中优先权重的总和self.tree.total()。请问这两种设置有什么不同吗?实际代码测试时,使用self.tree.count的方式,采样时会超出经验缓冲区,抽取到初始化(空或者0)的数据,代码报错

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