diff --git a/board.py b/board.py index 35038ed..1b018d9 100644 --- a/board.py +++ b/board.py @@ -35,6 +35,12 @@ class Board: board.append(-15 - sum(negatives)) return tuple(board) + @staticmethod + def board_features_to_slimmed_down_own(board, player): + board = list(board) + board += ([1, 0] if np.sign(player) > 0 else [0, 1]) + return np.array(board).reshape(1, -1) + @staticmethod def board_features_to_own(board, player): board = list(board) diff --git a/network.py b/network.py index 6ceefbe..082f322 100644 --- a/network.py +++ b/network.py @@ -15,6 +15,9 @@ class Network: output_size = 1 # Can't remember the best learning_rate, look this up learning_rate = 0.01 + # board_features_to_own has size 30 + # board_features_to_tesauro has size 198 + # board_features_to_slimmed_down_own has size 28 board_rep = Board.board_features_to_own def custom_tanh(self, x, name=None):