Open BurnySc2 opened 4 years ago
That is very nice. Have any ideas how i can implement there some random? Like: race_choice = random.choice([Race.Terran, Race.Protoss, Race.Zerg, Race.Random]) map_name = random.choice(["Ephemeron", "DeathAuraLE", "EternalEmpireLE", "EverDreamLE", "GoldenWallLE", "IceandChromeLE", "NightshadeLE"])
it is working for: sc2.run_game(sc2.maps.get(map_name), [
bot,
Computer(race_choice, Difficulty.Hard) # CheatInsane VeryHard Hard Medium Easy
], realtime=False, save_replay_as="Example.SC2Replay")
but no luck here
When developing bots, it can be annoying to wait for SC2 to launch before the bot connects to it.
Following idea could speed up development: 1) Script to launch a SC2 instance (
ready
state) 2) Script to launch the bot and let the bot connect to the SC2 instance, and play the game 3) Script to terminate the bot and disconnects it from the SC2 instance, then puts SC2 back into theready
stateThis way you have to launch script
1)
once, then can use scripts2)
and3)
over and over without having to wait for SC2 to launch.The
fastreload.py
script seems to achieve this somewhat: https://github.com/BurnySc2/python-sc2/blob/develop/examples/fastreload.pyAlso: https://github.com/BurnySc2/python-sc2/blob/40765d879f27b409b7d5db19b462020b6571f740/sc2/main.py#L717