class_docstr: A linear dynamical system characterized by A, B, Q, and R.
  
  Suppose x_t is current state, u_t is current action, then:
  
  x_t+1 = A x_t + B u_t
  Reward_t = x_t' Q x_t + u_t' R u_t
code: def __init__(self):
      self.max_steps = 4
      self.state_dim = 3
      self.action_dim = 2
      self.action_space = Box(low=-3, high=3, shape=(self.action_dim,))
      self.observation_space = Box(
          low=-1.7976931348623157e308,
          high=1.7976931348623157e308,
          shape=(self.state_dim,),
      )
      self.A = 0.2 * np.array(
          [[-1.0, -1.0, 1.0], [2.0, 0.0, 2.0], [0.0, -1.0, 2.0]]
      )
      self.B = 0.2 * np.array([[2.0, 2.0], [2.0, 2.0], [0.0, 1.0]])
      self.Q = 0.2 * np.array(
          [[1.0, 0.0, 0.0], [0.0, 2.0, 0.5], [0.0, 0.5, 1.0]]
      )
      self.R = 0.2 * np.array([[1.0, -1.0], [-1.0, 2.0]])
      S = np.zeros((self.state_dim, self.action_dim))
      # this matrix should be positive definite
      check_mat = np.vstack(
          (np.hstack((self.Q, S)), np.hstack((S.T, self.R)))
      )
      assert self.is_pos_def(check_mat)
      logger.info(
          f"Initialized Linear Dynamics Environment:\n"
          f"A:\n{self.A}\nB:\n{self.B}\nQ:\n{self.Q}\nR:\n{self.R}\n"
      )
  
file_path: ReAgent/reagent/gym/envs/dynamics/linear_dynamics.py
imports: import logging
  import numpy
  from gym import Env
  from gym.spaces import Box
label_desc: Use image node_id 1 to create a new LinDynaEnv object from inherited base classes: Env with example: obj = LinDynaEnv()