DLR-RM / stable-baselines3

PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.
https://stable-baselines3.readthedocs.io
MIT License
8.85k stars 1.68k forks source link

Is possible to filter experience from the episode whose length is longer than a specified value to add into replay_buffer? #1999

Open CornfileChase opened 1 month ago

CornfileChase commented 1 month ago

❓ Question

In the self-build custom environment, I suppose that some state-action pair that from very short episode is not helpful to the training process, thus I want to filter the experience from these episodes and do not push into the replay_buffer, can anyone tell me how to implement this function? thanks!

Checklist

araffin commented 3 weeks ago

I suppose that some state-action pair that from very short episode is not helpful to the training process

why not? failures are important to learn what not to do.

I want to filter the experience from these episodes and do not push into the replay_buffer,

If you want to do that, you would need to fork SB3 or subclass SB3 algorithms.