class_docstr: Deep Deterministic Policy Gradients.
  
  This can be used as SVG(0) by specifying a Gaussian policy instead of a
  deterministic policy.
  
  Args:
      model (DDPGModel): DDPG model that contains both a policy and a
          Q-function
      actor_optimizer (Optimizer): Optimizer setup with the policy
      critic_optimizer (Optimizer): Optimizer setup with the Q-function
      replay_buffer (ReplayBuffer): Replay buffer
      gamma (float): Discount factor
      explorer (Explorer): Explorer that specifies an exploration strategy.
      gpu (int): GPU device id if not None nor negative.
      replay_start_size (int): if the replay buffer's size is less than
          replay_start_size, skip update
      minibatch_size (int): Minibatch size
      update_interval (int): Model update interval in step
      target_update_interval (int): Target model update interval in step
      phi (callable): Feature extractor applied to observations
      target_update_method (str): 'hard' or 'soft'.
      soft_update_tau (float): Tau of soft target update.
      n_times_update (int): Number of repetition of update
      average_q_decay (float): Decay rate of average Q, only used for
          recording statistics
      average_loss_decay (float): Decay rate of average loss, only used for
          recording statistics
      batch_accumulator (str): 'mean' or 'sum'
      episodic_update (bool): Use full episodes for update if set True
      episodic_update_len (int or None): Subsequences of this length are used
          for update if set int and episodic_update=True
      logger (Logger): Logger used
      batch_states (callable): method which makes a batch of observations.
          default is `chainerrl.misc.batch_states.batch_states`
      burnin_action_func (callable or None): If not None, this callable
          object is used to select actions before the model is updated
          one or more times during training.
code: def act_and_train(self, obs, reward):
      self.logger.debug("t:%s r:%s", self.t, reward)
  
      if (
          self.burnin_action_func is not None
          and self.actor_optimizer.t == 0
      ):
          action = self.burnin_action_func()
      else:
          greedy_action = self.act(obs)
          action = self.explorer.select_action(
              self.t, lambda: greedy_action
          )
      self.t += 1
  
      # Update the target network
      if self.t % self.target_update_interval == 0:
          self.sync_target_network()
  
      if self.last_state is not None:
          assert self.last_action is not None
          # Add a transition to the replay buffer
          self.replay_buffer.append(
              state=self.last_state,
              action=self.last_action,
              reward=reward,
              next_state=obs,
              next_action=action,
              is_state_terminal=False,
          )
  
      self.last_state = obs
      self.last_action = action
  
      self.replay_updater.update_if_necessary(self.t)
  
      return self.last_action
  
imports: import copy
  from logging import getLogger
  import chainer
  from chainer import cuda
  import chainer.functions
  from chainerrl.agent import AttributeSavingMixin
  from chainerrl.agent import BatchAgent
  from chainerrl.misc.batch_states import batch_states
  from chainerrl.misc.copy_param import synchronize_parameters
  from chainerrl.recurrent import Recurrent
  from chainerrl.recurrent import RecurrentChainMixin
  from chainerrl.recurrent import state_kept
  from chainerrl.replay_buffer import batch_experiences
  from chainerrl.replay_buffer import ReplayUpdater
label_desc: Use image node_id 7 for calling the DDPG obj's underlying member method code with example usage: obj.act_and_train(obs, reward) and returns: self