-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow_match_nn.py
27 lines (22 loc) · 1.24 KB
/
show_match_nn.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
from ia.predictors import FilePredictor
from ia.random_mcts_player import NNPlayer, fight, RandomMCTSPlayer
from janggi.parameters import N_ITERATIONS, DEFAULT_N_SIMULATIONS
from janggi.utils import Color
# Example of command:
# python3 show_match_nn.py --number_simulations 800 --n_iterations 200 --root_file_inference /tmp/showmatch --parallel_mcts True --n_threads_mcts 10
player_blue = NNPlayer(Color.BLUE, n_simulations=DEFAULT_N_SIMULATIONS,
janggi_net=FilePredictor(),
temperature_start=0.01,
temperature_threshold=30,
temperature_end=0.01,
print_info=True)
player_red = RandomMCTSPlayer(Color.RED, n_simulations=16000, temperature_start=0.01,
temperature_threshold=30, temperature_end=0.01,
print_info=True)
# player_red = NNPlayer(Color.RED, n_simulations=DEFAULT_N_SIMULATIONS,
# janggi_net=FilePredictor(),
# temperature_start=0.01,
# temperature_threshold=30,
# temperature_end=0.01,
# print_info=True)
fight(player_blue, player_red, N_ITERATIONS, print_board=True)