NeuralMMO / environment

Neural MMO - A Massively Multiagent Environment for Artificial Intelligence Research
https://neuralmmo.github.io
MIT License
508 stars 67 forks source link

Randomize spawn position of each population #53

Closed bowuaaa closed 2 years ago

bowuaaa commented 2 years ago
def SPAWN_CONCURRENT(self, shuffle=True):
    ...
    ret = s1 + s2 + s3 + s4
    if shuffle:
        assert not len(ret) % self.NPOP
        ret = np.array_split(ret, self.NPOP)
        np.random.shuffle(ret)
        ret = np.concatenate(ret, axis=0).tolist()
      n = int(self.NENT * len(self.AGENTS))
      return ret[:n]