class_docstr: A compact implementation of a simplified Rainbow agent.
class_docstr_tok: ["A","compact","implementation","of","a","simplified","Rainbow","agent","."]
docstr: Creates the replay buffer used by the agent.
docstr_tok: ["Creates","the","replay","buffer","used","by","the","agent","."]
code: def _build_replay_buffer(self):
      """Creates the replay buffer used by the agent."""
      if self._replay_scheme not in ["uniform", "prioritized"]:
          raise ValueError(
              "Invalid replay scheme: {}".format(self._replay_scheme)
          )
      # Both replay schemes use the same data structure, but the 'uniform' scheme
      # sets all priorities to the same value (which yields uniform sampling).
      return (
          prioritized_replay_buffer.OutOfGraphPrioritizedReplayBuffer(
              observation_shape=self.observation_shape,
              stack_size=self.stack_size,
              update_horizon=self.update_horizon,
              gamma=self.gamma,
              observation_dtype=self.observation_dtype,
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  from dopamine.jax import losses
  from dopamine.jax import networks
  from dopamine.jax.agents.dqn import dqn_agent
  from dopamine.metrics import statistics_instance
  from dopamine.replay_memory import prioritized_replay_buffer
  import gin
  import jax
  import jax.numpy
  import numpy
  import optax
  import tensorflow
label_desc: Use image node_id 3 for calling the JaxRainbowAgent obj's underlying member method code with example usage: obj._build_replay_buffer() and returns: prioritized_replay_buffer