9ddf959bb26d5d15d4a0c9ddd6821a262866214c,a2c/a2c.py,Runner,update_obs,#Runner#Any#,231

Before Change


    self.group_id = [0 for _ in range(nenv)]

  def update_obs(self, obs): // (self.nenv, 32, 32, 2)
    obs = np.asarray(obs, dtype=np.int32).swapaxes(1, 2).swapaxes(2, 3)
    self.obs = np.roll(self.obs, shift=-1, axis=3)
    self.obs[:, :, :, -1:] = obs[:, :, :, :]
    // could not broadcast input array from shape (4,1,32,32) into shape (4,4,32)

After Change


    self.obs = np.roll(self.obs, shift=-3, axis=3)
    new_map = np.zeros((self.nenv, 32, 32, 3))
    new_map[:,:,:,-1] = obs[:,0,:,:]
    for env_num in range(self.nenv):
      marine0 = self.xy_per_marine[env_num]["0"]
      marine1 = self.xy_per_marine[env_num]["1"]
      new_map[env_num,marine0[0],marine0[1],-3] = 1
      new_map[env_num,marine1[0],marine1[1],-2] = 1
    self.obs[:, :, :, -3:] = new_map
    // could not broadcast input array from shape (4,1,32,32) into shape (4,4,32)

  def update_available(self, _available_actions):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: chris-chris/pysc2-examples
Commit Name: 9ddf959bb26d5d15d4a0c9ddd6821a262866214c
Time: 2017-11-03
Author: sjhshy@gmail.com
File Name: a2c/a2c.py
Class Name: Runner
Method Name: update_obs


Project Name: GPflow/GPflow
Commit Name: a9273fb766562261b2ccedb635c71363fb10f06c
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: GPflow/svgp.py
Class Name: SVGP
Method Name: build_likelihood


Project Name: GPflow/GPflow
Commit Name: bbc4e3ee65ab504be761e3b5487ce4ccdd589da0
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: GPflow/svgp.py
Class Name: SVGP
Method Name: build_likelihood


Project Name: chris-chris/pysc2-examples
Commit Name: 9ddf959bb26d5d15d4a0c9ddd6821a262866214c
Time: 2017-11-03
Author: sjhshy@gmail.com
File Name: a2c/a2c.py
Class Name: Runner
Method Name: update_obs