oxwhirl / smacv2

MIT License
221 stars 34 forks source link

Having both SMAC and SMACv2 #46

Open opocaj92 opened 4 months ago

opocaj92 commented 4 months ago

Hi everyone, First of all, thanks for both these amazing library, they are really an amazing contribution to MARL experimentation! Now, I was trying to get both SMAC and SMACv2 into the same pymarl codebase. So I installed both, added the SMAC_Maps from SMAC into the correct folder $HOME/StarCraftII/Maps and modified src.envs.__init__.py as follow:

from smac.env import StarCraft2Env
from smacv2.env import StarCraft2Env as StarCraft2v2Env

...

REGISTRY["sc2"] = partial(env_fn, env=StarCraft2Env)
REGISTRY["sc2-v2"] = partial(env_fn, env=StarCraft2v2Env)

However, when I try to launch an algorithm on any of the two, e.g.

python3 src/main.py --config=qmix --env-config=sc2

I keep getting this error (during the last attempt is was reported twice, but the number of lines vary depending on what I try)

pysc2.maps.lib.DuplicateMapError: Duplicate map found: 3m
pysc2.maps.lib.DuplicateMapError: Duplicate map found: 3m

If I simply uninstall smacv2 however everything works just fine. So, is there a way to have both libraries to work together?