tensortrade.agents.replay_memory module

class tensortrade.agents.replay_memory.ReplayMemory(capacity: int, transition_type: collections.namedtuple = <class 'tensortrade.agents.replay_memory.Transition'>)[source]

Bases: object

head(batch_size) → List[collections.namedtuple][source]
push(*args)[source]
sample(batch_size) → List[collections.namedtuple][source]
tail(batch_size) → List[collections.namedtuple][source]
class tensortrade.agents.replay_memory.Transition(state, action, reward, done)

Bases: tuple

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

static __new__(_cls, state, action, reward, done)

Create new instance of Transition(state, action, reward, done)

__repr__()

Return a nicely formatted representation string

property action

Alias for field number 1

property done

Alias for field number 3

property reward

Alias for field number 2

property state

Alias for field number 0