class_docstr: An exploration that adds white noise to continuous actions.
  
  If explore=True, returns actions plus scale (annealed over time) x
  Gaussian noise. Also, some completely random period is possible at the
  beginning.
  
  If explore=False, returns the deterministic action.
class_docstr_tok: ["An","exploration","that","adds","white","noise","to","continuous","actions",".","If","explore=True",",","returns","actions","plus","scale","(","annealed","over","time",")","x","Gaussian","noise",".","Also",",","some","completely","random","period","is","possible","at","the","beginning",".","If","explore=False",",","returns","the","deterministic","action","."]
docstr: Initializes a GaussianNoise instance.
  
  Args:
      random_timesteps: The number of timesteps for which to act
          completely randomly. Only after this number of timesteps, the
          `self.scale` annealing process will start (see below).
      stddev: The stddev (sigma) to use for the
          Gaussian noise to be added to the actions.
      initial_scale: The initial scaling weight to multiply
          the noise with.
      final_scale: The final scaling weight to multiply
          the noise with.
      scale_timesteps: The timesteps over which to linearly anneal
          the scaling factor (after(!) having used random actions for
          `random_timesteps` steps).
      scale_schedule: An optional Schedule object
          to use (instead of constructing one from the given parameters).
docstr_tok: ["Initializes","a","GaussianNoise","instance",".","Args",":","random_timesteps",":","The","number","of","timesteps","for","which","to","act","completely","randomly",".","Only","after","this","number","of","timesteps",",","the","`","self.scale","`","annealing","process","will","start","(","see","below",")",".","stddev",":","The","stddev","(","sigma",")","to","use","for","the","Gaussian","noise","to","be","added","to","the","actions",".","initial_scale",":","The","initial","scaling","weight","to","multiply","the","noise","with",".","final_scale",":","The","final","scaling","weight","to","multiply","the","noise","with",".","scale_timesteps",":","The","timesteps","over","which","to","linearly","anneal","the","scaling","factor","(","after","(","!",")","having","used","random","actions","for","`","random_timesteps","`","steps",")",".","scale_schedule",":","An","optional","Schedule","object","to","use","(","instead","of","constructing","one","from","the","given","parameters",")","."]
code: def __init__(
      self,
      action_space: Space,
      *,
      framework: str,
      model: ModelV2,
      random_timesteps: int = 1000,
      stddev: float = 0.1,
      initial_scale: float = 1.0,
      final_scale: float = 0.02,
      scale_timesteps: int = 10000,
      scale_schedule: Optional[Schedule] = None,
      **kwargs,
  ):
      """Initializes a GaussianNoise instance.
  
      Args:
          random_timesteps: The number of timesteps for which to act
              completely randomly. Only after this number of timesteps, the
              `self.scale` annealing process will start (see below).
          stddev: The stddev (sigma) to use for the
              Gaussian noise to be added to the actions.
          initial_scale: The initial scaling weight to multiply
              the noise with.
          final_scale: The final scaling weight to multiply
              the noise with.
          scale_timesteps: The timesteps over which to linearly anneal
              the scaling factor (after(!) having used random actions for
              `random_timesteps` steps).
          scale_schedule: An optional Schedule object
              to use (instead of constructing one from the given parameters).
      """
      assert framework is not None
      super().__init__(
          action_space, model=model, framework=framework, **kwargs
      )
  
      # Create the Random exploration module (used for the first n
      # timesteps).
      self.random_timesteps = random_timesteps
      self.random_exploration = Random(
          action_space,
          model=self.model,
          framework=self.framework,
          **kwargs,
      )
  
      self.stddev = stddev
      # The `scale` annealing schedule.
      self.scale_schedule = scale_schedule or PiecewiseSchedule(
          endpoints=[
              (random_timesteps, initial_scale),
              (random_timesteps + scale_timesteps, final_scale),
          ],
          outside_value=final_scale,
          framework=self.framework,
      )
  
      # The current timestep value (tf-var or python int).
      self.last_timestep = get_variable(
          np.array(0, np.int64),
          framework=self.framework,
          tf_name="timestep",
          dtype=np.int64,
      )
  
      # Build the tf-info-op.
      if self.framework == "tf":
          self._tf_state_op = self.get_state()
  
imports: from gymnasium.spaces import Space
  import numpy
  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.exploration.random import Random
  from ray.rllib.utils.framework import try_import_tf, try_import_torch, get_variable, TensorType
  from ray.rllib.utils.numpy import convert_to_numpy
  from ray.rllib.utils.schedules import Schedule
  from ray.rllib.utils.schedules.piecewise_schedule import PiecewiseSchedule
  from ray.rllib.utils.tf_utils import zero_logps_from_actions
label_desc: Use image node_id 1 to create a new GaussianNoise object from inherited base classes: Exploration with example: obj = GaussianNoise(action_space)