config.py 3.43 KB
#### SELF PLAY
EPISODES = 30
MCTS_SIMS = 50
MEMORY_SIZE = 30000
TURNS_UNTIL_TAU0 = 10  # turn on which it starts playing deterministically
CPUCT = 1
EPSILON = 0.2
ALPHA = 0.8

INPUT_SHAPE = (20, 21)

#### RETRAINING
BATCH_SIZE = 256
EPOCHS = 50
REG_CONST = 0.0001
LEARNING_RATE = 0.1
MOMENTUM = 0.9
TRAINING_LOOPS = 10

HIDDEN_CNN_LAYERS = [
    {'filters': 75, 'kernel_size': 4}
    , {'filters': 75, 'kernel_size': 4}
    , {'filters': 75, 'kernel_size': 4}
    , {'filters': 75, 'kernel_size': 4}
    , {'filters': 75, 'kernel_size': 4}
    , {'filters': 75, 'kernel_size': 4}
]

HIDDEN_2D_CNN_LAYERS = [
    {'filters': 75, 'kernel_size': (4, 4)}
    , {'filters': 75, 'kernel_size': (4, 4)}
    , {'filters': 75, 'kernel_size': (4, 4)}
    , {'filters': 75, 'kernel_size': (4, 4)}
    , {'filters': 75, 'kernel_size': (4, 4)}
    , {'filters': 75, 'kernel_size': (4, 4)}
]

#### EVALUATION
EVAL_EPISODES = 20
SCORING_THRESHOLD = 1.3

ACTION_MEANING = {
    0: 'overflow: hidden;    position: absolute;    width: 0;    height: 0;    line-height: 0;    text-indent: -9999px',
    1: 'position: absolute;    top: 15px;    left: 20px;    color: #fff;    font-weight: normal;    font-size: 14px;    font-family: "NotoSans Regular", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "돋움", dotum, sans-serif',
    2: 'padding-top: 8px;    font-size: 14px;    line-height: 22px;    color: #666;    display: -webkit-box;    overflow: hidden;    max-height: 66px;    -webkit-box-orient: vertical;    -webkit-line-clamp: 3',
    3: 'display: none',
    4: 'position: relative;    width: 1160px;    margin: 0 auto;    padding-bottom: 180px;    width: 100%',
    5: 'display: block;    padding-top: 28px;    font-size: 12px;    clear: both',
    6: 'overflow: hidden;    max-width: 1800px;    margin: 0 auto;    padding: 35px 60px 0;    padding-left: 20px;    padding-right: 20px',
    7: 'float: left;    width: 33.33%;    padding: 0 20px;    box-sizing: border-box',
    8: 'margin: 22px 0 0 21px;    width: 18px;    height: 14px;    margin-top: 21px;    background-position: -40px 0;    display: inline-block;    background-position: -70px 0;    width: 17px;    height: 3px;    margin: 20px 0 0 4px;    background-position: -90px 0',
    9: 'position: absolute;    top: 15px;    left: 20px;    color: #1e1e1e;    font-weight: normal;    font-size: 14px;    font-family: "NotoSans Regular", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "돋움", dotum, sans-serif',
    10: 'float: left;    width: 33.33%;    padding: 0 20px;    box-sizing: border-box',
    11: 'display: block;    position: relative',
    12: 'width: 100%;    margin-bottom: 14px',
    13: 'float: left',
    14: 'position: relative;    min-width: 1320px;    background-color: #fff',
    15: 'padding-top: 122px;    padding-top: 0',
    16: 'overflow: hidden;    max-width: 1800px;    margin: 0 auto;    padding: 76px 60px 0;    padding-left: 20px;    padding-right: 20px;',
    17: 'font-weight: bold;    font-size: 28px;    line-height: 45px;    padding-left: 2px;    color: #003cff;    font-size: 32px;    font-weight: bold;    color: #1e1e1e;    display: inline-block;    font-size: 20px;    vertical-align: top',
    18: 'padding-top: 33px;    color: #1e1e1e',
    19: 'text-decoration: underline;    display: block;    padding-top: 18px;    font-size: 20px;    line-height: 32px;    color: #1e1e1e',
}
WIDTH = 800
HEIGHT = 600

IMAGE_SIZE = (224, 224)

LAST_ACTION = len(ACTION_MEANING)
NUM_ACTIONS = len(ACTION_MEANING) + 1