class_docstr: Optimal policy for PointEnv.
  
  Args:
      env_spec (EnvSpec): The environment spec.
      goal (np.ndarray): The goal location of the environment.
class_docstr_tok: ["Optimal","policy","for","PointEnv",".","Args",":","env_spec","(","EnvSpec",")",":","The","environment","spec",".","goal","(","np.ndarray",")",":","The","goal","location","of","the","environment","."]
docstr: Get actions given observations.
  
  Args:
      observations (np.ndarray): Observations from the environment.
          Has shape :math:`(B, O)`, where :math:`B` is the batch
          dimension and :math:`O` is the observation dimensionality (at
          least 2).
  
  Returns:
      tuple:
          * np.ndarray: Batch of optimal actions.
              Has shape :math:`(B, 2)`, where :math:`B` is the batch
              dimension.
          Optimal action in the environment.
          * dict[str, np.ndarray]: Agent info (empty).
docstr_tok: ["Get","actions","given","observations",".","Args",":","observations","(","np.ndarray",")",":","Observations","from","the","environment",".","Has","shape",":","math",":","`","(","B",",","O",")","`",",","where",":","math",":","`","B","`","is","the","batch","dimension","and",":","math",":","`","O","`","is","the","observation","dimensionality","(","at","least","2",")",".","Returns",":","tuple",":","*","np.ndarray",":","Batch","of","optimal","actions",".","Has","shape",":","math",":","`","(","B",",","2",")","`",",","where",":","math",":","`","B","`","is","the","batch","dimension",".","Optimal","action","in","the","environment",".","*","dict","[","str",",","np.ndarray","]",":","Agent","info","(","empty",")","."]
code: def get_actions(self, observations):
      """Get actions given observations.
  
      Args:
          observations (np.ndarray): Observations from the environment.
              Has shape :math:`(B, O)`, where :math:`B` is the batch
              dimension and :math:`O` is the observation dimensionality (at
              least 2).
  
      Returns:
          tuple:
              * np.ndarray: Batch of optimal actions.
                  Has shape :math:`(B, 2)`, where :math:`B` is the batch
                  dimension.
              Optimal action in the environment.
              * dict[str, np.ndarray]: Agent info (empty).
  
      """
      return (
          self.goal[np.newaxis, :].repeat(len(observations), axis=0)
          - observations[:, :2]
      ), {}
  
file_path: garage/src/garage/examples/torch/bc_point_deterministic_policy.py
imports: import numpy
  from garage import wrap_experiment
  from garage.envs import PointEnv
  from garage.sampler import RaySampler
  from garage.torch.algos import BC
  from garage.torch.policies import DeterministicMLPPolicy, Policy
  from garage.trainer import Trainer
label_desc: Use image node_id 3 for calling the OptimalPolicy obj's underlying member method code with example usage: obj.get_actions(observations) and returns: unknown,  dict