google-deepmind / pysc2

StarCraft II Learning Environment
Apache License 2.0
7.96k stars 1.15k forks source link

Error in transformation action: argument is out of range #343

Open meifannao opened 1 year ago

meifannao commented 1 year ago
           scvs = self.get_units_by_type(obs, units.Terran.SCV)
           if len(scvs) != 0:
                    scv = random.choice(scvs)
                    return actions.FUNCTIONS.select_point('select', (scv.x, scv.y))

When I run the above code to get the coordinates of the scv, the following error appears randomly:

image

I know that an array out of bounds occurred, but don't know how to solve it in a reasonable way

Can someone tell me why this problem occurs