oxwhirl/smac

How to understand the parameters listed in smac/env/starcraft2/maps/smac_maps.py?

BUPT-zeld151 opened this issue · 1 comments

I want to create my own SMAC map for my research, and I succeeded editing my map through SC2 map editor in Windows. When I try to add my map into SMAC, I faced smac/env/starcraft2/maps/smac_maps.py, which includes multiple SMAC maps' parameters. Specifically, the parameters of one map are like:
"25m": {
"n_agents": 25,
"n_enemies": 25,
"limit": 150,
"a_race": "T",
"b_race": "T",
"unit_type_bits": 0,
"map_type": "marines",
},

I recently have no idea what 'limit'、'a_race', 'b_race', 'unite_type_bits' and 'map_type' is. Where can I find these information? It's obvious that these parameters are significant to the map.

Hi. Here are the meanings of the following parameters:

  • "limit": episode length, i.e. after how many steps does the episode terminate,
  • "a_race": the race of the allied units (side a). Values "T" for Terran, "Z" for Zerg, "P" for Protoss. For more info, see https://www.ign.com/wikis/starcraft-2/Races.
    "b_race": the race of the enemy units (side b)
    "unit_type_bits": if the scenario (map) includes more than 1 unit type, then in order for RL agents to understand the type of their friend or enemy unit we pass their type as a one hot encoding. This flag, in particular, defines the length of the one-hot encoding.
    "map_type": this is used in one of the functions in SMAC to initialize some class variables, which will be needed to compute the unit information. See this method.

Feel free to reopen if there are more questions.