forked from aiarena/aiarena-docker-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_local_config.py
62 lines (53 loc) · 1.77 KB
/
example_local_config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import logging
import os
import platform
from urllib import parse
from arenaclient.match.matches import FileMatchSource
# GENERAL
ARENA_CLIENT_ID = "aiarenaclient_000"
API_TOKEN = "12345"
ROUNDS_PER_RUN = 1
SHUT_DOWN_AFTER_RUN = True
USE_PID_CHECK = False
DEBUG_MODE = False
PYTHON = "python3.7"
RUN_LOCAL = True
CLEANUP_BETWEEN_ROUNDS = False
SYSTEM = platform.system()
SC2_PROXY = {"HOST": "127.0.0.1", "PORT": 8765}
# Secure mode will ignore the BOTS_DIRECTORY config setting and instead run each bot in their home directory.
SECURE_MODE = False
# Specify the users (if any) to run the bots as.
RUN_PLAYER1_AS_USER = None
RUN_PLAYER2_AS_USER = None
# LOGGING
LOGGING_HANDLER = logging.FileHandler("../supervisor.log", "a+")
LOGGING_LEVEL = 10
# PATHS AND FILES
TEMP_PATH = "/tmp/aiarena/"
LOCAL_PATH = os.path.dirname(__file__)
WORKING_DIRECTORY = LOCAL_PATH # same for now
LOG_FILE = os.path.join(WORKING_DIRECTORY, "client.log")
REPLAYS_DIRECTORY = os.path.join(WORKING_DIRECTORY, "replays")
BOT_LOGS_DIRECTORY = os.path.join(WORKING_DIRECTORY, "logs")
BOTS_DIRECTORY = os.path.join(WORKING_DIRECTORY, "bots")
VISUALIZE = False
MATCH_SOURCE_CONFIG = FileMatchSource.FileMatchSourceConfig(
matches_file=os.path.join(WORKING_DIRECTORY, "matches"),
results_file=os.path.join(WORKING_DIRECTORY, "results")
)
# WEBSITE
BASE_WEBSITE_URL = "https://ai-arena.net"
API_MATCHES_URL = parse.urljoin(BASE_WEBSITE_URL, "/api/arenaclient/matches/")
API_RESULTS_URL = parse.urljoin(BASE_WEBSITE_URL, "/api/arenaclient/results/")
# STARCRAFT
SC2_HOME = "/root/StarCraftII/"
SC2_BINARY = os.path.join(SC2_HOME, "Versions/Base75689/SC2_x64")
MAX_GAME_TIME = 60486
MAX_REAL_TIME = 7200 # 2 hours in seconds
MAX_FRAME_TIME = 1000
STRIKES = 10
REALTIME = False
# MATCHES
DISABLE_DEBUG = True
VALIDATE_RACE = False