-
Notifications
You must be signed in to change notification settings - Fork 16
/
conf.py
48 lines (41 loc) · 2.12 KB
/
conf.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
from math import sqrt
import os
conf = {
'ROOT_DIR': os.path.dirname(__file__),
'MODEL_DIR': 'models',
'LOG_DIR': 'logs',
'GAMES_DIR': 'games',
'BEST_MODEL': 'best_model.h5',
'MOVE_INDEX': 'move_index.csv',
'GAME_FILE': 'game_%03d.h5',
'SHOW_EACH_MOVE': False,
'SHOW_END_GAME': False,
### MODEL ###
'N_RESIDUAL_BLOCKS': 20, # Size of the tower of residual blocks, 20 for small model, 40 for alphagozero full size
'L2_EPSILON': 1e-4,# The epsilon coefficient in the loss value function, 1e-4 in paper
'MOMENTUM': 0.9,# 0.9 in paper
'LEARNING_RATE': 1e-2,# 1e-2 in paper
### SELF-PLAY ###
'N_GAMES': 2500, # Number of games of self play generated by best_model, 25k in paper
'MCTS_SIMULATIONS': 64, # 1.6k in paper
'SIZE': 5, # board size 19 in paper
'KOMI': 3.5, # The komi points given to white player
'STOP_EXPLORATION': 4, # Number of plays after which temperature goes to 0 , 30 in paper
'MCTS_BATCH_SIZE': 8, # Size of the prediction batch while exploring mcts
'DIRICHLET_ALPHA': .03, # The value of dirichlet coefficient in the nois of root_node of mcts simulation
'DIRICHLET_EPSILON': .25, # How much the noise is accounted for
'RESIGNATION_PERCENT': .99, # % of the time we DO NOT use resignation to assess resignation value (10% in paper)
'RESIGNATION_ALLOWED_ERROR': .05, # 5% of the time we resign a game we could have won
### TRAIN ###
'TRAIN_BATCH_SIZE': 32, # Batch size in the training phase, 32 in paper
'EPOCHS_PER_SAVE': 1000, # A model will be saved to be evaluated this amount of epochs, 1000 in paper
'NUM_WORKERS': 64,# We use this many GPU workers so split the task, 64 in paper
'HISTOGRAM_FREQ': 0, # Shows the histograms in Tensorboard. For debugging
'VALIDATION_SPLIT': 0, # Needed if you want histograms in Tensorboard.
### EVALUATOR ###
'EVALUATE_N_GAMES': 100,# The number of games to test on to elect new best model, 400 in paper
'EVALUATE_MARGIN': .5 + 1/sqrt(100),# Model has to win by that margin to be elected, 55% in paper
'SGF_ENABLED': True,
### GTP ###
'GTP_LOGFILE': 'gtp.log',
}