Demo / const.py
HuskyDoge's picture
newest
beb9e09
raw
history blame
1.68 kB
"""
FileName: const.py
Author: Benhao Huang
Create Date: 2023/11/19
Description: Some const value for Demo
"""
import numpy as np
_AI_AID_INFO = ["Use AI Aid", "Close AI Aid"]
_BOARD_SIZE = 9
_BOARD_SIZE_1D = _BOARD_SIZE * _BOARD_SIZE
_BLANK = 0
_BLACK = 1
_WHITE = 2
_NEW = 3
_PLAYER_SYMBOL = {
_WHITE: "βšͺ",
_BLANK: "βž•",
_BLACK: "⚫",
_NEW: "πŸ”΄",
}
_PLAYER_COLOR = {
_WHITE: "AI",
_BLANK: "Blank",
_BLACK: "YOU HUMAN",
}
_HORIZONTAL = np.array(
[
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[1, 1, 1, 1, 1],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
]
)
_VERTICAL = np.array(
[
[0, 0, 1, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 1, 0, 0],
]
)
_DIAGONAL_UP_LEFT = np.array(
[
[1, 0, 0, 0, 0],
[0, 1, 0, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 1, 0],
[0, 0, 0, 0, 1],
]
)
_DIAGONAL_UP_RIGHT = np.array(
[
[0, 0, 0, 0, 1],
[0, 0, 0, 1, 0],
[0, 0, 1, 0, 0],
[0, 1, 0, 0, 0],
[1, 0, 0, 0, 0],
]
)
_ROOM_COLOR = {
True: _BLACK,
False: _WHITE,
}
_MODEL_PATH = {
"AlphaZero": "/Users/husky/GomokuDemo/Gomoku_MCTS/checkpoint/2023-12-14-18-17-07_test_teaching_learning_collect_epochs=1000_size=9_model=normal/best_policy.model",
"duel": "/Users/husky/GomokuDemo/Gomoku_MCTS/checkpoint/2023-12-14-18-16-09_test_teaching_learning_collect_epochs=1000_size=9_model=duel/best_policy.model",
"Gumbel AlphaZero": "/Users/husky/GomokuDemo/Gomoku_MCTS/checkpoint/2023-12-14-21-19-40_selfplay_epochs=1000_size=9_model=gumbel/best_policy.model",
}