'Construct a ReplayPool.
Arguments:
observation_shape - tuple indicating the shape of the observation
action_dim - dimension of the action
size - capacity of the replay pool
observation_dtype - ...
action_dtype - ...
concat_observations - whether to concat the past few observations
as a single one, so as to ensure the Markov property
concat_length - length of the concatenation'

def __init__(self, observation_shape, action_dim, max_steps, observation_dtype=np.float32, action_dtype=np.float32, concat_observations=False, concat_length=1, rng=None):

    self.observation_shape = observation_shape
    self.action_dim = action_dim
    self.max_steps = max_steps
    self.observations = np.zeros(((max_steps,) + observation_shape), dtype=observation_dtype)
    self.actions = np.zeros((max_steps, action_dim), dtype=action_dtype)
    self.rewards = np.zeros((max_steps,), dtype=np.float32)
    self.terminals = np.zeros((max_steps,), dtype='bool')
    self.extras = None
    self.concat_observations = concat_observations
    self.concat_length = concat_length
    self.observation_dtype = observation_dtype
    self.action_dtype = action_dtype
    if rng:
        self.rng = rng
    else:
        self.rng = np.random.RandomState()
    if (not concat_observations):
        assert (concat_length == 1), 'concat_length    must    be    set    to    1    if    not    concatenating    observations'
    self.bottom = 0
    self.top = 0
    self.size = 0
    super(ReplayPool, self).__init__(self, observation_shape, action_dim, max_steps, observation_dtype, action_dtype, concat_observations, concat_length, rng)
