class_docstr: Epsilon-Greedy Policy
  
  With probability epsilon, a random action is sampled. Otherwise,
  the highest scoring (greedy) action is chosen.
  
  Call update() to decay the amount of exploration by lowering
  `epsilon` by a factor of `epsilon_decay` (<=1) until we reach
  `minimum_epsilon`
class_docstr_tok: ["Epsilon-Greedy","Policy","With","probability","epsilon",",","a","random","action","is","sampled",".","Otherwise",",","the","highest","scoring","(","greedy",")","action","is","chosen",".","Call","update","(",")","to","decay","the","amount","of","exploration","by","lowering","`","epsilon","`","by","a","factor","of","`","epsilon_decay","`","(","<","=1",")","until","we","reach","`","minimum_epsilon","`"]
code: def log_prob(
      self, scores: torch.Tensor, action: torch.Tensor
  ) -> torch.Tensor:
      max_index = self.sample_action(scores).argmax(-1)
      opt = max_index == action.argmax(-1)
      n = len(scores)
      lp = torch.ones(n, device=scores.device) * self.epsilon / n
      lp[opt] = 1 - self.epsilon + self.epsilon / n
      return lp
  
imports: import reagent.core.types
  import torch
  import torch.nn.functional
  from reagent.gym.types import Sampler
  from reagent.models.dqn import INVALID_ACTION_CONSTANT
label_desc: Use image node_id 3 for calling the EpsilonGreedyActionSampler obj's underlying member method code with example usage: obj.log_prob(scores, action) and returns: lp