[go: up one dir, main page]

Bug: Avoid caching from previous episode

on_episode_end() caches stack-size items when "stack_compress" is enabled.

When an episode length is smaller than stack size, on_episode_end() must avoid caching from previous episode.

This can be a rare case, but it does happen sometime, and ReplayBuffer does not handle this correctly.

This bug is reported at #108 (closed)


Probably, ReplayBuffer needs to record and track the starting point of the current episode.

Tracking a starting point might have some corner cases.

For example, an episode is longer than buffer size.