class_docstr: A regular replay buffer which stores transition without any additional structure
docstr: :param max_size: the maximum number of transitions or episodes to hold in the memory
  :param allow_duplicates_in_batch_sampling: allow having the same transition multiple times in a batch
docstr_tok: [":","param","max_size",":","the","maximum","number","of","transitions","or","episodes","to","hold","in","the","memory",":","param","allow_duplicates_in_batch_sampling",":","allow","having","the","same","transition","multiple","times","in","a","batch"]
code: def __init__(
      self,
      max_size: Tuple[MemoryGranularity, int],
      allow_duplicates_in_batch_sampling: bool = True,
  ):
      """
      :param max_size: the maximum number of transitions or episodes to hold in the memory
      :param allow_duplicates_in_batch_sampling: allow having the same transition multiple times in a batch
      """
      super().__init__(max_size)
      if max_size[0] != MemoryGranularity.Transitions:
          raise ValueError(
              "Experience replay size can only be configured in terms of transitions"
          )
      self.transitions = []
      self.allow_duplicates_in_batch_sampling = (
          allow_duplicates_in_batch_sampling
      )
  
      self.reader_writer_lock = ReaderWriterLock()
      self.frozen = False
  
imports: from typing import List, Tuple, Union
  import pickle
  import random
  import math
  import numpy
  from rl_coach.core_types import Transition
  from rl_coach.logger import screen
  from rl_coach.memories.memory import Memory, MemoryGranularity, MemoryParameters
  from rl_coach.utils import ReaderWriterLock, ProgressBar
label_desc: Use image node_id 1 to create a new ExperienceReplay object from inherited base classes: Memory with example: obj = ExperienceReplay(max_size, allow_duplicates_in_batch_sampling)