Skip to content

[FEAT] Make sum tree have configurable data type and fix bug in PER when setting new priorities #58

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

Merged

Conversation

EdanToledo
Copy link
Contributor

This PR introduces several improvements and bug fixes to the Prioritized Experience Replay (PER) implementation:

  • Configurable Sum Tree and float64 Support: Enables the sum tree to be configured to use float64, which helps avoid issues when sampling transitions with zero priority.
  • int64 Running Index Support: Adds optional support for using int64 as the PER running index, which can be useful for longer training runs or larger buffers.
  • Bug Fix – Max Priority Assignment: Fixes a bug where newly added transitions were being assigned a rounded (integer) max priority instead of preserving their original floating-point value.
  • Code Cleanup: Removes an unused function from the PER module.

@SimonDuToit
Copy link
Collaborator

Awesome thanks Edan. Will take a look at this next week

Copy link
Collaborator

@SimonDuToit SimonDuToit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, looks clean

@SimonDuToit SimonDuToit merged commit 548bb9d into instadeepai:main Jul 22, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants