module emote.memory.fifo_strategy

Classes

class FifoStrategyBase(Strategy):

A sampler intended to sample in a first-in-first-out style across the whole set of experiences.

This base class is used by both the fifo sample and ejection strategies.

Methods

def __init__(self) -> None

Create a FIFO-based strategy.

def track(self, identity, sequence_length) -> None
def forget(self, identity) -> None
def post_import(self) -> None
def state(self) -> dict

Serialize the strategy to a JSON-serializable dictionary.

def load_state(self, state) -> None

Load the strategy from a dictionary.

Arguments:

  • state(dict)

class FifoSampleStrategy(FifoStrategyBase, SampleStrategy):

Methods

def __init__(self, per_episode, random_offset) -> None

Create a FIFO-based sample strategy.

Arguments:

  • per_episode(bool): if true, will only sample each episode once in a single pass (default: True)
  • random_offset(bool): if true will sample at a random offset in each episode. Will be assumed true when sampling per episode (default: True)
def sample(self, count, transition_count) -> Sequence[SamplePoint]

class FifoEjectionStrategy(FifoStrategyBase, EjectionStrategy):

Methods

def sample(self, count) -> Sequence[int]