class_docstr: ϵ-greedy exploration strategy.
  
  Select action based on the value of ϵ. ϵ will decrease from
  max_epsilon to min_epsilon within decay_ratio * total_timesteps.
  
  At state s, with probability
  1 − ϵ: select action = argmax Q(s, a)
  ϵ    : select a random action from an uniform distribution.
  
  Args:
      env_spec (garage.envs.env_spec.EnvSpec): Environment specification.
      policy (garage.Policy): Policy to wrap.
      total_timesteps (int): Total steps in the training, equivalent to
          max_episode_length * n_epochs.
      max_epsilon (float): The maximum(starting) value of epsilon.
      min_epsilon (float): The minimum(terminal) value of epsilon.
      decay_ratio (float): Fraction of total steps for epsilon decay.
class_docstr_tok: ["\u03f5-greedy","exploration","strategy",".","Select","action","based","on","the","value","of","\u03f5.","\u03f5","will","decrease","from","max_epsilon","to","min_epsilon","within","decay_ratio","*","total_timesteps",".","At","state","s",",","with","probability","1","\u2212","\u03f5",":","select","action","=","argmax","Q","(","s",",","a",")","\u03f5",":","select","a","random","action","from","an","uniform","distribution",".","Args",":","env_spec","(","garage.envs.env_spec.EnvSpec",")",":","Environment","specification",".","policy","(","garage.Policy",")",":","Policy","to","wrap",".","total_timesteps","(","int",")",":","Total","steps","in","the","training",",","equivalent","to","max_episode_length","*","n_epochs",".","max_epsilon","(","float",")",":","The","maximum","(","starting",")","value","of","epsilon",".","min_epsilon","(","float",")",":","The","minimum","(","terminal",")","value","of","epsilon",".","decay_ratio","(","float",")",":","Fraction","of","total","steps","for","epsilon","decay","."]
docstr: Get action from this policy for the input observation.
  
  Args:
      observation (numpy.ndarray): Observation from the environment.
  
  Returns:
      np.ndarray: An action with noise.
      dict: Arbitrary policy state information (agent_info).
docstr_tok: ["Get","action","from","this","policy","for","the","input","observation",".","Args",":","observation","(","numpy.ndarray",")",":","Observation","from","the","environment",".","Returns",":","np.ndarray",":","An","action","with","noise",".","dict",":","Arbitrary","policy","state","information","(","agent_info",")","."]
code: def get_action(self, observation):
      """Get action from this policy for the input observation.
  
      Args:
          observation (numpy.ndarray): Observation from the environment.
  
      Returns:
          np.ndarray: An action with noise.
          dict: Arbitrary policy state information (agent_info).
  
      """
      opt_action, _ = self.policy.get_action(observation)
      if np.random.random() < self._epsilon():
          opt_action = self._action_space.sample()
      self._total_env_steps += 1
      return opt_action, dict()
  
file_path: garage/src/garage/np/exploration_policies/epsilon_greedy_policy.py
imports: from dowel import tabular
  import numpy
  from garage.np.exploration_policies.exploration_policy import ExplorationPolicy
label_desc: Use image node_id 2 for calling the EpsilonGreedyPolicy obj's underlying member method code with example usage: obj.get_action(observation) and returns: opt_action,  dict