oxwhirl / smac

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

competitive scenario #19

Closed saizhang0218 closed 4 years ago

saizhang0218 commented 4 years ago

Does SMAC support competitive MARL? That is, I want to implement two MARL algorithms to compete with each other, rather than the user agents compete with build-in AI. If yes, is there any guide on how to modify the code? Thanks!

PaLeroy commented 4 years ago

Hey, You can have a way to do it on my forked repo. It is certainly not the nicest way but it works well.

Basically, you need to run a sc2 client for each team you want to control, manage multiple teams in the several SMAC functions and, of course, modify the maps in the map editor.

samvelyan commented 4 years ago

Competitive scenarios are currently not supported in SMAC. There are no immediate plans for adding the support for them as well.

However, SMAC code can be modified to allow two MARL algorithms fight each other. Should you wish to do this, I'll be more than happy to help.

LeejwUniverse commented 2 years ago

HI, @samvelyan I would like to edit code allowing two MARL algorithms for fighting each other. could you give me the information on editing code in SMAC?

LeejwUniverse commented 2 years ago

Hi, Leroy Pascal. I really appreciate your contribution. and I wonder also is it possible to beat a human player against MARL algorithm?

2022년 4월 7일 (목) 오후 5:53, Leroy Pascal @.***>님이 작성:

Hey, I modified SMAC to allow competition of two teams (my fork) https://github.com/PaLeroy/smac/blob/master/smac/env/starcraft2/starcraft2multi.py . I based my implementation on pysc2 https://github.com/deepmind/pysc2/blob/master/pysc2/env/sc2_env.py. The idea is to create two sc2 processes that join the same sc2 game. You therefore need to play a bit with the sc2 editor to modify maps. In the future I might consider to adapt the implementation in order to control all agents with a single sc2 process, which would be more stable.

— Reply to this email directly, view it on GitHub https://github.com/oxwhirl/smac/issues/19#issuecomment-1091356462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXP2SDEVFHBYWBHP5NML7DVD2PA7ANCNFSM4JIDIH4Q . You are receiving this because you commented.Message ID: @.***>

PaLeroy commented 2 years ago

Never tried but it might be possible to beat them, depending on the training scenario and generalisation capabilities of the trained teams.

(I deleted my previous comment as I did not see that I had already replied earlier in this issue)

LeejwUniverse commented 2 years ago

Thanks for your kindness. I will try to train my algorithm based on your repo.