Skip to content

get_units_by_type() function #4

Description

@chauvinfish

def get_units_by_type(self, obs, unit_type): return [unit for unit in obs.observation.feature_units if unit.unit_type == unit_type]
it's a brilliant idea to count units.
the orginal tutorial used a complicated and magical way like depot_y, depot_x = (unit_type == _TERRAN_SUPPLY_DEPOT).nonzero() supply_depot_count = int(round(len(depot_y) / 69))

So where did you find the obs.observation.feature_units this member property?
I need a document badly

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions