class_docstr: A random action selector (deterministic/greedy for explore=False).
  
  If explore=True, returns actions randomly from `self.action_space` (via
  Space.sample()).
  If explore=False, returns the greedy/max-likelihood action.
class_docstr_tok: ["A","random","action","selector","(","deterministic\/greedy","for","explore=False",")",".","If","explore=True",",","returns","actions","randomly","from","`","self.action_space","`","(","via","Space.sample","(",")",")",".","If","explore=False",",","returns","the","greedy\/max-likelihood","action","."]
docstr: Initialize a Random Exploration object.
  
  Args:
      action_space: The gym action space used by the environment.
      framework: One of None, "tf", "torch".
docstr_tok: ["Initialize","a","Random","Exploration","object",".","Args",":","action_space",":","The","gym","action","space","used","by","the","environment",".","framework",":","One","of","None",",","``","tf","''",",","``","torch","''","."]
code: def __init__(
      self,
      action_space: Space,
      *,
      model: ModelV2,
      framework: Optional[str],
      **kwargs,
  ):
      """Initialize a Random Exploration object.
  
      Args:
          action_space: The gym action space used by the environment.
          framework: One of None, "tf", "torch".
      """
      super().__init__(
          action_space=action_space,
          model=model,
          framework=framework,
          **kwargs,
      )
  
      self.action_space_struct = get_base_struct_from_space(
          self.action_space
      )
  
file_path: ray/rllib/utils/exploration/random.py
imports: from gymnasium.spaces import Discrete, Box, MultiDiscrete, Space
  import numpy
  import tree
  from typing import Union, Optional
  from ray.rllib.models.action_dist import ActionDistribution
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.utils.exploration.exploration import Exploration
  from ray.rllib.utils import force_tuple
  from ray.rllib.utils.framework import try_import_tf, try_import_torch, TensorType
  from ray.rllib.utils.spaces.simplex import Simplex
  from ray.rllib.utils.spaces.space_utils import get_base_struct_from_space
  from ray.rllib.utils.tf_utils import zero_logps_from_actions
label_desc: Use image node_id 1 to create a new Random object from inherited base classes: Exploration with example: obj = Random(action_space)