class_docstr: The TruncatedNormal exploration policy is intended for continuous action spaces. It samples the action from a
  normal distribution, where the mean action is given by the agent, and the standard deviation can be given in t
  wo different ways:
  1. Specified by the user as a noise schedule which is taken in percentiles out of the action space size
  2. Specified by the agents action. In case the agents action is a list with 2 values, the 1st one is assumed to
  be the mean of the action, and 2nd is assumed to be its standard deviation.
  When the sampled action is outside of the action bounds given by the user, it is sampled again and again, until it
  is within the bounds.
docstr: :param action_space: the action space used by the environment
  :param noise_schedule: the schedule for the noise variance
  :param evaluation_noise: the noise variance that will be used during evaluation phases
  :param noise_as_percentage_from_action_space: whether to consider the noise as a percentage of the action space
                                                  or absolute value
docstr_tok: [":","param","action_space",":","the","action","space","used","by","the","environment",":","param","noise_schedule",":","the","schedule","for","the","noise","variance",":","param","evaluation_noise",":","the","noise","variance","that","will","be","used","during","evaluation","phases",":","param","noise_as_percentage_from_action_space",":","whether","to","consider","the","noise","as","a","percentage","of","the","action","space","or","absolute","value"]
code: def __init__(
      self,
      action_space: ActionSpace,
      noise_schedule: Schedule,
      evaluation_noise: float,
      clip_low: float,
      clip_high: float,
      noise_as_percentage_from_action_space: bool = True,
  ):
      """
      :param action_space: the action space used by the environment
      :param noise_schedule: the schedule for the noise variance
      :param evaluation_noise: the noise variance that will be used during evaluation phases
      :param noise_as_percentage_from_action_space: whether to consider the noise as a percentage of the action space
                                                      or absolute value
      """
      super().__init__(action_space)
      self.noise_schedule = noise_schedule
      self.evaluation_noise = evaluation_noise
      self.noise_as_percentage_from_action_space = (
          noise_as_percentage_from_action_space
      )
      self.clip_low = clip_low
      self.clip_high = clip_high
  
      if not isinstance(action_space, BoxActionSpace):
          raise ValueError(
              "Truncated normal exploration works only for continuous controls."
              "The given action space is of type: {}".format(
                  action_space.__class__.__name__
              )
          )
  
      if (
          not np.all(-np.inf < action_space.high)
          or not np.all(action_space.high < np.inf)
          or not np.all(-np.inf < action_space.low)
          or not np.all(action_space.low < np.inf)
      ):
          raise ValueError(
              "Additive noise exploration requires bounded actions"
          )
  
file_path: coach/rl_coach/exploration_policies/truncated_normal.py
imports: from typing import List
  import numpy
  from scipy.stats import truncnorm
  from rl_coach.core_types import RunPhase, ActionType
  from rl_coach.exploration_policies.exploration_policy import ExplorationParameters, ContinuousActionExplorationPolicy
  from rl_coach.schedules import Schedule, LinearSchedule
  from rl_coach.spaces import ActionSpace, BoxActionSpace
label_desc: Use image node_id 1 to create a new TruncatedNormal object from inherited base classes: ContinuousActionExplorationPolicy with example: obj = TruncatedNormal(action_space, noise_schedule, evaluation_noise, clip_low, clip_high, noise_as_percentage_from_action_space)