- use segment tree to rewrite the previous PrioReplayBuffer code, add the test - enable all Q-learning algorithms to use PER
20 lines
501 B
Python
20 lines
501 B
Python
from tianshou.data.batch import Batch
|
|
from tianshou.data.utils.converter import to_numpy, to_torch, \
|
|
to_torch_as
|
|
from tianshou.data.utils.segtree import SegmentTree
|
|
from tianshou.data.buffer import ReplayBuffer, \
|
|
ListReplayBuffer, PrioritizedReplayBuffer
|
|
from tianshou.data.collector import Collector
|
|
|
|
__all__ = [
|
|
'Batch',
|
|
'to_numpy',
|
|
'to_torch',
|
|
'to_torch_as',
|
|
'SegmentTree',
|
|
'ReplayBuffer',
|
|
'ListReplayBuffer',
|
|
'PrioritizedReplayBuffer',
|
|
'Collector',
|
|
]
|