oxwhirl / smac

SMAC: The StarCraft Multi-Agent Challenge
MIT License
1.07k stars 226 forks source link

Run-time spawn support #14

Closed chongyi-zheng closed 4 years ago

chongyi-zheng commented 4 years ago

With the help of SC2 Editor, we can create units during one episode of the game. It seems smac only supports static spawn currently. I mean we must specify the number of agents and the number of enemies in the map configuration like this:

"3m": {
        "n_agents": 3,
        "n_enemies": 3,
        "limit": 60,
        "a_race": "T",
        "b_race": "T",
        "unit_type_bits": 0,
        "map_type": "marines",
    }

And we have to spawn all the units for an episode at the very beginning.

Is it possible to create some interfaces to handle the dynamic spawn units during the game?

samvelyan commented 4 years ago

Yes, it is indeed possible. The debug API of sc2client-proto includes the DebugCreateUnit command which can be used to create units programmatically. It isn't part of the smac codebase, but I think using it should be straightforward.

I'm ready to help if there are any problems.

chongyi-zheng commented 4 years ago

OK, thanks for your help anyway!