From 95b12a6c35e94e01efffe54fc6d8204960994d51 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 28 Mar 2018 00:33:39 +0200 Subject: [PATCH] Added another board_rep --- board.py | 6 ++++++ network.py | 3 +++ 2 files changed, 9 insertions(+) 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):