示例#1
0
 def __init__(self, env_fns):
     DummyVecEnv.__init__(self, env_fns)
     num_agents = getattr_unwrapped(self.envs[0], 'num_agents')
     VecMultiEnv.__init__(self, self.num_envs, num_agents,
                          self.observation_space, self.action_space)
     self.buf_rews = np.zeros((self.num_envs, self.num_agents),
                              dtype=np.float32)
示例#2
0
    def __init__(self, env_fns):
        DummyVecEnv.__init__(self, env_fns)

        self.buf_dones = np.zeros((self.num_envs,), dtype=np.ndarray)
        self.buf_rews  = np.zeros((self.num_envs,), dtype=np.ndarray)