How to create a MixedMemory class that combines preloaded and new experiences in skrl? #203
-
Hello, I'm working on a reinforcement learning project using the skrl library, and I need some help customizing the replay buffer. I want to create a MixedMemory class that does the following:
I found the CustomMemory class in the skrl documentation as a starting point. Loading pre-saved experiences into the memory. Thank you in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is a good feature that, if I have time I am going to include in next release... Or you can just open a new PR with the implementation 😅 Meanwhile, the solution is to play with the https://github.com/Toni-SM/skrl/blob/main/skrl%2Fmemories%2Ftorch%2Fbase.py#L305 |
Beta Was this translation helpful? Give feedback.
Hi @Ginga-Kennis
This is a good feature that, if I have time I am going to include in next release... Or you can just open a new PR with the implementation 😅
Meanwhile, the solution is to play with the
memory_index
property of the Memory base class and define the default value the memory index will be assigned (currently 0, which means start overwriting from the beginning) when maximum capacity has been reachedhttps://github.com/Toni-SM/skrl/blob/main/skrl%2Fmemories%2Ftorch%2Fbase.py#L305