coax icon indicating copy to clipboard operation
coax copied to clipboard

Recurrent Experience Replay

Open smorad opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

It seems that the implemented replay buffers only operate over transitions, with no ability to operate over entire sequences. This prevents the use of recurrent policies for tackling POMDPs.

Describe the solution you'd like

A SequenceReplayBuffer that returns contiguous episodes instead of shuffled transitions.

Describe alternatives you've considered

Additional context

smorad avatar Nov 20 '22 13:11 smorad

Thanks, that's a very good suggestion. It's definitely been on mind.

I'm thinking of having a reward tracer that does something similar to what the frame stacking wrapper does. The idea is to stack entire transitions rather than only the observations. As long as we ensure to only create shallow copies (i.e. not copying the actual numpy arrays), I think we could keep this fairly lightweight and simple.

What do you think?

KristianHolsheimer avatar Nov 20 '22 14:11 KristianHolsheimer

You can also achieve something via the record_extra_info of the NStep reward tracer. Its a little besides the point but will give you the n observations, actions, etc. that follows a sampled observation.

frederikschubert avatar Nov 21 '22 10:11 frederikschubert

I don't actually know enough about the architecture to provide good advice. I just found the design of coax really clean, and was considering porting some of my models to the framework.

smorad avatar Nov 21 '22 14:11 smorad