From 785ae6a5be445e4511d389d3b4ec780094cad276 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 28 Mar 2018 00:16:50 +0200 Subject: [PATCH] Fixed wrongful appending of current player to board rep --- board.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board.py b/board.py index 767ae45..35038ed 100644 --- a/board.py +++ b/board.py @@ -42,7 +42,7 @@ class Board: negatives = [x if x < 0 else 0 for x in board] board.append(15 - sum(positives)) board.append(-15 - sum(negatives)) - board += ([1, 0] if np.sign(player) > 0 else [1, 0]) + board += ([1, 0] if np.sign(player) > 0 else [0, 1]) return np.array(board).reshape(1,-1) @@ -67,7 +67,7 @@ class Board: features.append((board[0] if np.sign(player) < 0 else board[25]) / 2.0) # Calculate how many pieces there must be in the home state and divide it by 15 features.append((15 - sum) / 15) - features += ([1,0] if np.sign(cur_player) > 0 else [1,0]) + features += ([1,0] if np.sign(cur_player) > 0 else [0,1]) test = np.array(features).reshape(1,-1) #print("TEST:",test) return test