コード例 #1
0
    def flat_obs(self, obs: (np.ndarray, list)):
        """

        :param obs: observation of the agent
        :type obs:  (np.ndarray, list)
        :return: flatten observation parameter
        :rtype: np.ndarray
        """
        return flatten(self.obs_space, obs)
コード例 #2
0
    def flat_action(self, action: (np.ndarray, list)):
        """

        :param action: action taken by agent
        :type action: (np.ndarray, list)
        :return: flatten action parameter
        :rtype: np.ndarray
        """
        return flatten(self.action_space, action)
コード例 #3
0
 def flat(space: Space, obs_or_action: (np.ndarray, list)):
     """
     :param space: space of environment
     :type space: Space
     :param obs_or_action: action or observation space
     :type obs_or_action: (np.ndarray, list)
     :return: flatten action or observation space
     :rtype: Space
     """
     return flatten(space, obs_or_action)
コード例 #4
0
 def flat_obs(self, obs: (np.ndarray, list)):
     return flatten(self.obs_space, obs)
コード例 #5
0
 def flat_action(self, action: (np.ndarray, list)):
     return flatten(self.action_space, action)
コード例 #6
0
 def flat(space: Space, obs_or_action: (np.ndarray, list)):
     return flatten(space, obs_or_action)