DeNA/HandyRL

Replay Buffer

Chandanpanda opened this issue · 2 comments

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.

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!