class_docstr: A simple 2D point environment.
  
  Args:
      goal (np.ndarray): A 2D array representing the goal position
      arena_size (float): The size of arena where the point is constrained
          within (-arena_size, arena_size) in each dimension
      done_bonus (float): A numerical bonus added to the reward
          once the point as reached the goal
      never_done (bool): Never send a `done` signal, even if the
          agent achieves the goal
      max_episode_length (int): The maximum steps allowed for an episode.
class_docstr_tok: ["A","simple","2D","point","environment",".","Args",":","goal","(","np.ndarray",")",":","A","2D","array","representing","the","goal","position","arena_size","(","float",")",":","The","size","of","arena","where","the","point","is","constrained","within","(","-arena_size",",","arena_size",")","in","each","dimension","done_bonus","(","float",")",":","A","numerical","bonus","added","to","the","reward","once","the","point","as","reached","the","goal","never_done","(","bool",")",":","Never","send","a","`","done","`","signal",",","even","if","the","agent","achieves","the","goal","max_episode_length","(","int",")",":","The","maximum","steps","allowed","for","an","episode","."]
code: def __init__(
      self,
      goal=np.array((1.0, 1.0), dtype=np.float32),
      arena_size=5.0,
      done_bonus=0.0,
      never_done=False,
      max_episode_length=math.inf,
  ):
      goal = np.array(goal, dtype=np.float32)
      self._goal = goal
      self._done_bonus = done_bonus
      self._never_done = never_done
      self._arena_size = arena_size
  
      assert ((goal >= -arena_size) & (goal <= arena_size)).all()
  
      self._step_cnt = None
      self._max_episode_length = max_episode_length
      self._visualize = False
  
      self._point = np.zeros_like(self._goal)
      self._task = {"goal": self._goal}
      self._observation_space = akro.Box(
          low=-np.inf, high=np.inf, shape=(3,), dtype=np.float32
      )
      self._action_space = akro.Box(
          low=-0.1, high=0.1, shape=(2,), dtype=np.float32
      )
      self._spec = EnvSpec(
          action_space=self.action_space,
          observation_space=self.observation_space,
          max_episode_length=max_episode_length,
      )
  
file_path: garage/src/garage/envs/point_env.py
imports: import math
  import akro
  import numpy
  from garage import Environment, EnvSpec, EnvStep, StepType
label_desc: Use image node_id 1 to create a new PointEnv object from inherited base classes: Environment with example: obj = PointEnv(goal, arena_size, done_bonus, never_done, max_episode_length)