oxwhirl/smac

SMAC state space

nfitch3 opened this issue · 6 comments

Thanks for this resource! Is there any way to access the the enemies' last actions as part of the state space? I'm considering a game theoretic approach to training an agent but would need this ground truth of player actions for both allies and enemies.

Also, I was able to decipher the current state space only by digging through your code to see how the array gets populated. It would be nice to have more thorough documentation about the SMAC environment's state, action, observation, and reward spaces.

@nfitch3 you could take a look at my fork, which returns the state as a dictionary, whose features are named. I plan to contribute this to upstream in the future.

https://github.com/douglasrizzo/smac/blob/master/smac/env/starcraft2/starcraft2.py#L1097

@douglasrizzo thanks I will take a look! Yeah a labeled dict would have been more user-friendly instead of a flattened list.

I'll throw this back out there in case anyone can answer: Is there any way to access the the enemies' last actions as part of the state space? Any help is much appreciated!

@nfitch3 I don't think SMAC stores, much less exposes enemy actions. If you know how to get enemy actions using Blizzard's libraries (I believe it's this one) you can try to expose them in smac/env/starcraft2/starcraft2.py.

@douglasrizzo hey thanks for the resource! When I think about it more I guess I do not need to know the exact last actions for enemies but rather the set of available actions to them. I would've needed the exact last actions in order to sample the reward from the true "payoff matrix" (in game theory speak) but since the exact reward function is given I don't need them. That leads me to another task of getting all available actions for enemies, which may be simpler.

@nfitch3 maybe not, since enemies are controlled by the game and their choices of movement and attack-movement are much more granular than the ones SMAC agents use, so you'll have a very large action space for units.

Unfortunately, the actions of the enemies are not available to us via the sc2-proto.