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 action given observation.
  
  Args:
      observation (np.ndarray): Observation from PointEnv. Should have
          length at least 2.
  
  Returns:
      tuple:
          * np.ndarray: Optimal action in the environment. Has length 2.
          * dict[str, np.ndarray]: Agent info (empty).
docstr_tok: ["Get","action","given","observation",".","Args",":","observation","(","np.ndarray",")",":","Observation","from","PointEnv",".","Should","have","length","at","least","2",".","Returns",":","tuple",":","*","np.ndarray",":","Optimal","action","in","the","environment",".","Has","length","2",".","*","dict","[","str",",","np.ndarray","]",":","Agent","info","(","empty",")","."]
code: def get_action(self, observation):
      """Get action given observation.
  
      Args:
          observation (np.ndarray): Observation from PointEnv. Should have
              length at least 2.
  
      Returns:
          tuple:
              * np.ndarray: Optimal action in the environment. Has length 2.
              * dict[str, np.ndarray]: Agent info (empty).
  
      """
      return self.goal - observation[: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 2 for calling the OptimalPolicy obj's underlying member method code with example usage: obj.get_action(observation) and returns: unknown,  dict