class_docstr: Epsilon-greedy Exploration class that produces exploration actions.
  
  When given a Model's output and a current epsilon value (based on some
  Schedule), it produces a random action (if rand(1) < eps) or
  uses the model-computed one (if rand(1) >= eps).
docstr: Create an EpsilonGreedy exploration class.
  
  Args:
      action_space: The action space the exploration should occur in.
      framework: The framework specifier.
      initial_epsilon: The initial epsilon value to use.
      final_epsilon: The final epsilon value to use.
      warmup_timesteps: The timesteps over which to not change epsilon in the
          beginning.
      epsilon_timesteps: The timesteps (additional to `warmup_timesteps`)
          after which epsilon should always be `final_epsilon`.
          E.g.: warmup_timesteps=20k epsilon_timesteps=50k -> After 70k timesteps,
          epsilon will reach its final value.
      epsilon_schedule: An optional Schedule object
          to use (instead of constructing one from the given parameters).
docstr_tok: ["Create","an","EpsilonGreedy","exploration","class",".","Args",":","action_space",":","The","action","space","the","exploration","should","occur","in",".","framework",":","The","framework","specifier",".","initial_epsilon",":","The","initial","epsilon","value","to","use",".","final_epsilon",":","The","final","epsilon","value","to","use",".","warmup_timesteps",":","The","timesteps","over","which","to","not","change","epsilon","in","the","beginning",".","epsilon_timesteps",":","The","timesteps","(","additional","to","`","warmup_timesteps","`",")","after","which","epsilon","should","always","be","`","final_epsilon","`",".","E.g",".",":","warmup_timesteps=20k","epsilon_timesteps=50k","-",">","After","70k","timesteps",",","epsilon","will","reach","its","final","value",".","epsilon_schedule",":","An","optional","Schedule","object","to","use","(","instead","of","constructing","one","from","the","given","parameters",")","."]
code: def __init__(
      self,
      action_space: gym.spaces.Space,
      *,
      framework: str,
      initial_epsilon: float = 1.0,
      final_epsilon: float = 0.05,
      warmup_timesteps: int = 0,
      epsilon_timesteps: int = int(1e5),
      epsilon_schedule: Optional[Schedule] = None,
      **kwargs,
  ):
      """Create an EpsilonGreedy exploration class.
  
      Args:
          action_space: The action space the exploration should occur in.
          framework: The framework specifier.
          initial_epsilon: The initial epsilon value to use.
          final_epsilon: The final epsilon value to use.
          warmup_timesteps: The timesteps over which to not change epsilon in the
              beginning.
          epsilon_timesteps: The timesteps (additional to `warmup_timesteps`)
              after which epsilon should always be `final_epsilon`.
              E.g.: warmup_timesteps=20k epsilon_timesteps=50k -> After 70k timesteps,
              epsilon will reach its final value.
          epsilon_schedule: An optional Schedule object
              to use (instead of constructing one from the given parameters).
      """
      assert framework is not None
      super().__init__(
          action_space=action_space, framework=framework, **kwargs
      )
  
      self.epsilon_schedule = from_config(
          Schedule, epsilon_schedule, framework=framework
      ) or PiecewiseSchedule(
          endpoints=[
              (0, initial_epsilon),
              (warmup_timesteps, initial_epsilon),
              (warmup_timesteps + epsilon_timesteps, final_epsilon),
          ],
          outside_value=final_epsilon,
          framework=self.framework,
      )
  
      # The current timestep value (tf-var or python int).
      self.last_timestep = get_variable(
          np.array(0, np.int64),
          framework=framework,
          tf_name="timestep",
          dtype=np.int64,
      )
  
      # Build the tf-info-op.
      if self.framework == "tf":
          self._tf_state_op = self.get_state()
  
imports: import gymnasium
  import numpy
  import tree
  import random
  from typing import Union, Optional
  from ray.rllib.models.torch.torch_action_dist import TorchMultiActionDistribution
  from ray.rllib.models.action_dist import ActionDistribution
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.utils.exploration.exploration import Exploration, TensorType
  from ray.rllib.utils.framework import try_import_tf, try_import_torch, get_variable
  from ray.rllib.utils.from_config import from_config
  from ray.rllib.utils.numpy import convert_to_numpy
  from ray.rllib.utils.schedules import Schedule, PiecewiseSchedule
  from ray.rllib.utils.torch_utils import FLOAT_MIN
label_desc: Use image node_id 1 to create a new EpsilonGreedy object from inherited base classes: Exploration with example: obj = EpsilonGreedy(action_space)