-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
executable file
·44 lines (39 loc) · 2.03 KB
/
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
config = {
# gomoku
'n': 15, # board size
'n_in_row': 5, # n in row
'use_gui': False, # show gomoku gui in training mode
'is_debug': False,
# mcts
'libtorch_use_gpu' : True, # libtorch use cuda
'num_mcts_threads': 4, # mcts threads number
'num_mcts_sims': 1000, # mcts simulation times
'c_puct': 5, # puct coeff
'c_virtual_loss': 1 , # virtual loss coeff
# neural_network
'train_use_gpu' : True, # train neural network using cuda
'lr': 0.001, # learning rate
'l2': 0.0001, # L2
'num_channels': 128, # convolution neural network channel size
'num_layers' : 10, # residual layer number
'epochs': 1.5, # train epochs
'batch_size': 512, # batch size
# train
'num_iters': 10000, # train iterations
'num_eps': 110, # self play times in per iter
'num_train_threads': 12, # self play in parallel
'num_explore': 10, # explore step in a game
'max_num_explore': 20,
'temp': 1, # temperature
'dirichlet_alpha': 0.3, # action noise in self play games
'dirichlet_rate': 0.25,
'update_threshold': 0.55, # update model threshold
'num_contest': 50, # new/old model compare times
'check_freq': 25, # test model frequency
'examples_buffer_max_len': 20, # max length of examples buffer
# test
'human_color': 1, # human player's color
'start_idx': 145,
}
# action size
config['action_size'] = config['n'] ** 2