class_docstr: An implementation of the DQN agent.
class_docstr_tok: ["An","implementation","of","the","DQN","agent","."]
docstr: Select an action from the set of available actions.
  
  Chooses an action randomly with probability self._calculate_epsilon(), and
  otherwise acts greedily according to the current Q-value estimates.
  
  Returns:
     int, the selected action.
docstr_tok: ["Select","an","action","from","the","set","of","available","actions",".","Chooses","an","action","randomly","with","probability","self._calculate_epsilon","(",")",",","and","otherwise","acts","greedily","according","to","the","current","Q-value","estimates",".","Returns",":","int",",","the","selected","action","."]
code: def _select_action(self):
      """Select an action from the set of available actions.
  
      Chooses an action randomly with probability self._calculate_epsilon(), and
      otherwise acts greedily according to the current Q-value estimates.
  
      Returns:
         int, the selected action.
      """
      if self.eval_mode:
          epsilon = self.epsilon_eval
      else:
          epsilon = self.epsilon_fn(
              self.epsilon_decay_period,
              self.training_steps,
              self.min_replay_history,
              self.epsilon_train,
          )
      if random.random() <= epsilon:
          # Choose a random action with probability epsilon.
          return random.randint(0, self.num_actions - 1)
      else:
          # Choose the action with highest Q-value at the current state.
          return self._sess.run(
              self._q_argmax, {self.state_ph: self.state}
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import random
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from dopamine.replay_memory import circular_replay_buffer
  import gin.tf
  import numpy
  import tensorflow
label_desc: Use image node_id 11 for calling the DQNAgent obj's underlying member method code with example usage: obj._select_action() and returns: random, self