oxwhirl/smac

What's the meaning of unit_max_cooldown() and how to set the maximal cooldown of new unit?

LeejwUniverse opened this issue · 1 comments

Hi, I tried to add new units for my experiment setting.
however, I could not find how to set the maximal cooldown for new unit.
I wonder what is the meaning of values in unit_max_cooldown?
could you explain more detail? I would like to add archon rl unit.

The cooldown is the "delay between a unit or building's attacks or use of certain non-passive abilities, measured in seconds" (see this). Each unit has a specific value at each point in time. You can print each unit's current cooldown by printing the values of self.agents in StarCraft II env. We store the maximum values of this property so that we normalize it in observations/global state (divide current cooldown by maximum cooldown). For new units, one you can print the current cooldown for many-many rollouts, get the maximum value, and then hardcode it in the unit_max_cooldown function.

Hope this helps. Feel free to reopen if there are further questions.