pantheonrl.common.wrappers.HistoryQueue
- class HistoryQueue(defaultelem, size)[source]
Bases:
objectRing buffer representing the saved history for the FrameStack wrappers.
- Parameters:
defaultelem (ndarray) – The default element for an empty buffer
size (int) – The length of the queue
Methods
Add the given value to the queue and return the new representation
Reset the queue.
- add(toadd)[source]
Add the given value to the queue and return the new representation
- Parameters:
toadd (ndarray) – The new value to add. This overrides the oldest value
- Returns:
The new queue representation, where the first element is the most recently added element and the last element is the oldest
- Return type:
ndarray