-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathscripts.py
More file actions
70 lines (49 loc) · 1.66 KB
/
scripts.py
File metadata and controls
70 lines (49 loc) · 1.66 KB
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
63
64
65
66
67
68
69
70
"""Entry point scripts for neuron poker commands."""
import sys
from main import command_line_parser
def main_random():
"""Run random agents"""
sys.argv = ["main.py", "selfplay", "random"]
command_line_parser()
def main_keypress():
"""Run keypress agent"""
sys.argv = ["main.py", "selfplay", "keypress"]
command_line_parser()
def main_equity():
"""Run equity-based agent"""
sys.argv = ["main.py", "selfplay", "consider_equity"]
command_line_parser()
def main_equity_improvement():
"""Run equity improvement with genetic algorithm"""
sys.argv = [
"main.py",
"selfplay",
"equity_improvement",
"--improvement_rounds=20",
"--episodes=10",
]
command_line_parser()
def main_dqn_train():
"""Train DQN agent"""
sys.argv = ["main.py", "selfplay", "dqn_train"]
command_line_parser()
def main_dqn_play():
"""Play with trained DQN agent"""
sys.argv = ["main.py", "selfplay", "dqn_play"]
command_line_parser()
def main_random_render():
"""Run random agents with rendering"""
sys.argv = ["main.py", "selfplay", "random", "--render"]
command_line_parser()
def main_keypress_render():
"""Run keypress agent with rendering"""
sys.argv = ["main.py", "selfplay", "keypress", "--render"]
command_line_parser()
def main_equity_render():
"""Run equity-based agent with rendering"""
sys.argv = ["main.py", "selfplay", "consider_equity", "--render"]
command_line_parser()
def main_dqn_train_cpp():
"""Train DQN agent with C++ Monte Carlo"""
sys.argv = ["main.py", "selfplay", "dqn_train", "--use_cpp_montecarlo"]
command_line_parser()