class_docstr: Atari100k Ranibow Agent with recycled parameters.
class_docstr_tok: ["Atari100k","Ranibow","Agent","with","recycled","parameters","."]
code: def _train_step(self):
      if self._replay.add_count > self.min_replay_history:
          if self.training_steps % self.update_period == 0:
              for step in range(self._num_updates_per_train_step):
                  self.gradient_step = (
                      (self.training_steps // self.update_period)
                      * self._num_updates_per_train_step
                  ) + step
                  self._training_step_update()
                  if self.target_update_strategy == "update_step":
                      if (
                          self.gradient_step % self.target_update_period
                          == 0
                      ):
                          self._sync_weights()
  
          # The original agent updates target based on training steps. We need to
          # analyze whether we need to change it to gradient_step in case of
          # high replay ratio (i.e., _num_updates_per_train_step > 1) and recycling.
          if self.target_update_strategy == "training_step":
              if self.training_steps % self.target_update_period == 0:
                  self._sync_weights()
  
      self.training_steps += 1
  
file_path: dopamine/dopamine/labs/redo/recycled_atari100k_rainbow_agent.py
imports: from dopamine.jax.agents.full_rainbow import full_rainbow_agent
  from dopamine.labs.atari_100k import atari_100k_rainbow_agent
  from dopamine.labs.redo import networks
  from dopamine.labs.redo import weight_recyclers
  from dopamine.metrics import statistics_instance
  import gin
  import jax
  import jax.numpy
  import optax
label_desc: Use image node_id 3 for calling the RecycledAtari100kRainbowAgent obj's underlying member method code with example usage: obj._train_step() without return types