-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrainer.py
More file actions
34 lines (25 loc) · 795 Bytes
/
trainer.py
File metadata and controls
34 lines (25 loc) · 795 Bytes
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
from argparse import ArgumentParser
import sys
from training.cmd import generate_agents, print_tournament_cmd, print_agent_cfg, clear_agents
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('-c')
parser.add_argument('-g')
parser.add_argument('-d')
parser.add_argument('-pa', help='Prints agent')
parser.add_argument('--tournament_cmd')
args = parser.parse_args()
if args.c is not None:
clear_agents()
sys.exit(0)
if args.tournament_cmd is not None:
print_tournament_cmd()
sys.exit(0)
if args.pa is not None:
print_agent_cfg(args.pa)
sys.exit(0)
n = int(args.g)
directory = None
if args.d is not None:
directory = args.d
generate_agents(n, directory)