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

Keep replay buffer on disk (not in memory), allowing it to grow to any size. #151

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

me-unsolicited
Copy link

Hello, please consider this pull request which I implemented based on this comment.

Mainly I added a GameHistoryDao class which creates "replay_buffer.db" with a simple key->value table and stores the games there like a dictionary. If this approach is good, then it can be optimized further by separating reanalysed_predicted_root_values, priorities, and game_priority into their own columns so it can avoid serializing/deserializing the full observation history at each update. However, I think that would take more invasive changes to the existing code.

@ahainaut
Copy link
Collaborator

Hi @me-unsolicited ,
Thank you for this new feature. After reviewing and testing the code, we found that it slows considerably the time of training. So we will have to wait to merge this PR until we find a way to speed the training keeping the replay buffer on disk.

@me-unsolicited
Copy link
Author

@ahainaut ,
Thanks for the feedback! I made some improvements and it runs much faster now.

Changes:

  1. Use SQL to efficiently sample from the prioritized replay buffer.
  2. Store priorities and predicted values in separate columns from the full object.

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