docstr: Create Prioritized Replay buffer.
  Parameters
  ----------
  size: int
      Max number of transitions to store in the buffer. When the buffer
      overflows the old memories are dropped.
  alpha: float
      how much prioritization is used
      (0 - no prioritization, 1 - full prioritization)
  See Also
  --------
  ReplayBuffer.__init__
docstr_tok: ["Create","Prioritized","Replay","buffer",".","Parameters","--","--","--","--","--","size",":","int","Max","number","of","transitions","to","store","in","the","buffer",".","When","the","buffer","overflows","the","old","memories","are","dropped",".","alpha",":","float","how","much","prioritization","is","used","(","0","-","no","prioritization",",","1","-","full","prioritization",")","See","Also","--","--","--","--","ReplayBuffer.__init__"]
code: def __init__(self, size, alpha, beta):
      """Create Prioritized Replay buffer.
      Parameters
      ----------
      size: int
          Max number of transitions to store in the buffer. When the buffer
          overflows the old memories are dropped.
      alpha: float
          how much prioritization is used
          (0 - no prioritization, 1 - full prioritization)
      See Also
      --------
      ReplayBuffer.__init__
      """
      super(PrioritizedReplayBuffer, self).__init__(size)
      assert alpha >= 0
      self._alpha = alpha
  
      it_capacity = 1
      while it_capacity < size:
          it_capacity *= 2
  
      self._it_sum = SumSegmentTree(it_capacity)
      self._it_min = MinSegmentTree(it_capacity)
      self._max_priority = 1.0
      self.beta = beta
  
imports: import argparse
  import operator
  import os
  import random
  import time
  import gym
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorlayer
label_desc: Use image node_id 1 to create a new PrioritizedReplayBuffer object from inherited base classes: ReplayBuffer with example: obj = PrioritizedReplayBuffer(size, alpha, beta)