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

Replay Buffer #346

Open
Chandanpanda opened this issue Jun 23, 2023 · 2 comments
Open

Replay Buffer #346

Chandanpanda opened this issue Jun 23, 2023 · 2 comments

Comments

@Chandanpanda
Copy link

Many thanks for the great code. I have a question.

How do I insert into the replay buffer? For example, I want to use other agents or random or rule based agents actions=>experience into the replay buffer, especially in the beginning.

@ikki407
Copy link
Member

ikki407 commented Jun 23, 2023

Hi @Chandanpanda

Thank you for using HandyRL. I'll provide you with some helpful information.

  1. How to mix rule-based agents or pre-trained agents into the replay buffer in a football competition:

You can find some codes for selecting the model to send to generation.py inside the worker.py at the following link, but please note that the code at this time may have differences from the latest version of HandyRL:

https://github.com/YuriCat/TamakEriFever/blob/master/handyrl_core/worker.py#L58-L92

  1. How to perform both supervised learning and reinforcement learning simultaneously:

You can refer to the following link for an example of performing both supervised learning and reinforcement learning using the same buffer in HandyRL. Prepare the training data and set the replay_rate in the config. Load the training data to be used by the Replayer class and select the replay data to be used for training in _select_record():

YuriCat/HandyRL@develop...feature/train_with_replay_same_buffer_simplest

We provide HandyRL as a code base, allowing for customization with minimal code. If you have developed good code, we encourage you to submit a pull request to the HandyRL repository!

@Chandanpanda
Copy link
Author

Chandanpanda commented Jun 23, 2023 via email

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