-
Notifications
You must be signed in to change notification settings - Fork 160
/
Copy pathexternal_bot.py
35 lines (30 loc) · 1021 Bytes
/
external_bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from pathlib import Path
from sc2 import maps
from sc2.data import Race
from sc2.main import GameMatch, run_multiple_games
from sc2.player import BotProcess, Computer
def main():
run_multiple_games(
[
GameMatch(
maps.get("AcropolisLE"),
[
# Enable up to 2 of the 4 following bots to test this file
# Assuming you launch external_bot.py from the root directory of 'python-sc2'
BotProcess(
Path.cwd(),
["python", "examples/competitive/run.py"],
Race.Terran,
"CompetiveBot",
stdout="temp.txt",
),
# Bot(Race.Zerg, ZergRushBot()),
# Bot(Race.Zerg, ZergRushBot()),
Computer(Race.Zerg),
],
realtime=True,
),
]
)
if __name__ == "__main__":
main()