Dentosal / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
586 stars 182 forks source link

Playing multiple bots starts two individual games #181

Closed ericbroda closed 5 years ago

ericbroda commented 5 years ago

I am trying to run one bot against another bot and two separate games start instead of one game with two bots. I am running on Mac/OSX.

Below is the code that does not work (running identical bots against each other):

# mybot is a functional bot and is known to work, however, this starts two games instead of a single game
run_game(maps.get("AbyssalReefLE"), [
        Bot(Race.Protoss, mybot),
        Bot(Race.Protoss, mybot)
    ], realtime=is_realtime, save_replay_as=replay_path)

I have looked at issue #136 which states that this may not work with all versions of starcraft - my version is: 4.7.1.70326 (which I believe is reasonably current) and think it should work with this version.

Is there something else I need to do to make this work?

ericbroda commented 5 years ago

Also confirmed that example program, "bot_vs_bot.py", also has same problem.

    from zerg.zerg_rush import ZergRushBot
    run_game(maps.get("Abyssal Reef LE"), [
        Bot(Race.Zerg, ZergRushBot()),
        Bot(Race.Zerg, ZergRushBot())
    ], realtime=False, save_replay_as=replay_path)
ericbroda commented 5 years ago

I think this is my mistake... It looks like this is the desired behaviour (one bot in each instance of startcraft)